Jump to content

New in programming Java, got problems Compiling


Baxtex
 Share

Recommended Posts

So i have begun to learn Java a little bit, but i can't get my programs to compile. I have set Both my Path and Path class to C:\Program Files (x86)\Java\jdk1.6.0_22\binBut I just get the message: "'javac' is not recognized as an internal or external command, operable program or batch file" when i type this: D:/stuff>javac HelloWorld.javaI also downloaded a ide, Eclipse after i had chnaged the path, but when i press "run" or "debug" nothing happens. What should i do? I'm so pissed of right know, sure i'd know Java maybe would be an challenge, but i can't even get the code to compile.BTW i don't have any javac.exe file on my computer either, even though i have installed JDK.

Edited by Baxtex
Link to comment
Share on other sites

javac.exe should be in C:\Program Files (x86)\Java\jdk1.6.0_22\bin (that's how it finds it, when you type "javac" it searches in your path, and finds C:\Program Files (x86)\Java\jdk1.6.0_22\bin\javac.exe, and runs that). If it isn't, try downloading the JDK again; if it is, then check whether you actually added the path to the PATH environment variable (you can do this using System Properties), or execute the program using its absolute path (e.g. D:/stuff>"C:\Program Files (x86)\Java\jdk1.6.0_22\bin\javac.exe" HelloWorld.java).

Link to comment
Share on other sites

Remember to restart your computer after you modify the PATH for the changes to take effect.(I'm sorry if I come out as insulting your intelligence by saying that, but I've seen people forget this... heck, at first I didn't knew reboots were required to begin with, so I fell for it too)

Link to comment
Share on other sites

I thought you just needed to restart the command line program, but rebooting will probably fix things too :).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...