Cannot run program "C:\Program Files\Java\jre6\bin\javac.exe": CreateProcess error=2, The system cannot find the file specified

By: Emiley J  

If you are in linux environment then execute the following commands

export JAVA_HOME=/home/aidreamer/jdk1.6.0_18
export PATH=$PATH:/home/aidreamer/jdk1.6.0_18/bin

Of course you should change the path based on your environment.

If you are in Windows environment then you can add these to the environment values.

If you are using a JDE such as eclipse add these variables in netbeans->tools->variables 

The above error should disappear now.

Archived Comments

Most Viewed Articles (in Java )

Latest Articles (in Java)

Comment on this tutorial