java.io.IOException: Cannot run program "/usr/java/jre1.8.0_65/bin/java": error=2, No such file or directory

Sonatype JIRA | Joe Tom | 1 year ago
  1. 0

    While testing the installer (nexus-3.0.0-SNAPSHOT-unix.sh), I ran a setup where I manually picked my JVM ("Select JVM" from JVM tab). When I clicked next to get to the screen to select it, I noticed the below error in the Console. That directory did not exist, I am unsure why the installer was trying to go there. This issue only existed in my GNOME CentOS VM. My KDE CentOS VM did not have this issue. I am leaving minor because despite this trace, I was able to select and proceed with the install. It was just a bit jarring to see the trace esp with no JVM at that location. {quote} java.io.IOException: Cannot run program "/usr/java/jre1.8.0_65/bin/java": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.install4j.runtime.installer.platform.JVMLocator.getVersionOutput(JVMLocator.java:163) at com.install4j.runtime.installer.platform.JVMLocator.checkJVMLocation(JVMLocator.java:138) at com.install4j.runtime.installer.platform.unix.UnixJVMLocator.searchRootLocation(UnixJVMLocator.java:46) at com.install4j.runtime.installer.platform.unix.UnixJVMLocator.getJVMLocations(UnixJVMLocator.java:30) at com.install4j.runtime.installer.platform.JVMLocator.getJVMLocations(JVMLocator.java:24) at com.install4j.runtime.installer.helper.apiimpl.JVMSelectorImpl.getJVMLocations(JVMSelectorImpl.java:30) at com.install4j.api.JVMSelector.getJVMLocations(JVMSelector.java:42) at com.sonatype.nexus.installer.JvmHelper.detect(JvmHelper.java:83) at com.install4j.script.I4jScript_Internal_164.eval(I4jScript_Internal_164.java:20) at com.install4j.script.I4jScript_Internal_164.evaluate(I4jScript_Internal_164.java:24) at com.install4j.runtime.installer.helper.Script.evaluate(Script.java:29) at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:181) at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:176) at com.install4j.runtime.beans.actions.control.RunScriptAction.execute(RunScriptAction.java:34) at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.install(SystemInstallOrUninstallAction.java:23) at com.install4j.runtime.installer.InstallerContextImpl$2.fetchValue(InstallerContextImpl.java:170) at com.install4j.runtime.installer.InstallerContextImpl$2.fetchValue(InstallerContextImpl.java:167) at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14) at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionDirect(HelperCommunication.java:266) at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionInt(HelperCommunication.java:241) at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionChecked(HelperCommunication.java:179) at com.install4j.runtime.installer.helper.comm.HelperCommunication.fetchObjectChecked(HelperCommunication.java:162) at com.install4j.runtime.installer.InstallerContextImpl.performActionIntStatic(InstallerContextImpl.java:167) at com.install4j.runtime.installer.InstallerContextImpl.performActionInt(InstallerContextImpl.java:155) at com.install4j.runtime.installer.ContextImpl.performAction(ContextImpl.java:1058) at com.install4j.runtime.installer.controller.Controller.executeActions(Controller.java:318) at com.install4j.runtime.installer.controller.Controller.handleCommand(Controller.java:170) at com.install4j.runtime.installer.controller.Controller.start(Controller.java:91) at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:41) at com.install4j.runtime.installer.Installer.main(Installer.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62) at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 36 more {quote}

    Sonatype JIRA | 1 year ago | Joe Tom
    java.io.IOException: Cannot run program "/usr/java/jre1.8.0_65/bin/java": error=2, No such file or directory
  2. 0

    How to build a Play2 project using play-yeoman from IntelliJ IDEA

    Stack Overflow | 2 years ago
    java.io.IOException: error=2, No such file or directory
  3. 0

    unable to create javafx application .deb pakage for linux.

    Stack Overflow | 2 years ago | Brajendra Pandey
    java.io.IOException: Cannot run program "fakeroot" (in directory "/tmp/fxbundler2581933641178636333/images/linux-deb.image"): error=2, No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Specify 'PATH' environment does not work when running Gradle 'exec'

    Stack Overflow | 1 year ago | Kane
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':npm'.
  6. 0

    jenkins integration sonar error, Cannot run program "svn" Eorror

    Stack Overflow | 1 year ago | 風一樣的男子
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project bsp-cmts-provider: java.io.IOException: Cannot run program "svn" (in directory "/root/.jenkins/workspace/bsp-cmts"): error=2, No such file or directory
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    error=2, No such file or directory

    at java.lang.UNIXProcess.forkAndExec()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.UNIXProcess.forkAndExec(Native Method)
    2. java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
    3. java.lang.ProcessImpl.start(ProcessImpl.java:134)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    4 frames
  3. com.install4j.runtime
    JVMSelectorImpl.getJVMLocations
    1. com.install4j.runtime.installer.platform.JVMLocator.getVersionOutput(JVMLocator.java:163)
    2. com.install4j.runtime.installer.platform.JVMLocator.checkJVMLocation(JVMLocator.java:138)
    3. com.install4j.runtime.installer.platform.unix.UnixJVMLocator.searchRootLocation(UnixJVMLocator.java:46)
    4. com.install4j.runtime.installer.platform.unix.UnixJVMLocator.getJVMLocations(UnixJVMLocator.java:30)
    5. com.install4j.runtime.installer.platform.JVMLocator.getJVMLocations(JVMLocator.java:24)
    6. com.install4j.runtime.installer.helper.apiimpl.JVMSelectorImpl.getJVMLocations(JVMSelectorImpl.java:30)
    6 frames
  4. com.install4j.api
    JVMSelector.getJVMLocations
    1. com.install4j.api.JVMSelector.getJVMLocations(JVMSelector.java:42)
    1 frame
  5. com.sonatype.nexus
    JvmHelper.detect
    1. com.sonatype.nexus.installer.JvmHelper.detect(JvmHelper.java:83)
    1 frame
  6. com.install4j.script
    I4jScript_Internal_164.evaluate
    1. com.install4j.script.I4jScript_Internal_164.eval(I4jScript_Internal_164.java:20)
    2. com.install4j.script.I4jScript_Internal_164.evaluate(I4jScript_Internal_164.java:24)
    2 frames
  7. com.install4j.runtime
    Installer.main
    1. com.install4j.runtime.installer.helper.Script.evaluate(Script.java:29)
    2. com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:181)
    3. com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:176)
    4. com.install4j.runtime.beans.actions.control.RunScriptAction.execute(RunScriptAction.java:34)
    5. com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.install(SystemInstallOrUninstallAction.java:23)
    6. com.install4j.runtime.installer.InstallerContextImpl$2.fetchValue(InstallerContextImpl.java:170)
    7. com.install4j.runtime.installer.InstallerContextImpl$2.fetchValue(InstallerContextImpl.java:167)
    8. com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
    9. com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionDirect(HelperCommunication.java:266)
    10. com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionInt(HelperCommunication.java:241)
    11. com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionChecked(HelperCommunication.java:179)
    12. com.install4j.runtime.installer.helper.comm.HelperCommunication.fetchObjectChecked(HelperCommunication.java:162)
    13. com.install4j.runtime.installer.InstallerContextImpl.performActionIntStatic(InstallerContextImpl.java:167)
    14. com.install4j.runtime.installer.InstallerContextImpl.performActionInt(InstallerContextImpl.java:155)
    15. com.install4j.runtime.installer.ContextImpl.performAction(ContextImpl.java:1058)
    16. com.install4j.runtime.installer.controller.Controller.executeActions(Controller.java:318)
    17. com.install4j.runtime.installer.controller.Controller.handleCommand(Controller.java:170)
    18. com.install4j.runtime.installer.controller.Controller.start(Controller.java:91)
    19. com.install4j.runtime.installer.Installer.runInProcess(Installer.java:41)
    20. com.install4j.runtime.installer.Installer.main(Installer.java:28)
    20 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  9. com.exe4j.runtime
    LauncherEngine.launch
    1. com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
    1 frame
  10. com.install4j.runtime
    UnixLauncher.main
    1. com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
    1 frame