Easy installation

Hey, I’m new to both Java and JOGL (though I’ve worked with OpenGL and C++ a lot), and I must say installing JOGL was a bit of a pain comparing to my past experience. Anyway, I want to ensure myself that the people who will use my applications won’t have to go through all those quirky details (setting paths, using java.exe and a command prompt to run the program).

Is it possible to get something more easy to install and run than a bunch of class-files and native drivers? Most prefered solution is a exe-file (or anything that runs with just a click, in worst case a bat-file) and subdirectories in the project that contains the natives. How would i need to to do get this to work?

Thanks for any helpful replies,
/Lord Maz

Webstart will give you single-click start (assuming a webstart client is already installed). Plenty of info scattered around the forums and the wiki. :slight_smile:

I too have been trying to tackle this problem. There are a few ways to do this:

Option 1)

  • package your application into an executable .jar file. Put the jogl.jar and the 2 .dll files in the same directory, and point to jogl.jar from your .jar with the Class-Path var in the .mf file you use to create your jar. Once you have done this you can launch the app by double clicking the .jar file (just like an exe).
    Problem: Some zip applications (eg: winRAR) steal the .jar file type association!

Option 2)

  • Compile into a .exe to run on windows, or compile to run on linux, using a ahead of time compiler. I did this a few minutes ago and it works even with JOGL. I use a program called Excelsior to do this. Basically it goes through your project converting all your compiled .class files into a .exe. You will also get a performance boost and the file should be smaller. There is a free trial, but unfortunately if you want to make legal copies of your software to distribute its about $200.

ps: wouldnt recommend webstart. It has issues. For instance I cant open anything with webstart at all (I think its because I have dialup??)

I found this that might be of interest:

http://www.ej-technologies.com/products/install4j/overview.html

a cross platform installer/deployment tool for java programs :).

Wow, thanks for all the help! I’ll try the different solutions posted here.

Phew, I’m amazed that Sun or someone hasn’t presented a simple official way of handling this problem; having people being able to use the programs seems like a pretty critical part of development ::slight_smile:

Take a look at JSmooth:

http://jsmooth.sourceforge.net/

…to further ease the distribution/use of your application, you could bundle a JRE with it. This will add roughly 18MB of size to the package, but it might be worth it (no more JRE versioning issues or forcing users to install Java on their computers).

Cheers

Edit: For a decent free installer, I would go with NSIS (Windows only):

http://nsis.sourceforge.net/

I would create a .exe with JSmooth then put it into a NSIS installer :). Best of both worlds.

I have to second the recommendation of Java Web Start. I believe there are new features in 1.5 that provide better desktop integration so that you can use a JNLP file identically for launching over the web as well as installing an application on the desktop. This seems to me to be a much better solution than compiling down to a native executable.

Lord_Maz, take a look at Bootstrap:

http://www.g0dmode.com/javastuff/bootstrap-1.0.zip

…it allows you to create simpler end-user usability for Java applications.