943,917 Members | Top Members by Rank

You are currently viewing page 1 of this multi-page discussion thread
Oct 16th, 2008
0

S60 java

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pablo25 is offline Offline
8 posts
since Nov 2007
Oct 16th, 2008
-1

Re: S60 java

Click to Expand / Collapse  Quote originally posted by pablo25 ...
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
Click to Expand / Collapse  Quote originally posted by pablo25 ...
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
Click to Expand / Collapse  Quote originally posted by pablo25 ...
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
Click to Expand / Collapse  Quote originally posted by pablo25 ...
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]
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Oct 16th, 2008
0

Re: S60 java

is your classpath set correctly?
Reputation Points: 37
Solved Threads: 5
Light Poster
brianlevine is offline Offline
36 posts
since Oct 2008
Oct 16th, 2008
-1

Re: S60 java

is your classpath set correctly?
Why do you think there is a problem with classpath? How did you come up with this conclusion?
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Oct 16th, 2008
0

Re: S60 java

Click to Expand / Collapse  Quote originally posted by peter_budo ...
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.
Reputation Points: 37
Solved Threads: 5
Light Poster
brianlevine is offline Offline
36 posts
since Oct 2008
Oct 16th, 2008
0

Re: S60 java

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!

/* Copyright © 2006 Nokia. */
package com.nokia.midp.examples.lcdui.helloworldplus;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * This class illustrates the implementation of a simple MIDlet that initially
 * displays a "HelloWorld" message to the screen and allows the user to edit
 * that message.
 * <p>
 * This class extends the class javax.microedition.midlet.MIDlet. It
 * creates and maintains references to a TextScreen object and a
 * TextEditor object.
 * <p>
 * Note that the HelloWorldMIDlet class has no constructor. MIDlet
 * contructors are not required to do anything because intializing of the
 * object is better performed in the startApp() method.
 */
public class HelloWorldPlusMIDlet extends MIDlet {

    /** Displays the message on the screen. */
    private TextScreen textScreen;

    /** Allows the user to edit the message displayed. */
    private TextEditor textEditor;

    /** A generic way of indicating whether startApp() has previously been called. */
    private Display display;

    /**
     * Creates an instance of TextScreen if one has not already been
     * created and tells the framework to set this instance of TextScreen
     * as the current screen.
     */
    public void startApp() {
        if (display == null) {
            // First time we've been called.
            display=Display.getDisplay(this);
            textScreen = new TextScreen(this, "Hello World!");
        }
        display.setCurrent(textScreen);
    }

    /**
     * This must be defined but no implementation is required because the MIDlet
     * only responds to user interaction.
     */
    public void pauseApp() {
    }

    /**
     * No further implementation is required because the MIDlet holds no
     * resources that require releasing.
     *
     * @param unconditional is ignored.
     */
    public void destroyApp(boolean unconditional) {
    }

    /**
     * A convenience method for exiting.
     */
    public void exitRequested(){
        destroyApp(false);

        /*
         * notifyDestroyed() tells the scheduler that this MIDlet is now in a
         * destroyed state and is ready for disposal.
         */
        notifyDestroyed();
    }

    /**
     * Implements the transition from the TextEditor screen to the TextScreen screen.
     *
     * @param string is the new text to be displayed. It is null if the text is
     * not to be changed.
     */
    public void textEditorDone(String string) {
        if (string != null) {
            textScreen.setCurrentText(string);
        }
        display.setCurrent(textScreen);
    }

    /**
     * Implements the transition from the TextScreen screen to the TextEditor screen.
     */
    public void textEditorRequested() {
        String currentText = textScreen.getCurrentText();
        if (textEditor == null) {
            textEditor = new TextEditor(this, currentText);
        } else {
            textEditor.setText(currentText);
        }
        display.setCurrent(textEditor);
    }
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pablo25 is offline Offline
8 posts
since Nov 2007
Oct 16th, 2008
-1

Re: S60 java

I'm just downloading Nokia's SDK for S60 as I'm not familiar with it and I will let you know the outcome
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Oct 16th, 2008
-1

Re: S60 java

What IDE you using NetBEans, Eclipse?
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Oct 16th, 2008
0

Re: S60 java

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pablo25 is offline Offline
8 posts
since Nov 2007
Oct 17th, 2008
-1

Re: S60 java

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
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Mobile Development Forum Timeline: Problem stopping thread (I think)
Next Thread in Mobile Development Forum Timeline: Java lang exception thrown





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC