my dog learned polymorphism*
The moose likes IDEs, Version Control and other tools and the fly likes please help running programs created in jsdk 1.4 into jsdk 1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "please help running programs created in jsdk 1.4 into jsdk 1.6 " Watch "please help running programs created in jsdk 1.4 into jsdk 1.6 " New topic
Author

please help running programs created in jsdk 1.4 into jsdk 1.6

gener de vera
Greenhorn

Joined: Nov 30, 2009
Posts: 4
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
Marshal

Joined: Mar 22, 2005
Posts: 41046
    
  43
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?


Ping & DNS - my free Android networking tools app
gener de vera
Greenhorn

Joined: Nov 30, 2009
Posts: 4
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: 41046
    
  43
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
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: 41046
    
  43
Well, I don't know how JPadPro works, but it's definitely an IDE configuration issue, not a Java 6 issue.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

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 ?


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37891
    
  22
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
Thanks everyone for the reply. I'll try to look into the IDE options coz I can't still work it out.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

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

Joined: Feb 22, 2002
Posts: 7
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.
 
 
subject: please help running programs created in jsdk 1.4 into jsdk 1.6
 
Similar Threads
Head First Servlets & JSP Beer Advisor App.
Tomcat and JSDK
open an application from a menu
Why should the URL have /servlet/
JSDK...