Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Creating and building Standalone application

 
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a need to develop a Standalone software. i am planning to develop it using servlets and jsps. i want to know how to export and install it to the client machine. Its a Stand-alone software, which is a simple data-show up from database kind of work. can anyone suggest me on how to export and install it. i know i should bundle entire application into a JAR file. But i am not familiar on how to install at client's system and make it work. Thanking you in advance.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say its an application built using- servlets and jsps. For this you need to create a war file. You need to install Application server- like tomcat on the client machine (which the client may not like) and then deploy the war there.
OR
Better way is to host your application on some Servlet hosting provider and then your client can access the application via the internet.
OR
You can create a standalone desktop application and package the application into a jar and give it to the client. The client should have JRE installed (I think Most of the OS would come with the JRE installed)
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of three i suppose, the last option makes more sense to me. Could you explain it more. i have database scripts also. so does that mean, i need to have a Oracle/MySql installed on client machine.
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ashwin Sridhar wrote:Of three i suppose, the last option makes more sense to me. Could you explain it more. i have database scripts also. so does that mean, i need to have a Oracle/MySql installed on client machine.



There was a discussion sometime back regarding using of embedded database - Apache Derby. (May be you can search in Javaranch for that discussion).
You can embed this database along with your application jar.
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your Quick Respose.

Using derby would be an excellent idea.

Even if i package my application as a JAR, i would have to unbundle it and deploy it in the tomcat server at client place.

i want the client to unbundle-deploy the application on a single click from the setup.

i am looking for such a kind of approach. any suggestions on this.
 
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect that you will be using the wrong technology if you are installing a web server such as Tomcat on your client's machine. Nothing you have written makes this sound like the right approach. Just the opposite - I think you need a standard Java Swing application.
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are building a Desktop applications- which runs outside the browser- you make use of Swing of JavaFX 2.0 (still in beta) to build the GUI. Then you create a jar for this application which would include your apache derby jar as well. And you would not need a Application server for this.
Either you can write a OS specific script to run the jar and give it to the client or give just the jar.
Also you can have a look at- Java Web Start- Thats another way of distributing/launching the applications.

Dont expect client to install extra tools to run your application- the bare minimum would be the JRE and if you use Java Web Start it will download the JRE if it detects that the system has no JRE installed.
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thought this might be of some help: http://izpack.org/
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestions.
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Oracle Spring Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The derby database is connecting fine. But when i try to launch the application from a jar file, i am unable to access it.

Should i have to bundle the database on to the jar.

i register driver and create connection in following way

Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();

con = DriverManager.getConnection("jdbc:derby:E:/Mydatabase");

This is not working when launching using a JAR. Any idea
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As mentioned in the other thread here: https://coderanch.com/t/545378/java/java/build-derby-database-jar#2474446
You need to have the Derby jar along with your application jar. Just like you package other 3rd party jars with your application.
I havent used Derby myself, but I am sure there would be how-tos on the internet that will guide you through the process.
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic