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
Most Noble Rabbit
  • 2,728
  • 2
  • 6
  • 12
pbuchheit
  • 1,371
  • 1
  • 20
  • 47

2 Answers2

1

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

Mark Tobin
  • 56
  • 4
  • That was a good idea, but unfortunately it didn't work. Running the command as sudo produces the same error. – pbuchheit May 07 '21 at 17:19
  • This might be worth a look then: [java-is-installed-in-listing-but-execution-produces-java-no-such-file](https://stackoverflow.com/questions/9081962/java-is-installed-in-listing-but-execution-produces-java-no-such-file-or-d/9082947#9082947) – Mark Tobin May 07 '21 at 18:06
  • 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! – pbuchheit May 07 '21 at 18:47
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

Mark Tobin
  • 56
  • 4