• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make simple Java Application installable?  RSS feed

 
andrew ronchi
Ranch Hand
Posts: 50
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create simple java application which has 3 text fields and the application will have database connection. Once done, I want to run this application on other systems without using any IDE. So how do I do this? How can I make an application installable on other system so that on clicking on it, it will start executing?
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
andrew ronchi wrote:I want to create simple java application which has 3 text fields and the application will have database connection. Once done, I want to run this application on other systems without using any IDE. So how do I do this? How can I make an application installable on other system so that on clicking on it, it will start executing?


First a java application does not need a "IDE" to run, it requires the JVM.

By installable, do you mean executable as in double-click and a GUI pops up? For Windows, I recall if the application ends with "jar", double-clicking should run (calling the application's main class), given the manifest file specifies the main class or entry point.

On other systems (Windows too), a script calling "java -jar ...." would do the trick.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can make an executable JAR file out of it. The user will have to have Java installed ofcourse, but (s)he could then just double-click the JAR to run it.

This tutorial from Oracle explains how to create an executable JAR: Lesson: Packaging Programs in JAR Files
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Web Start is one of the standard ways to do that -- check it out to see if it matches your requirements.
 
andrew ronchi
Ranch Hand
Posts: 50
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Paul. But execuatable jar solves my problem.
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good. Much simpler than Web Start -- and "Keep It Simple" is usually a good rule to follow.
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for asking this! I was wondering myself!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!