HI,
I have a J2EE application with some .jsp as start page. Is there a way that I can make my project an executable through eclipse or other means?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Usually people use build scripts to package their application into a JAR. Such as ANT and Maven.
Using Maven is the easiest approach all you do is create your
pom.xmlfile and create your executions. Then you just run the commands below which will technically package it into a single executable jar:Or you can use Ant using the jar task. http://ant.apache.org/manual/Tasks/jar.html
If you would like to do it within Eclipse, you can right click on your project and choose, “Export” and select Jar.
You can do it Manually as well. Just make sure you have a
manifest.mffile that contains aMain-Classsection:Then you can jar it make it executable by doing:
I personally would like to use a build script, using something like Maven makes the process painless easier to maintain in the future.
Note
You could use One-JAR which lets you package a Java application together with its dependency Jars into a single executable Jar file. It integrates really well with Maven and Ant. A good tutorial could be found here: http://www.asjava.com/core-java/making-an-executable-jar-file/