0

I have an old piece of code (gwt 1.7) that needs the 32-bit version of Java 1.7 to run. I found what I thought was the solution here:How to run an application on a specific Java version? but when I actually tried to use the full path I get the error

/usr/lib/jvm/java-7-oracle/jre/bin/java: No such file or directory

I double and triple-checked the path and it is correct. The 'java' file has executed permissions. I'm not sure what else the problem could be. Comparing it to some of the newer Java versions I have installed, the only difference I can see is that the newer versions of java have that file encoded as a 'shared library' while in 1.7 it is an 'executable'. What am I missing?

FYI: If I run a command to display the contents of the JRE/bin directory the output is

/usr/lib/jvm/java-7-oracle/jre/bin$ ls -la
total 432
drwxr-xr-x 2 root root   4096 May  7 11:28 .
drwxr-xr-x 5 root root   4096 May  7 11:28 ..
lrwxrwxrwx 1 root root      8 May  7 11:28 ControlPanel -> jcontrol
-rwxr-xr-x 1 root root   5714 May  7 11:28 java
-rwxr-xr-x 1 root root  16246 May  7 11:28 java_vm
-rwxr-xr-x 1 root root 113254 May  7 11:28 javaws
-rwxr-xr-x 1 root root   6391 May  7 11:28 jcontrol
-rwxr-xr-x 1 root root   5873 May  7 11:28 keytool
-rwxr-xr-x 1 root root   6013 May  7 11:28 orbd
-rwxr-xr-x 1 root root   5893 May  7 11:28 pack200
-rwxr-xr-x 1 root root   5981 May  7 11:28 policytool
-rwxr-xr-x 1 root root   5865 May  7 11:28 rmid
-rwxr-xr-x 1 root root   5877 May  7 11:28 rmiregistry
-rwxr-xr-x 1 root root   5893 May  7 11:28 servertool
-rwxr-xr-x 1 root root   6045 May  7 11:28 tnameserv
-rwxr-xr-x 1 root root 219908 May  7 11:28 unpack200
2
  • Have you tried setting JAVA_HOME? Commented May 7, 2021 at 15:56
  • @ daniu I did try that but it makes no difference in this case. I'm using the full path so the value of JAVA_HOME doesn't matter. Commented May 7, 2021 at 17:21

2 Answers 2

1

Given this is not caused by a permissions issue, it could be the result of a missing 32 bit runtime which is detailed here

Sign up to request clarification or add additional context in comments.

Comments

1

Try running your java command as sudo. You're likely trying to execute from a user account without permission.

3 Comments

That was a good idea, but unfortunately it didn't work. Running the command as sudo produces the same error.
That was it. Even though I was trying to use an older java version, I still needed the 32 bit runtime for the CURRENT java version installed. If you post that as a separate answer (make sure to include a summary of the information as well as the link) I will mark it as the correct answer. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.