Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » java 1.5 won't run my apps
Closed Thread
Old 08-03-2005, 07:46 PM   #1 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default java 1.5 won't run my apps

I have several (actually lots) of apps which i wrote under Java 1.4 and they all worked fine. Then I upgraded both my JDK and JRE to 1.5 and a lot of them return:

Exception in thread main: NoClassDefFoundError

I've tried recompiling them under 1.5, but that doesn't help, even when compiling them with -Xlint showed no deprecated methods being used.

I've included a sample Hello World program in case you can catch the errors. The program below returns the above error.

public class HelloWorld {
public static void main(String [] args) {
System.out.println("Hello World!");
}
}
ever_thus is offline  
Old 08-03-2005, 08:31 PM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

I always had trouble if I used different filenames and stuff... is it in a file called HelloWorld.java?
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
Old 08-03-2005, 09:59 PM   #3 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default

Yup. Remember that all the apps ran fine under 1.4.
ever_thus is offline  
Old 08-04-2005, 09:09 AM   #4 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

And they have all the propery import statements correct?
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
Old 08-04-2005, 10:04 AM   #5 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default

Well, most of them do import packages, but the one above doesn't, as you can see, yet still doesn't work. Besides, if the import statement was incorrect javac wouldn't recognise the classes from those packages and would tell me so, but it isn't.
ever_thus is offline  
Old 08-04-2005, 05:15 PM   #6 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

Which means it's a problem with the JRE (Not the JDK)...try re-installing.
Iron_Cross is offline  
Old 08-08-2005, 06:04 AM   #7 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default

Reinstalled. No change.
ever_thus is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On