Connecting to a Java DB Database

See Also

The Java DB database is Sun's supported distribution of the open source Apache Derby database. Java DB is a fully transactional, secure, standards-based database server, written fully in the Java programming language, and fully supports SQL, JDBC API, and Java EE technology. The Java DB database server is bundled with the Sun Java System Application Server 9.0, Platform Edition. The Java DB database server replaces the PointBase database server bundled with previous versions of the Sun Java System Application Server.

To enable the Java DB database server in the IDE, do one of the following:

Once your Java DB database is registered with the IDE, the Java DB Database menu item appears under Tools in the main window. This menu item enables you to easily start and stop the Java DB database server, and to create a new database.

To create a new Java DB database:

  1. Choose Tools > Java DB Database > Create Java DB Database from the main window.
  2. Enter a name for the database, a user name, and a password.

    By default, the IDE creates the database in the .netbeans-derby folder of your home directory. You can change the default location by choosing Tools > Options > Advanced Options > IDE Configuration > Server and External Tool Settings > Java DB Database > Database Location property.

To connect to an existing Java DB database:

  1. In the Runtime window, right-click the Databases node and choose New Connection.
  2. In the New Database Connection dialog box, choose one of the following Java DB drivers from the drop-down menu:
  3. Enter the URL of the database. The URL format is given in the textbox:
    jdbc:derby://<HOST>[:<PORT>]/<DB>
  4. Enter a user name and password.
  5. Click OK. The IDE displays the connection to the database under the Databases node in the Runtime window.

Notes:

See Also
Connecting to a Database

Legal Notices