|
javac manual pathing
Here is what I did to make it work.
First... here was my helloworld2.java code
__________________________________________
/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}
___________________________________________
I had my helloworld2.java on my desktop.
My javac app is located at: c:\program files\java\jdk1.6.0_02\bin
Here is the code I used in the command line (typed cmd in my search bar under the start menu (vista) or from "Run" in XP to get command line running)
cd.. until I was at the root of C:
C:> "\Program Files\Java\jdk1.6.0_02\bin\javac" c:\Users\Kevin\Desktop\helloworld2.java
What this line of code does is tells the computer to use the javac program, located in the \Program Files\Java\jdk1.6.0_02\bin\ directory to compile the next item, which is the java script located on my desktop. - helloworld2.java
This should work on vista
This isn't a bandaid. It is normal command line stuff. You can path it differently as stated in the last post, so the application always knows to use the javac program when called, no matter what directory tou are in.
For instance, if you type "notepad" into the command line, in any directory, the application notepad.exe will launch.
I hope this helps.
Last edited by koskow : 08-15-2007 at 09:16 AM.
Reason: pathing spelt wrong in title
|