File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes executable jar file without having JDK installed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "executable jar file without having JDK installed" Watch "executable jar file without having JDK installed" New topic

executable jar file without having JDK installed

medhaj hambi
Ranch Hand

Joined: Jun 04, 2008
Posts: 34
Hi All,

I got an executable jar file out of eclipse and I want to distribute my application to my clients. But the glitch is I donot want them to have JDK/JRE installed on their machines.
Is there anyway I can do that ?

Thanks a lot,
Greg Charles

Joined: Oct 01, 2001
Posts: 2969

This was a bigger deal 10 years ago than it is now. I'm not sure why that is, but I guess people don't distribute stand-alone Java applications as often, or stand-alone programs at all for that matter. Anyway, what you probably need is a Ahead-of-time (AOT) compiler. There's a good article about it here.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

More commonly now people use Java Web Start. If you set it up correctly, you just post your application on your website and the JNLP code in your web page takes care of making sure the user has the correct JRE on their system.

(I disregarded your desire for the user to not have the JRE on their machine because it seemed misguided. Why would you not want that?)
David Newton

Joined: Sep 29, 2008
Posts: 12617

It's rare a machine doesn't have a JRE installed these days, though; the only machines I have to install anything on are some Linux distros.
I agree. Here's the link:
subject: executable jar file without having JDK installed
jQuery in Action, 3rd edition