Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help running programs created in jsdk 1.4 into jsdk 1.6

 
gener de vera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

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?
 
gener de vera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I don't know how JPadPro works, but it's definitely an IDE configuration issue, not a Java 6 issue.
 
salvin francis
Bartender
Posts: 1309
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont knw how jpadpro works too,
but the error sounds like the jvm is unable to find main class,

are you sure the classpath is properly set ?
 
Campbell Ritchie
Sheriff
Pie
Posts: 50270
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone for the reply. I'll try to look into the IDE options coz I can't still work it out.
 
salvin francis
Bartender
Posts: 1309
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
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

just thought of sharing...
 
Michael Mathewson
Greenhorn
Posts: 7
Eclipse IDE Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic