Hi, I am vishnu kumar. I knew the basics of Java but this is the first time i am building a project based on java (Java Swing actually). This is my final semester project and for last two months, i am doing my project.

I initially thought the database(along with tables created) will be deployed in .jar file. But recently only i found it doesn't

I am using Netbeans 7.1.1 and mysql database for my project. Can someone please tell me, how i can deploy my desktop application along with the already created tables to generate results for users who will use the software(project) in their system?

Or

I need to use SQL Lite? can someone guide me how to connect SQL lite to Netbeans and also include it in .JAR file?


Thanks,

you can have conditional sql statements that say something like: CREATE TABLE IF NOT EXISTS... or create database... in that case, you are sure that the database will be created if it does not exist and you won't have to include a .db file, which you can do if you use sqlite.

so, in case you use sqlite, you will have a one-file database that you can place anywhere you want and allow your project to interact with it. however, I am not sure if you can have the .db file inside your jar when using it.

here is how you create jar files via command line. I do not know how to do this using Netbeans as I have never used it.

http://docs.oracle.com/javase/tutorial/deployment/jar/build.html

if you've used MySQL with java, using sqlite is just as easy. there are plenty of samples online that you can copy paste into your code or use a guidelines how to use sqlite with java.

I hope this is of any help.

Thanks... i will go through it and will post what i done with the project very soon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.