16 July 2013

How to solve problem with Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified in play framework 2

Solution for  play framework 2,bit will works for all cases where javac doesn't work.

So you want try a BRAND NEW Play F
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified

You path to Java is wrong.
You can say as many bla bla bla as you want.You can swear on me,but ....
Your path to Java is wrong.

How is technically possible that other Java's program works ???
It can be few reasons:
For example. They do search in Java installation program directly (like somewhere in C:\Program Files (x86)\Java or  C:\Program Files\Java  as they found java and javac ,they can work.

Some programs, when they look for java in Windows Environment Variables  they look for variable in JAVA_HOME instead of Path.

Anyway,whatever reason is,there is

SOLUTION:

I used C:\Program Files\Java\jdk1.6.0_35\bin
  1. Open cmd (command line) You can do it in few ways for example: a( Press Win+R and type cmd and press enter. b) go to start menu  and press run and type cmd.
  2. type:  setx path "%PATH%;C:\Program Files\Java\jdk1.6.0_35\bin";
  3. Close Command line window and  Test it,by... Open command line again and type javac -version
You should see:
javac 1.6.0_35


Reminder.It will starts work in all new opened command lines (It will NOT WORK in currently open cmd windows)

No comments:

Post a Comment