-
A true newbies problem.
Hey, I'm extremely new to Java, so new that I'd be so bold to say I don't know a single thing about it. This question is more in regards to running a java related program, not creating my own. I have java installed (JDK and JRE), and I have the program I'm looking to run installed. When I click the batch file intended to run my program, up pops command prompt telling me that " 'java' is not recognized as an internal or external command, operable program or batch file". What I managed to take from this is one of two things. Java is not installed properly (I'm not sure how I could have messed this up), or my environmental variables are not properly set up. My C drive, is actually labelled as H:\ instead of C:\, it's just how my computer was set up. I took a quick look at the forums and saw that the way people help are often by writing quick batch files, so if one of you decide to do that for me, keep in mind my C drive is actually H:\. Maybe this could be apart of the problem? I don't know. I can run java based programs from my browser and such... Please help.
ALSO: Perhaps a quick tutorial on how to properly set up my environmental variables? I have a feeling this may be the issue.
Thanks in advance.
-
does seem like an issue with envvars. just located the bin directory of your jre (or even jdk i believe) and set PATH to it. could be H:\Program Files\Sun\Java\bin or something entirely different
-
Your problem is the first one mentioned on Sun's Common Problems (and their Solutions page. You will have to change the drive from what they give in their illustration.
The installation instructions they refer to are here, with the need for the java and javac executables to be on the operating system's PATH discussed in point 4.
The problem/solution page is part of the "Hello World! for Windows" tutorial. This tutorial is in many ways the place to start.
-
And also search on the forum as well. Quite similar problems are discussed several times.