Discussion Board

Results 1 to 6 of 6
  1. #1
    Super Contributor
    Join Date
    Mar 2003

    noClassDefFoundError Hello

    I have seen posts from other people with the same problem but no answers have been posted so far. So I am reposting and hopefully some Nokia or Symbian support people ever read this message board, probably not.

    I installed the Symbian SDK for Personal Java for the Nokia Communicator on my Windows XP. Btw, the installation failed twice because it couldn't execute a remote procedure call during
    the installation (I guess some Symbian server was down) - that's ridiculous, Symbian should rethink their installation strategy, seriously.
    The third time it installed fine and now I am trying to run the Hello World example that comes with the SDK.
    That's where I get java.lang.noClassDefFoundError
    my EPOCROOT path is \Symbian\6.0\NokiaJava as it should be. Apparently, EPOCROOT\erj gets mapped to the J: drive, which is supposedly the virtual path for the emulator, so that a directory Hello created at EPOCROOT\erj can be addressed with J:/Hello or possibly J:\Hello, I tried both for the heck of it.
    So I copied the Hello.java from Symbian's QuickStart manual and compiled it. Then I ran:
    c:\Symbian\6.0\NokiaJava\Epoc32\Release\wins\urel\pjava -cp J:/Hello Hello
    with the result:
    java.lang.NoClassDefFoundError Hello

    I also tried
    pjava -v -classpath
    "J:/lib/classes.zip;J:/Hello" Hello

    and all the java classes in classes.zip get loaded, but it still doesn't find the Hello.class

    I have seen two other posts describing the same problem.

    Posted by A. Wallner, aw@webradios.com
    on April 25, 2002 at 21:08

  2. #2
    Super Contributor
    Join Date
    Mar 2003

    RE: noClassDefFoundError Hello

    Posted by Alexander Hariyanto, alexander.hariyanto@sanur-online.com
    on April 30, 2002 at 13:31

    Hi, there

    I've experienced the same problem with you, but I have managed to make it work.

    Have you compile your .java file ? It should become two .class file in your folder

    then try again
    c:\Symbian\6.0\NokiaJava\Epoc32\Release\wins\urel\pjava -cp J:\Hello Hello

    It should work.
    If the emulator does show up, and nothing happen, try to add these lines in the main function:

    { Thread.sleep(60000);
    } catch(InterruptedException ie) { }
    Hello hi = new Hello();

  3. #3
    Registered User
    Join Date
    Mar 2003

    RE: noClassDefFoundError Hello

    i have encountered the same problem, and yes, nobody seems to know why it's like this, not even nokia. my os is win xp, and my epocroot is at c:\programs\symbian\6.0\nokiajava. i have also tried it with the examples, specifically blackbook. i tried to open it from the emulator but it crashes. the emulator interface appears but closes immediately. the message is that there was an "exception in thread 'main' java.lang.NoClassDefFoundError: BlackBook", or as in the case of the hello ap, "exception in thread 'main' java.lang.NoClassDefFoundError: Hello".

    what on earth is happening?

    i have compiled the source files and i have the corresponding .class files in the erj\Hello directory.

  4. #4
    Registered User
    Join Date
    Mar 2003

    RE: noClassDefFoundError Hello

    I had this problem and I realized that using j2sdk1.4.1_01/bin/javac to compile the *.java files was generating byte codes for a different jvm. When I added -target 1.1 (javac -target 1.1) to the command it worked. Now I have a different problem. :(

  5. #5
    Registered User
    Join Date
    Jun 2003

    Use SDK 1.1.8 and the right path

    I had exactly the same problem, using the jdk-1_4_1_03.

    Then I removed this jdk and installed the sdk 1.1.8 (download at http://java.sun.com/products/archive/index.html).

    And it's also important that you put your .class files in the right subfolder of apps:
    => put the Helloworld.class directly into this folder

    After standart installation the default classpath using wildcards is:

    => j:/ [the drive of the emulator]

    So if you want to start the Helloworld-Program just say:
    pjava -cp j:/system/apps/Helloworld Helloworld

    Now it should work!

    Last edited by peterammel; 2003-06-14 at 12:07.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Lahore, Pakistan
    Make sure that you set the following environment variable:

    If it points to lets say "c:\Symbian\6.0\NokiaJava\erj\"

    Then you should keep your class files or jar file in that folder. so it will become


    Now you run the emulator like this:
    pjava -cp j:\Hello\helloapp.jar Hello

    Thats all.
    The key is to match the path carefully. The emulator will find your application here <_epoc_drive_j>\Hello\Hello.class

    Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts