hello,
i'm new to java, please anyone help and show me the way how to create SETUP for my dummy application.
Printable View
hello,
i'm new to java, please anyone help and show me the way how to create SETUP for my dummy application.
You don't create a setup with java?
Thank for that kind information.
:)Please give me some idea about how to run it as executable, also how to include data base part in it like SQL Server 2005.Cause i'm using the SQL Server 2005 as the backend.
Are you talking about an executable like a ".exe" for windows? Well the whole idea of Java is platform independence so what you can do is generate an executable jar file (an option available under the Export list in the Eclipse IDE). Then you can create a batch (.bat) file simply containing the line:
java -jar myExecutableJarFile.jar
This can be done using notepad as long as the file is saved as yourFileNameHere.bat
This bat file then becomes an executable file under windows.
As for the other question,
Well ideally all your database related code is going to do, is contact an existing server and run various queries. In that case, you need to have the database up and running already so it wouldn't require any specific additional set up work.
If you actually need to setup a database you need to consider using a setup creator software that is usually not free.
Read the following,
Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)
and also search the forum. You can find thousand of related threads to your question. :)
In a word... webstart
...if you want to start the application in the web.
Ummm... The web or the desktop... it works equally well with file:// URL's.
Yep, but the client requirement can be differ.
thank alots ,
which type of setup creator will i refer too.
above database it is workin but how to include it within the exe jar file and without going to the data sources and create the connection every time i want to run the program.
What type of database are you using?
If it's a simple access database it's okay to include those files within the jar package. But if you are using a database like SQL, I don't think it's a good idea to include it within the jar file, it can be a huge in size as well. In such cases best thing is setup the database separately in the local machine. You can execute a script to create table structure.
Ummm... The MDB would be _readonly_ if it lived in the jar-file... and if it can be readonly then why use a DB in the first place?
@OP: Typically the database is NOT embedded in the program... if that's what you're after then consider using JavaDB (extends Apache Derby. Ships with the JDK) or HSQLDB, or Perst, or Infinity or indeed any of the free "embeddable" Java-only RDBMS's.
BTW... All these "client side DB's" still need to be configured to use the local filesystem... you still can't save the data back into your JAR-file.
Cheers. Keith.
What my point is, in most of the application I used access database for light-weight applications. I mean for databases with less amount of data. In that case included that database in the jar file is okay, rather asking from client to setup database locally. It's a mess-up. Most of the clients don't know those stuff. And also no messup with the exact table structure need in the application.
And what happen if the database is not readonly? More than 90% databases used for read as well as write.
When i execute the program it run successfully and the database as well, from JCreator.
I'm using sql server 2005 as my backend for my application, i have create exe file using jar 2 exe and installation part with Inno setup creator, but i can't include the database part inside the installation part so please help me to solve this problem.
I really thankfull to you for your help.
As we discuss here including the database in the jar file is not a good idea. Say anyhow you've included in the jar file. At the installation how you going to handle the database setup?
Surely you must be joking?... On the other hand I may just be discovering what level of competence passes for "senior" on this forum... and I've got tell ya'... it's more than a bit whiffy.
An RDBMS embedded in the executing jarfile? Ergo: a java program that rewrites itself as it's running? Can anyone spot the problem here? Just try a quick example of that, and please let me know how you get on.
No, I really don't think so Tim. And even if it could be made to work why would you take the obvious security risks? No, much safer, simpler and saner to just create a database on the clients file system, like normal people. Definately, definately.
Cheers. Keith.
then how to handle database during creating the setup, don't find it in Inno setup creator to include it because it cannot be leave open, it not that wise to let other see what it is in that database ,example like login it has been store in it and there should be some way to hide the databse from other to view it. as many application there is database behind it and we can't see what is in it after we install it so also it had been inside the setup file encapsulated.
Hai friends,
I had developed an application for a video shop in netbeans in which the there were English,Hindi etc section .If the user choose the english the data means the list of dvd,cd will be loaded on the drop down and the list of coustomers or a textbox to enter the new coustomer who want to take the dvd or cd for rent,the appliction was mainly developed on swing,and the data that stores is in the ms acess.And there are other features also for the appliction.After the completion of the project the i clean and build the appliction,Then the netbeans create a jar file,But my problem is that how i will give the project to the customer ie the customer is a less knowledge in computer so i had to give this appliction in a setup formate so that if he clicked the setup it will auto matically install the software with the whole database connection and database ,and if any day he uninstalled the s/w the data that store initially has not be remove from the computer,i had gone through install4j s/w to make the setup but i not fully success in developing the s/w.Will any body please help me how to do the above thing or any website that form the tutorial to do ,
Thanks in advance