×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    3

    Post problem with classpath

    OK, I've been programming for years now, so this is embarassing for me to have to ask.
    I made a midlet program in Eclipse, but now I want to use command line to create a signed jar. But I can't seem to get the classpath correct. It's driving me crazy!

    here's my command:

    Code:
    U:\dev\nokia\MobileControlLite\deployed\S40_5th_Edition_SDK>java -jar MobileControlLite.jar -addcert -alias deleted -keystore deleted -storepass deleted -inputjad MobileControlLite.jad
     -outputjad 0479739838.jad -classpath C:\Java_ME_platform_SDK_3.0\lib;C:\Nokia\Devices\S40_SDK_3rd_Edition_Feature_Pack_2\lib;C:\Nokia\Devices\Nokia_Prototype_SDK_4_0\lib;C:\S60\devices\S60_5th_Edition_SDK_v1.0\lib
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/microedition/lcdui/CommandListener
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(Unknown Source)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$000(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: javax.microedition.lcdui.CommandListener
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 12 more
    Could not find the main class: com.eurotronics.MobileControlLite.ControlApp. Program will exit.
    (Oh yeah, 'deleted' is indeed something other than what it says :-) )

    I know CommandListener class is included in midp_2.0.jar which is located in the first addition to the classpath and also in midp20.jar which is located in the last folder.

    What am I not seeing ?

    Damn, feel like a total noob here ...

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: problem with classpath

    java -jar MobileControlLite.jar
    Here you are trying to execute MobileControlLite.jar and as its a midlet it can't run on console, you need an emulator.

    For Signing - It should be java -jar JADTool.jar -addcert -alias deleted -keystore deleted -storepass deleted -inputjad MobileControlLite.jad

    Refer to - http://java.sun.com/javame/reference...l/jadtool.html
    Thanks,
    Ekta

Similar Threads

  1. set a classpath
    By yatibawri in forum Mobile Java General
    Replies: 8
    Last Post: 2010-03-04, 07:54
  2. How to set classpath
    By somanna in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-10-15, 07:29
  3. Classpath
    By Jonipoi in forum Mobile Java General
    Replies: 0
    Last Post: 2005-10-28, 14:55
  4. Problem in defining a CLASSPATH in Symbian SDK for Nokia 9210
    By potro in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-05-03, 16:45
  5. Crystal classpath
    By nkn_motoko in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2001-11-06, 21:03

Posting Permissions

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