• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

please help running programs created in jsdk 1.4 into jsdk 1.6

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 7
Eclipse IDE Firefox Browser Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic