If someone would like to run ToyAppForJPA without an IDE here's how I did:
Edit pom.xml and add this dependency under dependencies:
Code: Select all
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.5.3.0_1</version>
</dependency>
Code: Select all
<property name="hibernate.connection.url" value="jdbc:derby://localhost:1527/toyjpadb"/>
<property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.ClientDriver"/>
Code: Select all
<property name="hibernate.connection.url" value="jdbc:derby:toyjpadb;create=true"/>
<property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
Code: Select all
mvn clean install dependency:copy-dependencies
Code: Select all
java -cp ToyAppForOCPJPA.jar;.\dependency\* guiclient.JPATest