The Mother Board
Java Compiler

 
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Empyre
Brown Belt
Brown Belt


Joined: 13 Jun 2004
Posts: 354
Location: Moscow, ID

PostPosted: Thu Dec 16, 2010 10:09 pm    Post subject: Java Compiler Reply with quote

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
View user's profile Send private message
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36699
Location: Netherlands, Breda

PostPosted: Fri Dec 17, 2010 12:08 am    Post subject: Reply with quote

do you have Java installed?
http://www.java.com/en/download/help/testvm.xml

java programming:
http://www.oracle.com/technetwork/topics/newtojava/overview/index.html
_________________
We hate rut, but we fear change.



System error, strike any user to continue...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Roach412
Black Belt 2nd Degree
Black Belt 2nd Degree


Joined: 09 Aug 2004
Posts: 2534
Location: Milwaukee - Wisconsin

PostPosted: Fri Dec 17, 2010 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
Empyre
Brown Belt
Brown Belt


Joined: 13 Jun 2004
Posts: 354
Location: Moscow, ID

PostPosted: Fri Dec 17, 2010 11:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group