Jump to content
Sign in to follow this  
Baxtex

New in programming Java, got problems Compiling

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

Share this post


Link to post
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).

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...