Giter VIP home page Giter VIP logo

introduction-to-jpa's Introduction

Introduction to JPA - Source code

This project is the sample code for the article Introduction to JPA available here:

This is a Maven project and can be compiled on any computer that has JDK 7 and Maven installed.

Technical information

The project is using Java 1.7 and can be built using Maven. It is using both JDBC and JPA connectivity to perform database operations. All dependencies are declared in the pom.xml file and can be built using Maven with no changes. The project is using a SQLite database to store data. The JPA provider for this project is EclipseLink.

Download links

If you're using Mac OS X Java can be installed from Software Update which will also install Maven

Building the examples

Run the following command in your command prompt from the project directory:

mvn clean package

Running the examples

Go into the newly created target directory and execute the examples application (introduction-to-jpa-1.0.0-jar-with-dependencies.jar). It takes a required command line argument to specify which example (JDBC or JPA) to run.

Issue one of the following commands from your command line:

  • To run the JDBC example: java -jar introduction-to-jpa-runner.jar jdbc
  • To run the JPA example: java -jar introduction-to-jpa-runner.jar jpa

Hint: on Windows you have to use java.exe

The application will create a new file in the current directory called sample.db This is a SQLite file that can be opened by any SQLite database manager application if you want to check the newly created database.

introduction-to-jpa's People

Contributors

codelook avatar mccuneware avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.