0

I created a program in Java 1.8 using eclipse, then I exported it into an executable JAR file and it runs fine on my computer, but if I try too run it on a different computer it tells me I need to install a JDK to run it(also something about command line tools). Is there any way to make eclipse export an executable jar that doesn't require a JDK to run

Andreas
  • 154,647
  • 11
  • 152
  • 247

1 Answers1

0

Check Answer from this question

How is Java platform-independent when it needs a JVM to run?

You will need JRE on target environment to run your program.

Community
  • 1
  • 1
DhruvG
  • 394
  • 1
  • 2
  • 10
  • I can't find anything useful in here – Gregory Preston Sep 20 '15 at 01:14
  • In short you need a JRE which is Java Runtime Environment. Executable jars dont behave like EXE files. Executable jars are run by Java Virtual Machine which is part of JRE whereas Executable files are machine level instructions. http://www.javabeat.net/what-is-the-difference-between-jrejvm-and-jdk/ – DhruvG Sep 20 '15 at 01:15