S60 java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2007
Posts: 8
Reputation: pablo25 is an unknown quantity at this point 
Solved Threads: 0
pablo25 pablo25 is offline Offline
Newbie Poster

S60 java

 
0
  #1
Oct 16th, 2008
Hi I was hoping somebody could help me
I have installed the s60(nokia) java on my laptop and i am trying to get the helloworld program running. The javac and preverify are working. But when i go to the directory for the program helloworldplus i am getting 32 errors when i compile!




here is an example... please help i have been trying for 4 days to get going with this!

C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:35: cannot find symbol
symbol : variable Command
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
new Command("Cancel", Command.CANCEL, COMMAND_PRIORITY);
^
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:59: cannot find symbol
symbol : class TextField
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
textField = new TextField("Edit message",
^
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:62: cannot find symbol
symbol : variable TextField
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
TextField.ANY);
^
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:68: cannot find symbol
symbol : method setCommandListener(com.nokia.midp.examples.lcdui.helloworldplus
.TextEditor)
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
setCommandListener(this);
^
37 errors
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,197
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: S60 java

 
-1
  #2
Oct 16th, 2008
Originally Posted by pablo25 View Post
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:35: cannot find symbol
symbol : variable Command
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
new Command("Cancel", Command.CANCEL, COMMAND_PRIORITY);
^
The priority is an integer usually in the range of 0-4, that is max what I seen. I tried to look up max value but couldn't find it. Lower number stand for higher priority and higher number for lower priority
Originally Posted by pablo25 View Post
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:59: cannot find symbol
symbol : class TextField
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
textField = new TextField("Edit message",
^
This look like missing import statement import javax.microedition.lcdui.TextField; , or can be wrong spelling in some cases
Originally Posted by pablo25 View Post
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:62: cannot find symbol
symbol : variable TextField
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
TextField.ANY);
^
Missing import
Originally Posted by pablo25 View Post
C:\s60\devices\s60_3rd_MIDP_SDK_FP1\s60examples\helloworldplus\src\com\nokia\mid
p\examples\lcdui\helloworldplus\TextEditor.java:68: cannot find symbol
symbol : method setCommandListener(com.nokia.midp.examples.lcdui.helloworldplus
.TextEditor)
location: class com.nokia.midp.examples.lcdui.helloworldplus.TextEditor
setCommandListener(this);
^
37 errors
Difficult to say, can be related to any above errors. If you have problem with the code you can post it bellow I will have look at it. Please use code tags in that case [code]YOUR CODE[/code]
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 34
Reputation: brianlevine is an unknown quantity at this point 
Solved Threads: 5
brianlevine brianlevine is offline Offline
Light Poster

Re: S60 java

 
0
  #3
Oct 16th, 2008
is your classpath set correctly?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,197
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: S60 java

 
-1
  #4
Oct 16th, 2008
Originally Posted by brianlevine View Post
is your classpath set correctly?
Why do you think there is a problem with classpath? How did you come up with this conclusion?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 34
Reputation: brianlevine is an unknown quantity at this point 
Solved Threads: 5
brianlevine brianlevine is offline Offline
Light Poster

Re: S60 java

 
0
  #5
Oct 16th, 2008
Originally Posted by peter_budo View Post
Why do you think there is a problem with classpath? How did you come up with this conclusion?
Whoops, I didn't see your post, before I posted mine. Looks like you got it right.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 8
Reputation: pablo25 is an unknown quantity at this point 
Solved Threads: 0
pablo25 pablo25 is offline Offline
Newbie Poster

Re: S60 java

 
0
  #6
Oct 16th, 2008
Firstly thanks for the help guys...
This program is one of the default ones that came with s60 and i was just following the instructions to get the thing working, is there something else maybe i have to download to get the mobile stuff working

