java 1.5 won't run my apps

Status
Not open for further replies.

ever_thus

Baseband Member
Messages
94
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!");
}
}
 
I always had trouble if I used different filenames and stuff... is it in a file called HelloWorld.java?
 
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.
 
Status
Not open for further replies.
Back
Top Bottom