I want to deploy my Java EE project to the client desktop (Not, to a domain). How may I able to achieve that without again installing Servlet containers like Tomcat.
I want to make my war
file as clickable file, to what ever system I deploy it to.
Hot to achieve it? I mean is there any way to deploy war file + servlet containers
as a single file, as the web app can be opened any where without installing Tomcat or GlassFish etc.,
I use NetBeans IDE.
Asked
Active
Viewed 1,777 times
1

Vamsee
- 183
- 1
- 8
-
You can use an embedded [Jetty](http://www.eclipse.org/jetty/) web server. – Joop Eggen Jun 06 '14 at 07:45
-
Okay.. But how may I achieve that, using NetBeans IDE?? – Vamsee Jun 06 '14 at 07:48
-
Don't let you be deterred by Jetty being an "eclipse" project - jetty is independent of the eclipse IDE or even eclipse code base. Best start with a [maven build structure](http://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html). – Joop Eggen Jun 06 '14 at 08:04
1 Answers
2
Check out Excelsior JET: it can compile your war and servlet container into a native executable for a given platform.

Alex Grigorovitch
- 385
- 1
- 8
-
It really is awesome.. But what if my app needs a database and how to deploy the database too to the client system (with all table schemas, by handling the burdens of changing port number, user_name, password). I need a solution to create a new war file for each new system I need my app to deploy, as Port number and all changes for each new system. – Vamsee Jun 06 '14 at 09:26
-
Does your app talk to the client's database, or it just needs a database for itself to work? In the latter case, you can use an embedded database, such as [HSQLDB](http://hsqldb.org) – Alex Grigorovitch Jun 06 '14 at 11:59
-
1).Yah., App needs a database for itself and how to embed HSQLDB in my app?? I mean all the details regarding JDBC JAR files, configurations and all!! 2).And as you are suggesting it as an embedded one, is there any restriction on how much data it can save and process, as it's unlike other databases which get installed on a system.. – Vamsee Jun 06 '14 at 12:33
-
First, you need to ship hsqldb.jar along with your app. Second, you need to create an instance of `org.hsqldb.Server` and `start()` it somewhere in the startup code of your webapp (depending on your web stack this could be an initialization servlet in a web.xml, a Spring service, etc). Then you just use the database as usual. – Alex Grigorovitch Jun 09 '14 at 06:34