with 37 errors in the code it feels like i need something else...as opposed to there being actually 37 errors i don't think there is!

  1. /* Copyright © 2006 Nokia. */
  2. package com.nokia.midp.examples.lcdui.helloworldplus;
  3.  
  4. import javax.microedition.midlet.*;
  5. import javax.microedition.lcdui.*;
  6.  
  7. /**
  8.  * This class illustrates the implementation of a simple MIDlet that initially
  9.  * displays a "HelloWorld" message to the screen and allows the user to edit
  10.  * that message.
  11.  * <p>
  12.  * This class extends the class javax.microedition.midlet.MIDlet. It
  13.  * creates and maintains references to a TextScreen object and a
  14.  * TextEditor object.
  15.  * <p>
  16.  * Note that the HelloWorldMIDlet class has no constructor. MIDlet
  17.  * contructors are not required to do anything because intializing of the
  18.  * object is better performed in the startApp() method.
  19.  */
  20. public class HelloWorldPlusMIDlet extends MIDlet {
  21.  
  22. /** Displays the message on the screen. */
  23. private TextScreen textScreen;
  24.  
  25. /** Allows the user to edit the message displayed. */
  26. private TextEditor textEditor;
  27.  
  28. /** A generic way of indicating whether startApp() has previously been called. */
  29. private Display display;
  30.  
  31. /**
  32.   * Creates an instance of TextScreen if one has not already been
  33.   * created and tells the framework to set this instance of TextScreen
  34.   * as the current screen.
  35.   */
  36. public void startApp() {
  37. if (display == null) {
  38. // First time we've been called.
  39. display=Display.getDisplay(this);
  40. textScreen = new TextScreen(this, "Hello World!");
  41. }
  42. display.setCurrent(textScreen);
  43. }
  44.  
  45. /**
  46.   * This must be defined but no implementation is required because the MIDlet
  47.   * only responds to user interaction.
  48.   */
  49. public void pauseApp() {
  50. }
  51.  
  52. /**
  53.   * No further implementation is required because the MIDlet holds no
  54.   * resources that require releasing.
  55.   *
  56.   * @param unconditional is ignored.
  57.   */
  58. public void destroyApp(boolean unconditional) {
  59. }
  60.  
  61. /**
  62.   * A convenience method for exiting.
  63.   */
  64. public void exitRequested(){
  65. destroyApp(false);
  66.  
  67. /*
  68.   * notifyDestroyed() tells the scheduler that this MIDlet is now in a
  69.   * destroyed state and is ready for disposal.
  70.   */
  71. notifyDestroyed();
  72. }
  73.  
  74. /**
  75.   * Implements the transition from the TextEditor screen to the TextScreen screen.
  76.   *
  77.   * @param string is the new text to be displayed. It is null if the text is
  78.   * not to be changed.
  79.   */
  80. public void textEditorDone(String string) {
  81. if (string != null) {
  82. textScreen.setCurrentText(string);
  83. }
  84. display.setCurrent(textScreen);
  85. }
  86.  
  87. /**
  88.   * Implements the transition from the TextScreen screen to the TextEditor screen.
  89.   */
  90. public void textEditorRequested() {
  91. String currentText = textScreen.getCurrentText();
  92. if (textEditor == null) {
  93. textEditor = new TextEditor(this, currentText);
  94. } else {
  95. textEditor.setText(currentText);
  96. }
  97. display.setCurrent(textEditor);
  98. }
  99. }
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,197
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: S60 java

 
-1
  #7
Oct 16th, 2008
I'm just downloading Nokia's SDK for S60 as I'm not familiar with it and I will let you know the outcome
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,197
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: S60 java

 
-1
  #8
Oct 16th, 2008
What IDE you using NetBEans, Eclipse?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 8
Reputation: pablo25 is an unknown quantity at this point 
Solved Threads: 0
pablo25 pablo25 is offline Offline
Newbie Poster

Re: S60 java

 
0
  #9
Oct 16th, 2008
Hey sorry for not getting back sooner peter, i was doing this from the command line but i have eclipse installed.. its i haven't installed the eclipse plugin yet. just wanted to get it working first
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,197
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 485
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: S60 java

 
-1
  #10
Oct 17th, 2008
I do not have Eclipse I mainly use NetBeans or IntelliJ IDEA. I tested this "helloworldplus", there is NetBeans folder avaialable. Then inside I had to go project Properties and add some optional packages. I haven't got such problem when adding Sony Ericsson instance
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC