ian almine
ian almine

Reputation: 1

How to make a netbeans project a jar file embedded with database?

I want to make my Netbeans project executable with a database without opening any wamp or xampp. I am new at java and I don't know how to do this. Thanks in advance.

Upvotes: 0

Views: 1695

Answers (2)

Vidhya - Vidhyadharan
Vidhya - Vidhyadharan

Reputation: 630

if you want to use Database as a standalone java application. Then you can go for embedded database. Netbeans comes with default Java DB (derby). 1. Open services tab in Netbeans window -> services 2. Under Databases - Right click -> New connection -> Java DB (Embedded) -> next -> in the JDBC URl give jdbc:derby:myjavadb;create=true -> Click next and finish

  1. Now you have successfully created Embedded database.

Check this link for the code http://www.codejava.net/java-se/jdbc/connect-to-apache-derby-java-db-via-jdbc

Upvotes: 0

dunni
dunni

Reputation: 44545

There are several embedded databases which you can start from your Java application, like H2, HSQLDB, Derby. Try one of them, and if you have a specific problem, ask another question here.

Upvotes: 1

Related Questions