I installed the Java software onto my computer, along with the NetBeans IDE. I then tried to set the environment variable correctly (though still haveing problems with that). Now when I use the Command Prompt to compile the program I still get an error message. Any suggestions?
Leave NetBeans alone until you are used to using the command line. IDES hide the use of command-line arguments, and also there is enough to learn with Java alone, without having to learn the IDE too. Learn the IDE later.
What are you trying to compile and what sort of error are you getting? Have you found the Java Tutorials? There is a page about "common problems." Please tell us what the error messages say; we usually recognise them, but can't help without that information.
Joined: Oct 05, 2008
I'm not concerned about the IDE but would definitely like to the program to compile and run with Command Prompt at least. Here's the message I get when I run Javac on a program:
'Javac' is not recognized as an internal or external command, operable program or batch file.
Joined: Oct 13, 2005
That tells me two things:
1: You are using Windows; Linux gives a different error message.
2: You haven't got your PATH set up correctly.
Everybody gets that problem. That is why it is the first problem quoted in the "problems" link I sent you. Follow the instructions in that, and follow the link to "setting the PATH permanently." Make sure to set it permanently, and don't believe them when they say it's "optional." It will be a lot easier if you remember where you installed Java; that will be the same directory as you told NetBeans when it asked about JAVA_HOME or similar. The PATH entry starts with the drive letter (usually C) and ends with bin.
You don't need lots in your CLASSPATH, but you might as well check it when you set the PATH. It should have .; or ;. or ;.; in it somewhere, where the . means "current directory." You usually have to change your PATH and don't usually have to change your CLASSPATH. Add this link which tells you about setting the PATH.[/edit] [ November 05, 2008: Message edited by: Campbell Ritchie ]
Joined: Oct 13, 2005
By the way, it's not Javac but javac. I did try Javac on my Windows box and didn't get an error, so I don't think it is the capital J causing the problems.