aspose file tools*
The moose likes Beginning Java and the fly likes Installing Java Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installing Java Program" Watch "Installing Java Program" New topic
Author

Installing Java Program

Nishant Bhargava
Greenhorn

Joined: Aug 23, 2012
Posts: 1
I have created a program in Java for my final year project, it has 18 classes so I make a jar file and put all those classes in it & make the jar executable & its working fine. But my problem is that my program uses a database(Mysql) & I have to submit this project in my college, so the faculty can check the project, and I am not sure that they have jre & mysql installed in their pc & if they have they dont have database which my program use. So all I am asking is that is their any way in which they run my program & it will install mysql & jre in their pc & create the database & the table which my program use just like .net does
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
Hello Nishant Bhargava
i am also having the same query, the difference being, that i am using oracle.
So, i may go for oracle installation, then importing the tables (which i have saved earlier), and then running the application through jar file.
Even i am eager to know, if there is a solution to your problem


kunal
harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

Hi Kunal/Nishant, try using install 4j or java web start or inno setup or refer this site http://www.advancedinstaller.com/java.html.
All you have to do is put all package in proper place and you are done like your jar,jre and mysql - these all can be just put as a folder.

As far as tables are concerned use hibernate or java persistence create mechanism in configuration file or alternatively write a script which asks user for permission then inserts all the records for initial configuation.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38353
    
  23
And welcome to the Ranch

If you have used MySQL you should ask the college authorities what to do. You would obviously have to provide them with the .sql files to create the database.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
Thanks for your reply harshvardhan ojha, Campbell Ritchie.

I am using hibernate. I am thinking of creating a empty backup (empty tables), and give the same to the client, and then import the tables
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Installing Java Program