IOException: Cannot run program "javac": CreateProcess error=2

14,506 views
Skip to first unread message

Marcelo Magalhaes

unread,
Mar 13, 2012, 2:35:43 PM3/13/12
to play-fr...@googlegroups.com
Hello everyone, I´m just starting with Play. I barelly ended the 1.2.4 tutorials and the 2.0 was released. So, I´m trying to run the "todolist" project directly from the command line, but there is the JAVAC problem happening every time I try to run the project.. I just installed the jdk 6u31 for windows but no changes were made... 

Please, can anyone help me figure out what´s the problem? And congratulations for the creators, Play is a masterpiece!

Marcos Pereira

unread,
Mar 13, 2012, 5:52:43 PM3/13/12
to play-fr...@googlegroups.com
Can you run javac itself in prompt?

If not, you should set JAVA_HOME (http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows) and add JAVA_HOME/bin to your PATH.

On Tue, Mar 13, 2012 at 3:35 PM, Marcelo Magalhaes <marcelot...@gmail.com> wrote:
Hello everyone, I´m just starting with Play. I barelly ended the 1.2.4 tutorials and the 2.0 was released. So, I´m trying to run the "todolist" project directly from the command line, but there is the JAVAC problem happening every time I try to run the project.. I just installed the jdk 6u31 for windows but no changes were made... 

Please, can anyone help me figure out what´s the problem? And congratulations for the creators, Play is a masterpiece!

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/BkB30NObWqIJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Krystian

unread,
Apr 3, 2012, 7:52:59 AM4/3/12
to play-fr...@googlegroups.com
Hi, I set JAVA_HOME and can run javac manually. But still can't compile in play. I'm using Windows 7 64-bit with  java 64-bit 1.7.0_03. 
Any idea?

regards,
Krystian


W dniu wtorek, 13 marca 2012, 22:52:43 UTC+1 użytkownik Marcos Silva Pereira napisał:
Can you run javac itself in prompt?

If not, you should set JAVA_HOME (http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows) and add JAVA_HOME/bin to your PATH.

On Tue, Mar 13, 2012 at 3:35 PM, Marcelo Magalhaes <marcelot...@gmail.com> wrote:
Hello everyone, I´m just starting with Play. I barelly ended the 1.2.4 tutorials and the 2.0 was released. So, I´m trying to run the "todolist" project directly from the command line, but there is the JAVAC problem happening every time I try to run the project.. I just installed the jdk 6u31 for windows but no changes were made... 

Please, can anyone help me figure out what´s the problem? And congratulations for the creators, Play is a masterpiece!

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/BkB30NObWqIJ.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Cesar Devera

unread,
Apr 4, 2012, 3:26:18 PM4/4/12
to play-framework
I had the same problem.

the trick is your system %PATH%

in my case (and probably yours), I had both JRE and JDK in the path,
and the JRE was BEFORE the JDK.

I believe that Play was run by java.exe under JRE, and was looking for
javac.exe inside JRE too, ignoring the system %PATH%.

the solution was putting the java JDK BEFORE the JRE in the %PATH%.
this way, Play is run by java.exe under JDK, and then it looks for
javac.exe in the same path.



regards,

----
On 3 abr, 08:52, Krystian <krystian.rako...@googlemail.com> wrote:
> Hi, I set JAVA_HOME and can run javac manually. But still can't compile in
> play. I'm using Windows 7 64-bit with  java 64-bit 1.7.0_03.
> Any idea?
>
> regards,
> Krystian
>
> W dniu wtorek, 13 marca 2012, 22:52:43 UTC+1 użytkownik Marcos Silva
> Pereira napisał:
>
>
>
>
>
>
>
>
>
> > Can you run javac itself in prompt?
>
> > If not, you should set JAVA_HOME (
> >http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Var...)
> > and add JAVA_HOME/bin to your PATH.
>
> > Kind Regards,
> > --
> >http://about.me/marcospereira
>
> > On Tue, Mar 13, 2012 at 3:35 PM, Marcelo Magalhaes <
> > marcelotmagalh...@gmail.com> wrote:
>
> >> Hello everyone, I´m just starting with Play. I barelly ended the 1.2.4
> >> tutorials and the 2.0 was released. So, I´m trying to run the "todolist"
> >> project directly from the command line, but there is the JAVAC problem
> >> happening every time I try to run the project.. I just installed the jdk
> >> 6u31 for windows but no changes were made...
>
> >> Please, can anyone help me figure out what´s the problem? And
> >> congratulations for the creators, Play is a masterpiece!
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "play-framework" group.
> >> To view this discussion on the web visit
> >>https://groups.google.com/d/msg/play-framework/-/BkB30NObWqIJ.
> >> To post to this group, send email to play-fr...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> play-framewor...@googlegroups.com.

Johan Espinoza

unread,
May 17, 2012, 5:25:15 PM5/17/12
to play-fr...@googlegroups.com
I do all you say anda nothing happen, please help me!
Look de image :D
> >> To post to this group, send email to play-framework@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> play-framework+unsubscribe@googlegroups.com.
Untitled.png

Mathias Clerc

unread,
May 18, 2012, 1:38:38 AM5/18/12
to play-fr...@googlegroups.com
PATH is already set in your machine, you need to edit it and to *add*
the jdk path to it (or lots of things may break if you replace
everything)

then open a *new* command prompt and type :
echo %PATH%
it should show you what you have set in the first step

then type :
javac -version
it should tell you something like "javac 1.7.0_04"

if everything went well, you can use play


2012/5/18 Johan Espinoza <johanp...@gmail.com>:
>> > >> To post to this group, send email to play-fr...@googlegroups.com.
>> > >> To unsubscribe from this group, send email to
>> > >> play-framewor...@googlegroups.com.
>> > >> For more options, visit this group at
>> > >>http://groups.google.com/group/play-framework?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/VBWSBuBEZZkJ.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.

Maxim Galushka

unread,
Apr 17, 2013, 2:37:42 PM4/17/13
to play-fr...@googlegroups.com
Thanks for the trick @Cesar Devera - this works perfectly

khemlall mangal

unread,
Jul 29, 2013, 11:06:12 PM7/29/13
to play-fr...@googlegroups.com
awesome suggestion it worked for me Thanks!
Reply all
Reply to author
Forward
0 new messages