0

I have a simple Java application but when I run it on Eclipse, the following error will be shown in console.

/Eter/Jack/Java - Installation/jre1.7.0/bin/java: /Eter/Jack/Java - Installation/jre1.7.0/bin/java: cannot execute binary file

Running this command "java -version" in terminal shows following

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Jack
  • 6,430
  • 27
  • 80
  • 151

1 Answers1

0

I had a look at the jre1.7.0 to find out it has .exe files. I removed the folder and it showed a new error as following.

Unsupported major.minor version 51.0

Using this answer I changed the version of my Java on Eclipse and that solved the problem.

Community
  • 1
  • 1
Jack
  • 6,430
  • 27
  • 80
  • 151