./run.sh: line 1: java: command not found

40,975

The way to find the problem:

  1. run.sh is a script. So do a more run.sh to see what is on the line number is shows in the error.

  2. The line will start with a command (java most likely).

  3. Do a java --version.

If this errors out you did not install "java" and the program depends on it.

sudo apt-get install openjdk-8-jre

would install Open JDK 8 and make the script work.

There is also

sudo apt-get install openjdk-6-jre
sudo apt-get install openjdk-7-jre

for version 6 or 7 but 8 should be the best one.


For Ubuntu 14.04 you will need

sudo apt-get install openjdk-6-jre
Share:
40,975

Related videos on Youtube

copser
Author by

copser

God forbid we have to move our fingers away from the hjkl position.

Updated on September 18, 2022

Comments

  • copser
    copser over 1 year

    I'm trying to install worksnaps client so I can start working on a project. I'm running Ubuntu 14.04 LTS 32bit system.

    Installation and Configuration for worksnaps are simple :

    Download the Worksnaps Client package. The package is in zip format. With the user login that is going to use the Worksnaps Client, run the command "unzip WSClient_linux_.zip" to unzip the package. You should be able to see a directory "Worksnaps" created. Execute command "cd Worksnaps/bin" Execute command "chmod +x run.sh" Execute command "chmod +x p.sh" Launch the Worksnaps Client by executing command "./run.sh" (Note: please do not click any Jar file to launch the program.)

    After I do this I'm getting this error in mine terminal

    ./run.sh: line 1: java: command not found
    

    Link to the instruction's for worksnaps.They said here Worksnaps client version 1.1.20140511 or newer runs on both 64-bit or 32-bit Java environment. On a 64-bit Linux system, 64-bit Java environment is preferred. But they are not specific about what version does not working, I assume you can install both on 32-bit and 64-bit system, and there is just one version to download `worksnaps verison 1.1.201440511'.

    Can someone help me overcome this.

    • copser
      copser about 8 years
      it's just run.sh
    • copser
      copser about 8 years
      in folder I have capture_ext.sh, lib/, p.sh, run.bat, run.sh, worksnaps.cfg and `WSClient.jar'
    • copser
      copser about 8 years
      java -Djava.library.path="./lib" -jar "./WSClient.jar"
    • copser
      copser about 8 years
      The program 'java' can be found in the following packages ;-)