Showing posts with label java installer deploy application webstart exe. Show all posts
Showing posts with label java installer deploy application webstart exe. Show all posts

Monday, March 19, 2007

In the last couple of week amongst other things, one thing I have been frantically trying is to package my java application for deployment. I have a webstart version
for my app which I have made available from java.net. But, I want a exe version ready for my product which is in beta. So I tried various installers but Iam yet to find one that suits my needs. And Iam not just looking for the free ones which I know may not have all the necessary features. I haven't been able to get the evaluation download of even the paid ones to fulfill my needs. The installers I have tried include:

1. advanced installer - $199
2. launch4j - free
3. jshrink - $67
4. native4j - $45
5. lzpack - free
6. macrovision installshield - $449

Let me explain my requirements clearly which I think would be the same as anyone else in my position. You have built something putting in your hard effort and would like to guard yourself against unauthorized copying. So I would like to obfuscate my application. I have tried jshrink, porguard and recently allatori obfuscators. Next I would like to package my application classes in one jar file and specify the Main-class in the manifest file. The layout of my application is as follows:

com ----> root of application classes
resources --- used by application and contains icons, resource bundles
themepacks.zip - for my look and feel
META-INF - contains manifest file
lib ----> contains jar files used by my application


What I would like to do is package everything in one exe file for distribution. Is that too much to ask. Many of the installers I tried like native4j, launch4j cannot do this directly. They expect me to put all my classes and jar files in one big jar file and present it to them as input so they can do the packaging. This is easier said than done. There's more than 1 approach to do this none of which is satisfactory.

1. unjar all the jar files in a temporary directory and jar them al back into 1 big jar file. This doesn't work as many jar files' manifest contains signature information which prevent this approach from working

2. package everything as one jar file retaining the library jars as is. The problem here is the Class-path entry in your application jar's manigest only scans the filesystem. It does not check the jar file itself to see if the jars are in the classpath.

3. Find an installer that hides the details and packages everything nicely for you - Again very difficult unless you have the big bucks to buy a license for commercial installers like zeroG or exe4j.

The best promise is approach 2 and 3 but comes with the problems I have mentioned above. The packaging everything into 1 jar problem is addressed by the one-jar project hosted on sourceforge. But it doesn't seem to work either. Looks like there's a plugin for eclipse which I have downloaded but haven't tried. Iam hoping that this will do the trick. The other options include:

1. look more into izpack which seems to do everything I want albeit in a not so very starightforward manner
2. Try again with the installers that offer some promise atleast
3. Find some vendor who offers support and helps sort out all my troubles.

The cost is also a factor and I would like to get this done for as little as possible. Comments are welcome from people who know of a solution to this problem. I promise to give them a free license to my product if they help me sort this out.

Update: Since posting this blog, I went back to further tinker with Advanced Installer as I distinctly remembered having configured it correctly once. As luck would have it, I was able to get it working again. Looks like AI has a problem with jar files. When I supplied it with my folders expanded, AI was able to generate the setup file. But then AI costs $199 whereas there are cheaper alternatives around. Depending on available time and other factors, I may explore these alternatives someday.