| View previous topic :: View next topic |
| Author |
Message |
Empyre Brown Belt

Joined: 13 Jun 2004 Posts: 354 Location: Moscow, ID
|
Posted: Thu Dec 16, 2010 10:09 pm Post subject: Java Compiler |
|
|
Hello all. This is an extremely basic question but here is what I would like to do:
I have a java source code file: Javatest.java
I want to be able to compile it, and attempt to run it, ie: javac Javatest.java
followed by java Javatest
Do I use command prompt for this? Every time I try and compile the test code, It says the command is not found. And I've downloaded the developer kit from Sun Microsystems, and JRE as well (current versions). How can I get this to work? I know this is a really basic question but I hope someone on the forum can help me out!
Thanks so much mobo.org! Always helpful! |
|
| Back to top |
|
 |
evasive Mobo-fu Master


Joined: 06 May 2001 Posts: 36479 Location: Netherlands, Breda
|
|
| Back to top |
|
 |
Roach412 Black Belt 2nd Degree

Joined: 09 Aug 2004 Posts: 2477 Location: Milwaukee - Wisconsin
|
Posted: Fri Dec 17, 2010 2:28 pm Post subject: |
|
|
you would need to make sure that you have your PATH set, it sounds like you're trying to run JAVA commands where they don't reside.
check out this rundown:
http://www.apl.jhu.edu/~hall/java/beginner/settingup.html
| Quote: | | If you don't set the PATH variable, you need to specify the full path to the executable every time you run it |
-Roach _________________ Lian Li Lancool First Knight Series PC-K59W
Intel Core i7-960 Bloomfield 3.2GHz
EVGA X58 FTW3 132-GT-E768-TR
EVGA GTX 560ti FPB
G.SKILL Ripjaws Series 12GB (3 x 4GB)
Crucial M4 128gb SATAIII SSD
Corsair Professional Series HX850 PSU |
|
| Back to top |
|
 |
Empyre Brown Belt

Joined: 13 Jun 2004 Posts: 354 Location: Moscow, ID
|
Posted: Fri Dec 17, 2010 11:34 pm Post subject: |
|
|
| Thank you for all of the help! I actually figured it out earlier today after checking out the links that evasive posted that I need to set the PATH correctly to the JDK folder. After that it worked like a charm. Again Mobo.org to the rescue, thank you evasive and Roach. I greatly appreciate your help. |
|
| Back to top |
|
 |
|