I worked on a Java project in which web services are used, values are to be modified in registry and there are some DLLs to be register with system. there are some environment variables to set, at the time of installation, keeping in mind these requirements , which Java installer is best, i also need a installer which is platform independent as my Java project is platform independent.
I think i may use IzPack
but i think you guys can help me better and suggest me an installer.
If a commercial product is an option, you could take a look at install4j, but I can't say anything about it.
IzPack seems to be the only open source Java installer that's still being actively developed. I've recently used it myself, and it has a lot of powerful features, but is not easy to get started with. There's a lot of documentation that describes some things in great detail, but unfortunately no simple "how to" for the most common case. Expect to spend a lot of time on trial-and-error.
I would use IzPack, its a great tool which bundles your installer in a jar. platform independent and with the possibility to only use some routines when special conditions a present. For example, only install DLL on Windows, mess with the registry (Custom Action) and so on.
I always enjoyed using IzPack and suggest you should give it a try.
The doc is also a great resource for the possibilities Doc
Related
There are currently no development tools in the environment I work in. I am the only developer in the working environment. What are guidelines in implementing a programming/development working environment? (Example, what do I need to do, in order for me to create internal java applications, which may include tools, licenses, etc.)
As you are the only developer in your environment, there are a few things that are fortunate. You tagged this question with Java, so I will assume you want to work with this language.
Java itself, if not already installed. You can find Java at their website, and download the latest version on it on your machine. This will allow you to launch your Java applications outside the IDE (next point). To check if you have installed it, it is usually under your Program Files folder, most often: C:/Program Files/Java.
An IDE (Integrated development environment). There are a lot of them, but the most famous might be Eclipse. It often comes with an embedded Java version with it.
And that's it. Only the IDE would work pretty well. In pure theory, you could even do it with Java only and its compiler, but pretty much every Java developer uses an IDE. Licencing is an internal thing that you will need to implement.
By the way, I will let you read this, and flag it in five minutes. It should not be there. You should try Programmers' Stack platform for this kind of topic, which is not related to pure programming.
I'm looking for advice on good options to deploy Java applications on end user systems.
Our end users are not tech savvy experts but casual computer users who can't be expected to figure out directories and version conflicts.
Runnable jar is not practical because we need to provide VM parameters. Batch files are not practical because for whatever reason, java.exe is not on the $PATH in a huge amount of Windows system.
Webstart is an option, but our users commonly complain that no shortcuts are created (a feature that's apparently broken), every click on the website prompts a new download, and a plethora of other issues make this option seem incredibly unprofessional to the end user.
Many of the things one finds when googleing for Java deployments are themselves built with Java, which means they won't run either on a system with a missing or broken Java installation.
If you do not want to spend any money, a popular solution is izpack.
If you're looking for a commercially supported solution, there is install4j (Disclaimer: My company develops install4j). The installer is a Java application here as well. However, it is started by a native launcher that can download a JRE bundle from your server on the fly. You can also statically bundle a private JRE. See here for more information on JRE bundles.
Webstart is an option, but our users commonly complain that no shortcuts are created (a feature that's apparently broken), every click on the website prompts a new download, and a plethora of other issues make this option seem incredibly unprofessional to the end user.
Many webstart deployments are quite unprofessional. Make sure any deployment that is showing problems is validated using JaNeLA. For the shortcuts specifically, look into the IntegrationService of the JNLP API for establishing them after launch, with feed-back.
Ultimately though, APIs will have bugs. If you find one in web start, please report it on the bug database (v. broken at the moment, but you have to try).
Many of the things one finds when googleing for Java deployments are themselves built with Java, which means they won't run either on a system with a missing or broken Java installation.
As to missing or too low version Java, use deployJava.js to ensure a suitable JRE is present. No ideas on the broken installs.
I doubt you will swing back to JWS for this immediate deployment, but please investigate it according to the ideas outlined above, for future use.
Now, don't get me wrong, I am a very competent programmer, but when I program, I typically develop things for the web using scripting languages like JavaScript, PHP, Python, SQL, etc. If I want to develop Java software (I am relatively experienced in Java), how do I distribute it?
Is there any good way to package up Java software in a nice little executable, send it out, and have it run? Alternatively, is there any good way to package up Java in some sort of installer, and send it out to be installed and run?
I'm using Launch4J http://launch4j.sourceforge.net/ it will generate an .exe executable for Windows, if the targeted system don't have JVM, it will tell user to download and get JVM.
You can package Java applications in so called jar-files using the jar tool or any competent Java IDE. These jar-files are self-contained and seldom need any installer.
These .jar files can easily be distributed and executed.
If you're used to web-development, you may also be interested in the Java Webstart technology.
Some links to get you started.
Export to a .jar-file in Eclipse
Lesson: Java Webstart
I have found two approaches to work well, depending on the needs of the end user.
1) Java WebStart - allows for central distribution and easy maintenance, but works best for online users. Require you to have a web site to locate the files - these days this is easy to do on the Google Application Engine.
2) Wrapping up the Java program in a single jar using one-jar, and then using jsmooth to generate an .EXE file which ensures Java is available, extracts the jar-file and invokes Java on it. This works well for users not always on the net, where you want the launch process to be transparent, but is less easy to upgrade than the webstart approach.
I use Maven to handle all the dependencies of my projects and that way when you utilise Maven to build your projects they will compile into one nice executable jar that contains everything so you dont need to worry about getting all your third-party jars in the right place etc.
There are a couple of ways: one is to create an installer that allows your user to install and run it. For this you can take a look at NSIS.... or you can just use Java Web Start where your user can just click the link and launch your application.
Here you will find a large set of options: Open Source Installers Generators in JavaIt is very useful for the "naive" customer or user of your application, to make the installation process as painless as possible. Let them install whatever is needed, DBMS, JVM, JMF and additional options via one installer.
You can also consider use one of the rich client platforms available for Java. The learning curve is probably a lot higher than just creating a jar file and ship it, but you will get a lot for free when it comes to distribution. (Think Eclipse with auto update through an update site).
Do a search for "Eclipse RCP" and "Netbeans RCP" and you'll find the two biggest contenders here. I also performed a serach for "eclipse RCP installer" and one of the hits seems interesting:
http://download.instantiations.com/RCPPackagerDoc/integration/latest/docs/html/gettingstarted/GenInstaller.html
I personally like izpack. It generates a jar file installer that you could wrap up in launch4j, supports things like windows specific shortcuts, is highly customisable through XML and hooks directly into ant.
OneJar is great for smaller stuff, but for larger programs or applications it's nowhere near as flexible and in my experience is rather slow.
Hello you can make an installer for your application.
In the link below you will find a nice help about izpack installer.
http://www.imrantariq.com/blog/?p=89
Link below contains a detailed pdf to make installer with izpack.
http://www.imrantariq.com/blog/?attachment_id=112
cheers
I just read so many posts about installers for a Java App and I'd like to get some opinions as for the best choices. My requirements aren't too long. I just need:
- the installer to install Java, MySQL and run the database script file;
- create a shortcut for my Java App.
I'm most looking for open source/free choices.
Look into NSIS. It's pretty easy to use, it can call out to other installers (so the user just has to follow those other dialogs to completion), and it can create shortcuts. It's actually quite powerful.
It generates installers for Windows only, though; no DEBs or RPMs.
You may also want to check out BitRock InstallBuilder
(Disclaimer: I am one of the InstallBuilder developers)
It is not free, as you are looking for, but we offer free licenses for open source projects as well as discounts for solo-developers and small companies.
Per your requirements, InstallBuilder is capable of bundling a Java
runtime, autodetecting the one included in the system, creating launchers and desktop shortcuts and so on.
Regarding MySQL we do not have built-in actions, but many of our customers bundle MySQL and is
relatively straightforward.
Our customer wants us to ship his application with an embedded JVM. We tried to convince him otherwise but had no luck.
Now, here is the way we are contemplating taking. We want to take the Apache Harmony VM and libraries. We would then strip everything we don't need and ship the application with the bare minimum in terms of libraries.
My questions are thus:
1) Where can I find detailled explanations about the functionality provided by the different libraries (natives and classes) coming with a JVM?
2) How can i know if a JVM library file is needed or not?
I know the questions are a bit convoluted, but i hope somebody out there have done something similar.
Regards,
Gregoire.
It looks like you can also distribute the Sun JDK if you do not modify anything (I would consult a lawyer to be sure).
Whichever way you go I would not prune anything, that would make it more complicated if and when you needed to upgrade the client's software.
The problem is not the license of Sun/Oracle, they allow redistribution of the Java Runtime Environment, so developers can embed it into their application installation packages.
However, the problem is export regulations. By law, you may not export parts of the JRE to certain countries, so you would have to check whether your customers are in the allowed list of countries before they can download your application package which includes the JRE. This for example applies to such things as the Java Cryptography.
Use a Sun JVM embedded within your application and start it with the invocation API. That way you could save some more diskspace :) IBM has an example source code how to start the JVM.
Try launch4j to bundle the JVM with your application and save some work.