Forums Register Login

how to create dynamic installation or exe/setup file?

+Pie Number of slices to send: Send
i want to create a software, in which what i need to do is, when i install that software in any
system, automatically account in the database should created, i mean i only need to distribute the installtion files to whom

who want to use that software.
at the time of installation it should ask how many users are there and based on that account in the database should created,
how can i do this??

also is it necessary that the system in which i m installing that software should have database, i mean if i use oracle, the
system in which i am installing that software should have oracle??


+Pie Number of slices to send: Send
You can use an 'embedded db' to achieve this. JavaDB is a good choice.
+Pie Number of slices to send: Send
 


You can use an 'embedded db' to achieve this. JavaDB is a good choice.



so by using Java DB, i do not need to worry weather the system which is installing this software has database installed in his system or not, he only need jre, is it??

and is it possible to create dynamic installation file as i said, in which while installing it asks for number of users and create those number of account/table or whatever into Java DB??
+Pie Number of slices to send: Send
Correct.
JavaDB is part of jdk since 1.6. You can see in the features page which shows that this can be run in 'embedded' mode.

When you run the application first time, you should 'create' the database which can be done via API call. This will have the database in the local hd. Whenever the application starts, you should 'start' the database and stop it when the application stops. Again, all these can be done via API call.
Once the DB is started, connecting to and performing CRUD operations are usual JDBC stuff. The JavaDB ships with a JDBC driver for connecting to a JavaDB database.

Edit: The user only needs the JRE, but you should include derby.jar when you ship the application (Derby is the original Apache's open source project which is now supprted by Oracle called as JavaDB). I don't think derby.jar is included as part of jre.
You can read this link to understand how to use JavaDB in embedded mode.
+Pie Number of slices to send: Send
okay, Thank you...
+Pie Number of slices to send: Send
I see that you created another thread about the same question for making it an executable.
Like I pointed out, you need to write code to create the embedded db the first time, and then have code to start/stop the db. When you distribute the app, you will include all your jars along with derby.jar.
If you want to make it an executable, you can use launch4j to create an executable (with option to bundle JRE itself). Or, if your's is a NetBeans project, you can right-click on the project and use Distribution menu options to create an executable/zip.
+Pie Number of slices to send: Send
 


I see that you created another thread about the same question for making it an executable


I am sorry for that..

and i wrote code for create embedded db



now my question is how to include this?
simple class file ie. Test.class???
+Pie Number of slices to send: Send
 

Punit Jain wrote:
now my question is how to include this?
simple class file ie. Test.class???



include where?
Have you ever created a standalone jar file? you should start from there...
+Pie Number of slices to send: Send
no i have never created, and i m using eclipse.
how do i create a jar file??
and after that what next to do??
+Pie Number of slices to send: Send
Check this: link
+Pie Number of slices to send: Send
thank you very much, i will create a jar file of my class, after that???
do i need to include my jar file and derby.jar using this software Launch4j isn't it??
+Pie Number of slices to send: Send
No. If you read through the link, you can see that you can run standalone jar files with: 'java -jar <jarfilename>.jar' (in most machines, simple double-clik on the jar file will bring up the app).
Also, in subsequent sections, it is shown about how to include other jars in your classpath. That is where you have to specify derby.jar. Follow that and try it out. You won't need to make any executable at all in most cases (I started talking about launch4j thinking that you were already aware of standalone jars)...
+Pie Number of slices to send: Send
yes i will read that link, but i just want to know one more thing, if i want to create a installer than do i have to use that launch4j???
(installer i mean, ie(any software we install))
+Pie Number of slices to send: Send
I don't think you need an installer. You are using Eclipse IDE, how did you install it? most propably, you got a single zip file and unzipped it, right?
So, you can do the same. Just put all your jars in a single zip file and send it across. All the user needs to do is just unzip and the app is ready.
+Pie Number of slices to send: Send
ya got it...
thank you...
but again for any of my project if i need installer, do i need to use launch4j???
+Pie Number of slices to send: Send
No. For an installer, you should look at something like izpack
+Pie Number of slices to send: Send
thank you..
+Pie Number of slices to send: Send
You're welcome.
Straws are for suckers. Now suck on this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3687 times.
Similar Threads
izpack help
db connectivity with out dsn& portable db
How to automate installation of software?
How to automate installation of software?
Not able to start Tomcat, Failed to initialize end point associated with ProtocolHandler
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:31:00.