0

I am executing a command in path /opt/dabai/tools/jdk1.8.0_211/bin/java in docker.Throw error:

bash: /opt/dabai/tools/jdk1.8.0_211/bin/java: No such file or directory

I am sure the file exists.so I change to the path /opt/dabai/tools/jdk1.8.0_211/bin and make sure file exists and execute:

./java

andd throw error:

bash: ./java: No such file or directory

I am confusing now.I am sure the java is linux and 64-Bit.I am copied from other linux machine and another machine works fine using this version of java.Where is going wrong and What should I do to fix this problem?

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • 2
    What you are seeing is strong (IMO) evidence that either the file does not exist, or the file owner/group/permissions are incorrect. – Stephen C Jan 04 '20 at 05:27
  • seems like you are trying to copy executable? which will of course does not – Adiii Jan 04 '20 at 05:30
  • What does "wrong tips of bash" mean in this context? – Charles Duffy Jan 04 '20 at 05:47
  • 1
    ...anyhow, in general, when you get a "file not found" from an executable that clearly exists, that generally means the libraries that executable requires to run don't exist (or the loader for the ABI doesn't exist at all, f/e, running a 32-bit executable on a 64-bit platform without compatibility libraries installed). `ldd` can often tell you more. – Charles Duffy Jan 04 '20 at 05:47
  • 1
    Does this answer your question? ["No such file or directory" but it exists](https://stackoverflow.com/questions/3949161/no-such-file-or-directory-but-it-exists) – Charles Duffy Jan 04 '20 at 05:49
  • 1
    @cricket_007 Java 8 is not yet end-of-life, see https://www.oracle.com/technetwork/java/java-se-support-roadmap.html (and that is only how Oracle handles it, other JVM vendors might support Java 8 even longer) – Mark Rotteveel Jan 04 '20 at 08:19
  • Check the output of following two commands and make sure your executable is 64 bit and your docker image is also. `file /opt/dabai/tools/jdk1.8.0_211/bin/java` `uname -a` – Nils Jan 04 '20 at 11:26

0 Answers0