Hello, I have been programming with the same JDK SE since last semester and now all of a sudden I am getting an exception in "main" with just a print statement. I uninstalled the old then reinstalled a newer version of the JDK SE from sun but I am still getting this exception. I also uninstalled and reinstalled my textpad. I have tested old code and they seem to be compiling and executing fine. What could possibly be the issue with this? Any help is appreciated. It is boggeling my mind that I cant even execute a simple print "Hello"!

public class dog

{

public static void main(String[] args)

{ System.out.println("Hello");


}


}

Recommended Answers

All 5 Replies

Did you check/updated your PATH for Java in system settings?

Did you check/updated your PATH for Java in system settings?

I was able to get it to work but only in the folder my lab assignments are in. If I create a file outside of this it doesnt work. This is strange becasue I never had to do that before. I could creat a program save it to my desktop then compile and it would execute fine. Any idea what it could be? Th path in system settings matches the location in my program files

What operating system you using?
What is the path in your system settings?

What operating system you using?
What is the path in your system settings?

Windows 7 I have 2 paths showing in my Advd settings Enviro Variable
Variable is: QTJAVA Path is:C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
Variable:Classpath Path is:.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip

You want to do development and you do not have proper JDK and PATH??? Read this (doesn't matter it is for Windows XP, steps are more or less same)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.