Results 1 to 5 of 5
Thread: Javac Problems
- 12-16-2011, 07:28 PM #1
Unexperienced
- Join Date
- Dec 2011
- Location
- United Kingdom
- Posts
- 2
- Rep Power
- 0
Javac Problems
So I'm very new to Java and I only just got a book on it today,
Javac -version comes up with
'Javac' is not recognized as an internal or external command,
operable program or batch file.
The fact I have a 32-bit Operating System and the only choices were x64 and x86, So I followed the book and took x86 whether this is the cause of the
problem I have no idea.
I've set the PATH and CLASSPATH to what I think they should be, but i have also went into Javac directory and tried opening javac.exe and it opens a
command prompt and closes straight away.
If you need anymore information please ask and explain how I can gain it.
Thank you.
- 12-16-2011, 07:35 PM #2
Re: Javac Problems
Where is the javac.exe file?
Did you add the path to the folder containing the javac.exe file to the OS's PATH environment variable?
- 12-16-2011, 07:40 PM #3
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 17
Re: Javac Problems
A good place to start is the simple step by step instructions on the Hello World page of Oracle's Tutorial.
The problem you mention is the first on their list of common problems. They link to notes on how you set the path in Windows.
Note the comment in the setting the path instructions that the new path only applies in command windows opened after you make the change. Also javac.exe won't do much if you double click its icon in WindowsExplorer - it's not supposed to. Finally the best thing to do with the CLASSPATH environment variable is nothing. And if it does have a value already, ignore it. The classpath can always, and unambiguously, be set when you run javac.exe (or the other executables).
- 12-16-2011, 10:43 PM #4
Unexperienced
- Join Date
- Dec 2011
- Location
- United Kingdom
- Posts
- 2
- Rep Power
- 0
Re: Javac Problems
Thank you pbrock I think that Hello World along with the book well help me on my journey a lot :)
And I made a school boy error I've been over it several times checking but just forgot to put ; in. Feeling a tad silly now!
Thank you very much :D
- 12-16-2011, 11:02 PM #5
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 17
Similar Threads
-
help with javac
By copy you in forum New To JavaReplies: 8Last Post: 09-18-2011, 09:54 PM -
JMF works fine with javac BUT same code has problems with NetBeans 6.9.1
By WACman in forum NetBeansReplies: 1Last Post: 11-03-2010, 09:49 AM -
Javac Problems
By franzwarning in forum New To JavaReplies: 4Last Post: 10-28-2010, 06:25 AM -
Problems with javac
By gkoef in forum New To JavaReplies: 14Last Post: 09-07-2010, 11:17 AM -
javac DOS
By rdunne in forum New To JavaReplies: 3Last Post: 01-01-2008, 12:49 PM
Bookmarks