• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

bundling jre with the application  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a presentation software in java.

To deliver it, I need to create an installer for the software. What I want to do is to add JRE to the installer so that is installs JRE automatically, if it is not already installed.

How can I do this?

Please help

Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you simply need to bundle the JRE files with your distributable, and then unzip them into a directory in your installation directory. Then have your startup script call use that JRE by calling the java command via a relative path. There are installers (such as install4j ) that will automatically do this for you, including the generation of the platform specific startup script.

If you want to see how others do this, download and install an application that does this, look at how it is set up, and reverse engineer the concepts. You will want to look at how the directory structure is set up, and the startup script or executable they use. SmartCVS (be sure to grab the installer with JRE when you download) and IntelliJ IDEA are two such applications. that I know of off hand.
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You may also want to look into Nullsoft Scriptable Install System (NSIS) at this URL http://nsis.sourceforge.net/Main_Page. I've used it before and it is quite simple and easy to bundle the JRE as you've mentioned.

Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!