creating standalone java executable

P

Peter

Hi all!

I'm creating an application with Java, and I'd like to be able to
create a standalone, single executable file for it. My goal is to
have one file that I can distribute to users and have them not need to
have a Java Virtual Machine installed on their computer to run it.
What is the best way to do this?

I suppose it could entail either compiling to native code or including
some kind of vm with the executable. I don't know how to do either of
those things. I know that this means of course that I'll have to make
different versions for different platforms which is fine.

What do you think? A free solution would be great. Thanks in advance
for your help!

Peter
 
A

Andrew Thompson

Peter wrote:
....
I'm creating an application with Java, and I'd like to be able to
create a standalone, single executable file for it.

Oh what an original thought.
Why did you not just code it in
..NET and be done with it?
..My goal is to
have one file that I can distribute to users and have them not need to
have a Java Virtual Machine installed on their computer to run it.
What is the best way to do this?

I suppose it could entail either compiling to native code or including
some kind of vm with the executable. I don't know how to do either of
those things. I know that this means of course that I'll have to make
different versions for different platforms which is fine.

That will probably be impractical.
But then, other platforms generally
speak webstart..
What do you think?

Dumb idea.

If you want Windoze, use .NET.

If you want cross-platform, leave it
as Java and distribute it using webstart.
.. A free solution would be great.

Both Java and webstart are free.
 
A

Alex Molochnikov

You can use InstallAnywhere from www.zerog.com to create a self-extracting
executable for Windows, or a script for Linux/Unix. InstallAnywhere lets you
bundle the VM with your app files.

An entry-level InstallAnywhereNow! is free.

We use InstallAnywhere for our own distribution.

HTH

Alex Molochnikov
Gestalt Corporation
www.gestalt.com
 
S

Srinivas

We are concerned with reverse engineering of our code, which is small
(<10K linies) but is very valuable (in terms of IP). So we are also
looking for a method/commercial tool to convert our Java code into
native executable of Windows for now.

thanks
 
N

nos

C# is free too.

Andrew Thompson said:
Peter wrote:
...

Oh what an original thought.
Why did you not just code it in
.NET and be done with it?


That will probably be impractical.
But then, other platforms generally
speak webstart..


Dumb idea.

If you want Windoze, use .NET.

If you want cross-platform, leave it
as Java and distribute it using webstart.


Both Java and webstart are free.

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
 
J

Jon A. Cruz

Srinivas said:
We are concerned with reverse engineering of our code, which is small
(<10K linies) but is very valuable (in terms of IP). So we are also
looking for a method/commercial tool to convert our Java code into
native executable of Windows for now.


Then don't give anything to the clients. Keep it all on some server,
behind firewalls.


Otherwise it's just a matter of users being determined enough. Never
rely on 'hiding' a secret.
 
G

Guest

Jon A. Cruz said:
Then don't give anything to the clients. Keep it all on some server,
behind firewalls.


Otherwise it's just a matter of users being determined enough. Never
rely on 'hiding' a secret.

The Java -> native executable debate never ceases to amaze me.
Rather than answering the question it always degenerates into
"you don't REALLY want to do that" etc. Believe it or not some
people really do want to do it. And have one or more really good
reasons for wanting to do it.

Java would actually have 1/2 a shot on the desktop if there was a
good free (as in beer) Java -> native executable compiler available
for Windows which supported AWT and Swing.

This reminds me of debates years back where people were told why
they don't really need anything except AWT. The more things change
the more they stay the same.
 
N

nos

The Java -> native executable debate never ceases to amaze me.
Rather than answering the question it always degenerates into
"you don't REALLY want to do that" etc. Believe it or not some
people really do want to do it. And have one or more really good
reasons for wanting to do it.

Java would actually have 1/2 a shot on the desktop if there was a
good free (as in beer) Java -> native executable compiler available
for Windows which supported AWT and Swing.

Should the "compiler" support this stuff, then you would have to
change your compiler each time there is a change to AWT or Swing.
 
T

Thomas Weidenfeller

The Java -> native executable debate never ceases to amaze me.
Rather than answering the question it always degenerates into
"you don't REALLY want to do that" etc. Believe it or not some
people really do want to do it.

You forgot to mention that a lot of people who ask for it have no clue
what they are asking for. It seems most people want to get rid of the
VM, but forget that they still need a runtime system to support several
language features.

You also forgot to mention that this has been discussed endlessly, but
people asking for it couldn't even be bothered to read previous
articles. This is definitely a frequently asked question, and it is
usually asked by some hit-and-run posters.

/Thomas
 
H

Hugh Mackay

You can use JBuilder 9 to create an exe file. If you are concerned
about reverse engineering, you can configure obfuscators to prevent it
(couldn't tell you how to do it tho!)
 
G

Guest

Thomas Weidenfeller said:
You forgot to mention that a lot of people who ask for it have no clue
what they are asking for.

That goes without saying. That's why I said "some" people.
It seems most people want to get rid of the
VM, but forget that they still need a runtime system to support several
language features.

Some people haven't forgotten that and linking the runtime into the
executable itself would be perfectly acceptable for many applications.
You also forgot to mention that this has been discussed endlessly, but
people asking for it couldn't even be bothered to read previous
articles. This is definitely a frequently asked question, and it is
usually asked by some hit-and-run posters.

People asking for it is often a good indicator that the market has not
met a demand. And the aforementioned hit-and-run posters may be that
precisely because of the hostile response they tend to receive.

In the end it seems .NET will rule the desktop since Java apologists
are too busy making execuses why people shouldn't want what they want.
 
G

Guest

nos said:
I was trying to get you to realize that AWT and SWING are not language
features and are not part of any compiler.

I consider libraries an integral part of any compiler.

I am also not interested in splitting hairs with you.
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top