2

There are stand-alone programs which can be executed e.g. under Windows, of which the developers state that they wrote the program "using the Java programming language". I am not a Software developer or a programmer, but through some basic programming courses in school and at university I was taught that Java Programms can only be run in a Java Runtime Environment (JRE).

So what I am asking is: how can I run these programs written in Java on my computer, without having any JRE?

A follow-up question would be: How is this step technically performed, to create such a program that does not need a JRE for running from Java code?

Please note: I am not questioning the concept of the JRE as a whole. It does make sence to me to use this concept, to have platform independent programs by using a runtime environment. My question solely is about how is this stand-alone solution made possible, not about its convenience, or its meaningfulness. It is obviously done for whatever reasons, and I want to know how.

  • 1
    I guess those programs are being shipped with bundled JRE. – Crozin Nov 27 '15 at 11:48
  • 2
    http://stackoverflow.com/questions/3371535/running-java-without-installing-jre – csenga Nov 27 '15 at 11:49
  • 1
    I have created a list of ways to [deploy Java applications here](http://stackoverflow.com/questions/1453369/i-have-never-seen-a-software-be-released-as-jar-so-how-can-i-make-a-software-be/1453477#1453477). This includes ways to deploy as "JVM-less" executables. – Michael Lloyd Lee mlk Nov 27 '15 at 12:04

2 Answers2

2

You can Ship JRE with your application. Then application will use it for execution. There are also some Compilers for this purpose. Read this question: running a java program as an exe in windows without JRE installed

Community
  • 1
  • 1
ThisaruG
  • 3,222
  • 7
  • 38
  • 60
0

You can use Excelsior JET compiler for that purpose.It will convert your java application to .exe

See Excelsior for more information on this.

Haseeb Anser
  • 494
  • 1
  • 5
  • 19