Cannot Run Program Javac Createprocess Error=2
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about cannot run program javac ubuntu Stack Overflow the company Business Learn more about hiring developers or posting ads
Java.io.ioexception: Cannot Run Program "javac" : Error=2, No Such File Or Directory
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Caused By: Java.io.ioexception: Createprocess Error=2, The System Cannot Find The File Specified
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Play framework can't find javac up vote 11 down vote favorite 1 I'm
Centos Install Javac
following a play tutorial when I run the web server before making any changes to the app. The server throws an error: IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified I check my JAVA_HOME and it reads C:\Program Files\Java\jdk1.7.0_25. How would one fix this issue? java windows playframework share|improve this question edited Aug 27 '13 at 10:58 biesior 44.2k677131 asked Aug 27 '13 at ubuntu javac 1:56 rross 78662037 add a comment| 4 Answers 4 active oldest votes up vote 21 down vote accepted Make sure that the javac is in the OS's search path For example, on Windows, goto Control Panel -> System, click Advanced System Settings, click on Environment Variables. In the System variables, locate the variable named path and insert C:\Program Files\Java\jdk1.7.0_25\bin at the start of the value. Don't forget to add ; between the values ;) Click Okay, Okay. Close any command prompt windows you have open and re-open them. This will ensure that they are updated with the new environment variables. share|improve this answer edited Aug 27 '13 at 9:11 answered Aug 27 '13 at 2:00 MadProgrammer 251k1599197 4 Just a small correction: one should add C:\Program Files\Java\jdk1.7.0_25\bin to the path, not C:\Program Files\Java\jdk1.7.0_25. –Carsten Aug 27 '13 at 9:00 2 +1 for reminding me that I had to re-open the cmds. –Doon May 24 '14 at 19:12 add a comment| up vote 2 down vote I wasn't aware that the typical java install DOES NOT have javac. Thus, I did the following: 1) Visited the Java SE Development Kit site 2) Downloaded the version for my Operating System and installed it 3) went to the
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting javac command not found ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join java_home the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes install jdk a minute: Sign up IOException: Cannot run program “javac” when “sudo ./sbt/sbt compile” in Spark? up vote 3 down vote favorite I'm installing Apache Spark which uses its own copy of SBT to set things up. I'm using Linux Mint in http://stackoverflow.com/questions/18455732/play-framework-cant-find-javac a VirtualBox VM. Here's a snippet from the error when I run sudo ./sbt/sbt compile from the Spark directory spark-0.9.0-incubating: [error] (core/compile:compile) java.io.IOException: Cannot run program "javac": error=2, No such file or directory [error] Total time: 181 s, completed Mar 9, 2014 12:48:03 PM I can run java and javac from the command line just fine: e.g. javac -version gives javac 1.6.0_31 The correct jdk1.6.0_31/bin is in my PATH. I read that the error might be due to the 64-bit JDK that http://stackoverflow.com/questions/22287444/ioexception-cannot-run-program-javac-when-sudo-sbt-sbt-compile-in-spark I had installed, but I get the same error with the 32 bit JDK. How can I sort out the issue? edit: Using bash shell. sbt apache-spark share|improve this question edited Mar 11 '14 at 5:30 asked Mar 9 '14 at 20:05 foghorn 179211 Did you set JAVA_HOME? –zsxwing Mar 10 '14 at 6:39 Possible duplicate of IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified –Suma May 20 at 19:07 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted DISCLAIMER I'm mostly guessing now and still am unsure I should've responding here rather than adding a comment. Until it's clear, the DISCLAIMER remains. When you execute java and javac from the command line, what user are you at that moment? I'm pretty sure your problems surface because the users you operate are different. Please notice that you're executing sudo ./sbt/sbt compile as root (due to the way sudo works), but you say nothing about what user(s) you've been using to execute javac and java commands. Add jdk1.6.0_31/bin to PATH for root and you'll be all set (as far as the configuration of Java's concerned). I'd also recommend setting JAVA_HOME to point to jdk1.6.0_31 as it may help at times -- many applications are using it as the way to find the location of Java. As a workaround, you may edit ./sbt/sbt and add PATH and JAVA_HOME
Support Search GitHub This repository Watch 170 Star 2,767 Fork 518 sbt/sbt https://github.com/sbt/sbt/issues/510 Code Issues 514 Pull requests 21 Projects 2 Wiki Pulse Graphs New issue java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified if the path to javac contains space #510 Closed OlegYch opened this Issue Jul 27, 2012 · 5 comments Projects None yet Labels cannot run Invalid Milestone No milestone Assignees No one assigned 4 participants OlegYch commented Jul 27, 2012 SBT 0.11.3 windows set PATH=d:\Distrib\Coding\Java\scala\sbt;d:\cygwin\bin;d:\cygwin\bin;c:\windows\system32; D:\Distrib\Coding\Java\jdk\jdk1.7.0_05\x86\bin\ which javac javac is an external : D:\Distrib\Coding\Java\jdk\jdk1.7.0_05\x86\bin\javac.EXE xsbt clean compile ... java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified ... set PATH=d:\Distrib\Coding\Java\scala\sbt;d:\cygwin\bin;d:\cygwin\bin;c:\windows\system32;D:\Distrib\Coding\Java\jdk\jdk1.7.0_05\x86\bin\ cannot run program xsbt clean compile ... [success] sbt member harrah commented Aug 7, 2012 I think this is a bug at a lower level, perhaps java.lang.ProcessBuilder. sbt doesn't parse the PATH variable. It runs the javac program without a prefix via ProcessBuilder. I don't remember the exact reason for the special casing of forking git in c5e3164, but perhaps @jsuereth can comment on whether this is the same problem. If you specify javaHome explicitly (such as in your ~/.sbt/global.sbt configuration file), it will construct the path to the binary directly. I expect that would be a suitable workaround. sbt member jsuereth commented Aug 8, 2012 The git stuff uses cmd /c because git has a .cmd file in the path you use. THIS is that we can't find javac on the path. Can you add two things for helping debug? (1) Is it a 64-bit JDK (2) Are you using on