Java Reference
In-Depth Information
For RDBMS systems that are not supported out-of-the-box, we need to
obtain a JDBC driver and let NetBeans know of its location by selecting
New Driver
from the
Name
combo box. We then need to navigate to the
location of a JAR file containing the JDBC driver. Consult your RDBMS
documentation for details.
JavaDB is installed in our workstation, therefore the server name to use is
localhost
. By default, JavaDB listens to port 1527, therefore that is the port we
specify in the URL. We wish to connect to a database called
jpaintro
, therefore
we specify it as the database name. Since the
jpaintro
database does not exist yet,
we pass the attribute
create=true
to JavaDB, this attribute is used to create the
database if it doesn't exist yet. The user name and password we specify above will
be automatically added to the newly created schema.