This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes I am having problem while deploying and running my J2ME game on Nokia 3510 phone Plz Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "I am having problem while deploying and running my J2ME game on Nokia 3510 phone Plz " Watch "I am having problem while deploying and running my J2ME game on Nokia 3510 phone Plz " New topic
Author

I am having problem while deploying and running my J2ME game on Nokia 3510 phone Plz

Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
Hello All,
I have developed a game in J2ME when i run it on J2ME Wireless Toolkit Emulator its works fine but when i deploy it on Nokia 3510 or use Nokia Developer's Suit 2.0 Emulator then i get "Application Error" stating that java/lang/ClassNotFoundException xyzclass. I am using Oxygen Phone Manager to upload the MIDlet on phone and i used Sun's J2ME Wireless Toolkit for development. What could be the problem ? Please Help me.


Satish Kore
"Flex 3 with Java" @ packtpub.com and amazon.com
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
1. Sun WTK conforms to MIDP v2 while Nokia 3510 (and its emulator) conforms to MIDP v1. Make sure that you only use MIDP v1 API in your app.
2. I have not used the provisioning progra, you described. But it is always a good idea to check the JAD file and see if it refers to the JAR file at the right absolute URL. Nokia phone will give that "classNotFound" error if it cannot find the JAR file.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
Thanx for your reply,
I have overcome that problem but now i am facing very strange problem like when i upload it on Nokia 3510 it is givin me "Application Error" "NoSuchMethod Found getWidth()I" i dont know why i am experiencing this problem i have just used myCanvas.getWidth() and myCanvas.getHieght() to find out screen size.
Do i have to use something else instade of getWidth() and getHeight().
Please reply ASAP coz this is very important to me.
Thanking you
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Maybe this one would help:
http://www.coderanch.com/t/227722/JME/Mobile/Error-Nokia-phone
Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
I have gone thru given link but it does not solve the question.
One comment was there compiling your J2ME classes using Java 1.2 (javac.exe) but how do i do that using Sun's WTK KToolBar ?
And if this problem is with Nokia Emulators or Nokia Phones then can i use Nokia's FullCanvas Class instead of Canvas Class? Then how do I set a class path to Nokia UI API (classes.zip found in Nokia Dev Suit for J2ME) in Sun's WTK ?
Thank you for patience coz i have asked too many questions
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Originally posted by Satish Kore:
One comment was there compiling your J2ME classes using Java 1.2 (javac.exe) but how do i do that using Sun's WTK KToolBar ?

You cannot. Have to use command line tools or ANT. But I do not think this the problem. The problem is most likely to be obfuscator. Do not obfuscate your JAR.
And if this problem is with Nokia Emulators or Nokia Phones then can i use Nokia's FullCanvas Class instead of Canvas Class? Then how do I set a class path to Nokia UI API (classes.zip found in Nokia Dev Suit for J2ME) in Sun's WTK ?

The class file in Nokia SDK is typically in
C:\Nokia\Devices\Nokia-XXXX-SDK_v1.0\lib\classes.zip
Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
Hi Michael,
Thank you for your reply,
I am now using FullCanvas class for my game development but i am experiencing different problem now it is giving error stating that setCommandListener(this) throws exception "java.lang.IllegalStateException" i tried to catch it but no use.
------ My code ------
public scoreCanvas()
{
try
{
setCommandListener(this);
addCommand(cmdBack);
}
catch (java.lang.IllegalStateException ee)
{
System.out.println("EXE-- "+ee);
}
}
------- End -----------
What could be the problem??
One more thing i wanted to ask that is screen size problem with different Nokia phones.
Can you please gimme some useful links where i can find the solution for this problem.
Thanking you
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Please check the NokiaUI javadoc, it explicitly said that Commands are not supported in FullCanvas. The addCommand and setCommanLisener methods would throw the error you mentioned.
You can check the nokia device matrix for screen sizes:
http://www.forum.nokia.com/devices?
 
wood burning stoves
 
subject: I am having problem while deploying and running my J2ME game on Nokia 3510 phone Plz