This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have created programs in jsdk1.4. Compiling and running the applications work fine. But when I upgraded to jsdk1.6 running the applications became a problem. The noclassdeffound error occurs. I am using JPadpro as my IDE and have set the required path for the jsdk.
No classes have ever been removed from JSE, so whatever code worked with Java 1.4 should work with Java 6. What error message are you getting, exactly?
This is the error that comes out when I run the application in jdk1.6.
Exception in thread "main" java.lang.NoClassDefFoundError: frame
: Frametest)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:61
at java.security.SecureClassLoader.defineClass(SecureCla
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.ja
at java.net.URLClassLoader.access$000(URLClassLoader.jav
at java.net.URLClassLoader$1.run(URLClassLoader.java:195
at java.security.AccessController.doPrivileged(Native Me
at java.net.URLClassLoader.findClass(URLClassLoader.java
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.j
Could not find the main class: frametest. Program will exit.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35443
9
posted
0
What command are you entering on the command line to run the program? Is the class "frametest" in the current directory, or are you using the "-cp" switch to specify the classpath where the JRE should look to find it?
gener de vera
Greenhorn
Joined: Nov 30, 2009
Posts: 4
posted
0
I am using the JPadPro as my IDE, what I did is simply changed the path of the jdk to the location of jdk1.6 as what I did with jdk1.4. No other options were changed but this couldn't run the applications. However when I revert back to jdk1.4, running the application doesn't generate the error.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35443
9
posted
0
Well, I don't know how JPadPro works, but it's definitely an IDE configuration issue, not a Java 6 issue.
salvin francis wrote:are you sure the classpath is properly set ?
Beware . . . you are usually better off with no classpath at all. If you do have a classpath, then simply add .: (not Windows) or .; (DOS/Windows) at its beginning.
If this is an IDE issue, then this thread should move to the IDEs forum.
gener de vera
Greenhorn
Joined: Nov 30, 2009
Posts: 4
posted
0
Thanks everyone for the reply. I'll try to look into the IDE options coz I can't still work it out.
salvin francis wrote:are you sure the classpath is properly set ?
Beware . . . you are usually better off with no classpath at all. If you do have a classpath, then simply add .: (not Windows) or .; (DOS/Windows) at its beginning.
If this is an IDE issue, then this thread should move to the IDEs forum.
hmm
this is what i mostly do:
considering java is indeed installed at that location
the %classpath% trick is good since it does not alter existing classpath
Don't know if you ever figured this one out but its a version compatibility issue with running 1.4 apps while having 1.6.0_15 --> 1.6.0_17 installed. The latest version 1.6.0_18 works fine with 1.4 apps.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: please help running programs created in jsdk 1.4 into jsdk 1.6