• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Author
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Satish Kore
Author
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe this one would help:
https://coderanch.com/t/227722/JME/Mobile/Error-Nokia-phone
 
Satish Kore
Author
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic