Translating Java apps into machine code

D

dado0583

Hi,
This may be a quick question but maybe not. If I compile my java
program into machine code (for Windows as an example) and distribute
that do I still need a JVM installed?

Also, would that rule out any possibility of updating parts of my
program or would I have to distribute it again?

Cheers,
David
 
R

Robert Klemme

Hi,
This may be a quick question but maybe not. If I compile my java
program into machine code (for Windows as an example) and distribute
that do I still need a JVM installed?
Unlikely.

Also, would that rule out any possibility of updating parts of my
program or would I have to distribute it again?

I guess that depends on the product you use for that.

Kind regards

robert
 
D

Denis

I'd rephrase your question: "If I compile my java program to machine
code, do I still need a Sun's JRE installed on end-user machines?".

The answer depends on what product you are going to use, and what APIs
your Java application uses.

1. You can use GCJ (http://gcc.gnu.org/java/). This is free product.

Using GCJ, you do NOT have to have JRE installed, all necessary APIs
are linked into your program (GCJ guys, correct me if I'm wrong).

So far, you can use GCJ for a limited class of applications (no Swing,
no Java 1.5 features).

2. You can use Excelsior JET 3.7
(http://www.excelsior-usa.com/jet.html). This is commercial product. It
supports all Java APIs and all Java versions.

Using JET 3.7, in most cases, you DO HAVE to have JRE installed (JET
can bundle JRE to your application and install automatically, but the
application package size increases).

3. You can wait few weeks and then use JET4.0, which will be released
by the end of September.

Using JET4.0, you do NOT have to have Sun's JRE installed or bundled.

I am not avare of any other tools that can compile your java applicaton
to native .exe for Windows or Linux.

Besides that, there are plenty of "java to exe wrappers" - these are
programs that do not compile your code, but just bundle JARs and JRE
into one big executable. This way, you do not have to have JRE
installed, but the size of your executable = size of your program +
size of JRE.

You can read this article for more details:

http://www.excelsior-usa.com/articles/java-to-exe.html

Your questions are welcome.

Denis,
Excelsior LLC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top