Network, the emulator can be connected, real machine can not connect.
Abstract: network, the emulator can be connected, the real machine can not connect.
Is a simple procedure, the client and server simple dialogue.
Client updates, "this is client", and then revealed that information to the server.
Received news server, and then returned to "this is server";
Simulator can run, not really connected to the machine.
J300, and internet access.
Client code
DataOutputStream dos = null;
DataInputStream dis = null;
Boolean berror = false;
Try (
ServerHc = (HttpConnection) Connector.open ( "http://zengcity.vicp.net:8080/WMLParserWebModule/parserserver"
Connector.READ_WRITE);
ServerHc.setRequestMethod (HttpConnection.POST);
ServerHc.setRequestProperty ( "Connection", "Keep-Alive");
ServerHc.setRequestProperty ( "Content-Type."
"Application / octet-stream");
Berror = false;
) Catch (IOException ex) (
Berror = true;
)
If (! Berror) (
Try (
ServerHc.openDataOutputStream dos = ();
Dos.writeUTF ( "Hello, this is client");
) Catch (IOException ex1) (
Berror = true;
MainMIDlet.instance.displayable.tf_stat.setString ( "send error");
)
)
If (! Berror) (
Try (
ServerHc.openDataInputStream dis = ();
MainMIDlet.instance.displayable.tf_stat.setString (dis.readUTF ());
) Catch (IOException ex2) (
Berror = true;
MainMIDlet.instance.displayable.tf_stat.setString ( "receive error");
)
)
Try (
If (dos! = Null) (
Dos.close ();
)
If (dis! = Null) (
Dis.close ();
)
If (serverHc! = Null) (
ServerHc.close ();
)
) Catch (IOException ex3) (
)
Server code:
Public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException (
DataInputStream dis = new DataInputStream (request.getInputStream ());
System.out.println (dis.readUTF ());
DataOutputStream dos = new DataOutputStream (response.getOutputStream ());
Dos.writeUTF ( "Hello, this is server");
Dos.flush ();
Dos.close ();
Dis.close ();
)
Where can the problem, please help me to see, thank you.
Proposed to do with a new thread
UP guitar scattered points in the paste. . .
Check the Client Server received the news? Then should we judge
Send completed on the closure of re-opening reception!
↑ Back
Novice: j2me procedures in the simulator in the development of good, how PDA or mobile phone operation? Also how in the PDA or mobile phone installation j2me runtime environment?
Abstract: Beginner: j2me procedures in the simulator in the development of good, how PDA or mobile phone operation? Also how in the PDA or mobile phone installation j2me runtime environment?
Rt
Jar labeled as packets, in the support of a cell phone or pda java installed on
"Support java phone or pda?"
—————————————-
My personal java pda tops of the execution environment. MIDlet now want to run, but there is no pda MIDlet operating environment can Zhuangshangqu?
> How in the PDA or mobile phone installation j2me runtime environment?
I am afraid that this operating environment to provideæ‰è¡Œtheir mobile phones. Phone will not be like their own PC can be installed as a virtual machine forward.
Of course, we should support java phone or pda can
Phone to support JAVA can, and then can be packaged jar into a real machine.
WTK back after you have downloaded, JAR files can be generated, and then spread through the data line phone. Uploaded to the Internet or using GPRS, CDMA mobile phones to download. Will be used, as long as you phone support JAVA, but attention should be paid to compile settings . MIDLET1.0 or 2.0 machines because some of it is not impossible to implement 1.0 of the 2.0 package.
↑ Back
Phone does not support JAVA, can?
Abstract: mobile phones do not support JAVA, can?
My cell phone does not support JAVA (poor ah, then do not know when to buy, buy now and pay),
I would like to ask about, cell phone manuals do not support, and what measures can be taken to support it? Apart from the motherboard for (oops)
For machines
Apart from the hard way, there will be no soft approach?
Use wtk simulator play, even if the. Even think you can play in the top of the phone.
I would like to know how to not support java java phone support
Do not know ~ ~
Zhenglejian, Our buy a senior, all technical support, what object-oriented, and the support of all the aspects of the language, OK?
You
To write a compiler to the phone huh
Money to buy the support of the ~
The approach should be no special bar
↑ Back
Who knows benq s88 phone keys counterparts?
Abstract: Who knows benq s88 phone keys counterparts?
I am in the process, such as mobile phone nokia test no problem, but click around Ruanjian benqs88 no response, I wrote a special keys testing procedures, keyPressed used to test the value of various buttons and other keys can be measured, but about Ruanjian no response, the phone who know the keys counterparts?
Or what other methods can be used to detect these two keys
But can be detected by CommandListener Ruanjian around, which is why?
There are several possibilities:
1, may not be full-screen, for example, the machine does not screen SE circumstances is not about the two keys, cell phones do not support the three, but he did not think that Oh
1, may not be full-screen, for example, the machine does not screen SE circumstances is not about the keys
Second, you have the procedure itself, I encountered before.
Recommendations carefully examined
1. My program is a full-screen mode, which can be sure.
2. If the program has a problem, then why nokia machine running on all normal.
3. If the machine does not support it, then use addcommand later CommandListener about keys can be used normally, which is why?
That is about the bond no phone keys, can only use the Command, there are proposals to getGameAction () Try
↑ Back
I need a paper, and some give me okay?
Abstract: I need a paper, and some give me okay?
Thank you, I was WTK compiler, but the default JAR-756 operation can not be uploaded to my estimate of a platform issues will need a platform or 756 simulator experience please take a look at what is the case, and the corresponding documentation to the I TU this situation speaks Xie Rong younger brother later reported
WTK is used
SUN download, I have SonyEricsson_K700 platform, a pulled E: / WTK22/wtklib/devices inside can be used,
But Alcatel I did not, I used the default DefultColorPhone WTK fight to JAR-756 upload operation is estimated that they should not have such a platform corresponding months
I MAIL: 14923349@163.com
Qq14923349
I had a few days bundle rumor
What you are saying is not true that the corresponding phone SDK, in fact they were used WTK2.2, but in a different skin only.
Alcatel's mobile phones do not have the specific development package, as long as we can use WTK, so you make sure the procedures which could run or other reasons
I downloaded the game against Alcatel 756 phone JAR packages spread, can run their own in the fight WTK JAR package, reached on the phone, can not run.
I pack my WTK to play the game produced some cell phones, they can run in the K700, and will not need to change procedures, with NB compiled.
Later, I asked to phone group of individuals, he said Alcatel should also have a corresponding platform.
It is not necessary, and I have made before 735, have forgotten what should pay attention to, their only slowly test
Then how do this to drag on in the game I do not know the effect of the mobile phone
Top
↑ Back
Depressed: S60 simulator on the run in the special JB slow, how to resolve?
Abstract: depressed: S60 simulator on the run in the special JB slow, how to resolve?
JB X, in the S40 no problem, install S60 running slow. In the run () test is also very slow.
Do not know how to resolve, is not to download patches, where to download patches?
Please guidance to people, now the work done bad.
System environment is Windows XP
How Meirenhuida ah.
Not machines configured low, my machines are dual-core, 512 MB RAM
Sleep time to set up a short spot
60 simulator out of the slow
That the beta version 0.3.1 with it, very quickly, but less than the estimated online. .
Not previously used to slow and very smooth. Now for the computer to slow, is it does not support dual-core processors?
In the BIOS, can be held for the Hyper-Threading
Threading must clearance? JBILDER2005 with that okay?
I have heard students say that dual-use nuclear slow
↑ Back
Will J2ME operating procedures End simulator running on how the case is closed? Thank you
Abstract: Will J2ME operating procedures End simulator running on how the case is closed? Thank you
Younger brother beginner J2ME, wrote a small program operating procedures, shut down automatically simulator is how matter? Thank you ~ ~
Not in the Chinese directory, the code below:
Package com.j2medev.netbeans;
Import java.io.ByteArrayOutputStream;
Import java.io.IOException;
Import java.io.InputStream;
Import javax.microedition.midlet .*;
Import javax.microedition.lcdui .*;
Public class TurboMidlet extends MIDlet implements CommandListener (
Private Display display = null;
Private Form mainForm = null;
Public static final Command exitCommand = new Command ( "Exit", Command.OK, 1);
/ / StartApp () method is the entrance procedures, or java applications in the main () method
Public void startApp () (
If (display == null) (
Display = Display.getDisplay (this);
)
MainForm = new Form ( "TurboMIDlet");
Image img = getImage ( "JavaPowered-8.png");
MainForm.append (img);
String text = "";
Try (
Text = getText ( "j2medev.txt");
) Catch (IOException ex) (
Text = "text read error";
)
MainForm.append ( "/ n" + text);
MainForm.addCommand (exitCommand);
MainForm.setCommandListener (this);
/ / MainForm set to the screen showed that the current targets
Display.setCurrent (mainForm);
)
Private Image getImage (String name) (
Image img = null;
Try (
/ / Read the picture images directory
Img = Image.createImage ( "/ images /" + name);
) Catch (IOException ex) (
Ex.printStackTrace ();
)
Return img;
)
Private String getText (String name) throws IOException (
/ / Resources documents, such as picture and text, and java-related best way
InputStream is = getClass (). GetResourceAsStream ( "/ text /" + name);
If (is! = Null) (
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
Int ch = 0;
/ / The contents of text files will be written to the memory baos open
While ((ch = is.read ())! = -1) (
Baos.write (ch);
)
/ / Copy the contents of the documents to return to the array of bytes
Byte [] = baos.toByteArray text ();
Baos.close ();
/ / Because includes Chinese, transcoding for UTF-8
Return new String (text, "UTF-8");
Else ()
Return null;
)
)
Public void pauseApp () (
/ / In this case no treatment
)
Public void destroyApp (boolean unconditional) (
/ / In this case no treatment
)
Public void commandAction (Command cmd, Displayable displayable) (
If (cmd == exitCommand) (
DestroyApp (false);
NotifyDestroyed ();
)
)
)
Tools NetBeans eclipse the same, thank you! ! ! !
If (display == null) (
Display = Display.getDisplay (this);
)
Here to judge how ah? Is not here ah
The simulator then you see what is the ah. May be memory problems, may also be the picture, too. You look at the external operation simulator good to bad!
Also read of your subject, I would like to ask is in the process simulator End clearance operation, or in the process of customs clearance operation ah?
Running finished on the closure of the Kazakhstan
"The simulator then you see what is the ah. May be memory problems, may also be the picture, too. You look at the external operation simulator good to bad!" What does that mean ah? How in the external operation simulator? Thank you!
A number of other projects, too, is on the code, the project into NetBeans or eclipse after an operation like this, Operation End automatically closed.
This is the simulator you the right to shut down automatically, look at the exit procedures after what was wrong, may be useful.
External simulator is in the menu you wtk Run MIDP Application options can be loaded *. jad documents, mobile phone operation procedures.
Please check the landlord is "running End shut down automatically" or "no operation at all procedures directly closed."
If it is the "process is not running directly off", I may know why * _ *
Anyway, the error is not running, pop-up on the simulator may be imprisoned for one second! ! !
I QQ: 101022104, thank you all! ! !
"You wtk external simulator is in the menu Run MIDP Application options can be loaded *. jad documents, mobile phone operation procedures." Can run C: / WTK22/apps projects under the A, to the copies of this directory nor to Kazakhstan ~ ~ ~ simply can not afford to run! ! !
I have encountered this problem, as long as the C: / WTK22/apps a directory of extensions. Utf deletion of a document on the line
> Anyway, the error is not running, pop-up on the simulator may be imprisoned for one second! ! !
Evidently, with the landlord in all likelihood I encountered the same problem _ * *
I encountered problems phenomenon is the case, why is the time when running MIDlet, did not pass their exit procedures, but the simulator click the power button directly related to the simulator. Thus, in this MIDlet residue on the simulator. MIDlet running next time, IDE will say "simulator has been installed in a similar MIDlet," and thus refused to implement. The solution was to use OTA settings tools MIDlet unloading.
Buster upstairs, the trouble you can say in detail how and unloading points?
Directly in the simulator is deleted? I deleted the only one "should be in accordance with procedures Yun" (this cut can not), but is not ah ~ ~ ~ ~ is how matter ah?
I use the Sun's Wireless Toolkit 2.2, with Windows 2000, through OTA Provisioning start. You should delete that, the last only "setup application."
However, with a four WTK simulator, which uses the folder is different. You have passed Default Device Selection to set used by the simulator, and then run OTA Provisioning.
If alone is not enough, then I am afraid this is not the reason; p
Not whether the work? Have to change jobs? I find, pay for:
Location: Beijing High JAVA procedures, the development of more than three years experience in JAVA (J2EE, EJB, systems design and analysis)
Contact: e-mail guagua2008@tom.com soon have someone contact you
Run:
Starting emulator in execution mode
Through DefaultColorPhone to run storage root domain name is not correct, please switch to the 'untrusted'
Java.lang.SecurityException: untrusted domain is not configured
At com.sun.midp.security.Permissions.forDomain (+98)
At com.sun.midp.dev.DevMIDletSuiteImpl.create (+39)
At com.sun.midp.dev.DevMIDletSuiteImpl.create (+62)
At com.sun.midp.main.Main.runLocalClass (+20)
At com.sun.midp.main.Main.main (+116)
Execution completed.
15,730 bytecodes executed
0 thread switches
738 classes in the system (including system classes)
Dynamic objects allocated 239 (15,592 bytes)
1 garbage collections (0 bytes collected)
Generation success (total time: 4 seconds)
What is the reason for this wrong?
Thank you all, to find the reasons, my user name is Chinese, it is this reason! ! !
↑ Back
In the simulator through ota installation procedures in the simulator can not run on how the case is /?
Abstract: In the simulator through ota installation procedures in the simulator can not run on how the case is /?
If that
I am in the process of writing their own use of a dialog box LIBRARY (packaged in mydialog.jar),
And through import java.mydialog introduction, I do not know why that is not running
Please expert guidance, thank you
Check whether the path!
How inspections?
Not on the server to provide my own mydialog packets?
The lack of documents or the wrong path?
↑ Back
North Korea would like to MMS, streaming media development, where to find information or books?
Abstract: North Korea would like to MMS, streaming media development, where to find information or books?
I do CP in Shanghai a cell phone game development, the MMS compared drive interest, I do not know where to find information look at the points, or points on books.
Mobile phone games do have a year and a half's time, since 2006 the serious state of survival CP feel bad, difficult to survive.
Mobile policy a few months once the TMD change, the whole of the SP intangible East, the following day not to mention the CP.
Would like to change jobs, and not this piece of the cell phone game.
Please help out at providing information. Thank you
Up
Rely on, and this is also called Dinge? ? ? ? ? ? ? ? ? ? ? ? ? ?
Ah information to the point
Originally J2ME phones here are doing, how can not help Bangniding ah?
Do not do this on the MMS?
Done a year mobile phone games, should be based on good, see next WTK inside example WMAdemo sure you have some help, and then is more, see more write code
Their roof, to the point below the more concrete proposals
SP are doing streaming media. . . . 3 G gambling
For example, do real-time MP3 player, video player ~ ~ need Server format conversion, automatic segmentation, client to control the buffer zone ~ ~
J2ME for the streaming media gentle.
Suggest you google search J2ME stream.
(1). Http://forum.java.sun.com/thread.jspa?threadID=439626
(2). Http://www.getjar.net/products/5763/J2MEStreaming
(3). Http://dev.csdn.net/develop/article/83/83321.shtm
Others see their own MMAPI.
Are there not sell books in this area?
Top of their own
I have not seen any off-the-shelf book to sell it, however, should look at some big names in the mobile phone manufacturer's Web site!
No satisfactory reply is not firmly affixed guitar
^ _ ^
How no one gave me guidance life ah
It seems the landlord did not believe that the introduction of others! Nokia has not read the website? Nokia seen the development of the site?
——————-
> I do in Shanghai, a CP cell phone game development, the MMS compared drive interest, I do not know where to find
> Look at the data points, or points on books.
MMS is, or microsoft media service
If it is the latter, see vlc proposal, the source xine, xine achieve better.
↑ Back
Phone memory allocation problem? ? ?
Abstract: Mobile memory allocation problem? ? ?
Games, old encounter memory problems, I would like to ask the general mobile phones are how to allocate memory, heap ah, ah stack, what a mean, take what can be dynamically allocated memory, or are Duishang Stack on! ! ! Thank you
Stack major repository of local variables, often say that mobile phones are memory heap memory
You can look at the depth Java Virtual Machine or depth embedded Java Virtual Machine
I would like to, do j2me, should be ignored as the underlying technology - j2me structure will not allow themselves to do something about it, unless a j2me own virtual machine.
↑ Back