origin article:http://www.javatpoint.com/example-to-create-hibernate-application-in-eclipse-ide 

required jar files: 
hibernate: http://www.javatpoint.com/src/hb/hibernatejar.zip
mysql connector Jar:  https://files.cnblogs.com/files/netact/mysql-connector-java-5.1.36.zip 

 

1,create a java project in eclipse.

 

2, add package:com.javatpoint.mypackage and Employee class:

 1 package com.javatpoint.mypackage;
 2 
 3 public class Employee {
 4     
 5     private int id;
 6     private String firstName, lastName;
 7 
 8     public int getId() {
 9         return id;
10     }
11 
12     public void setId(int id) {
13         this.id = id;
14     }
15 
16     public String getFirstName() {
17         return firstName;
18     }
19 
20     public void setFirstName(String firstName) {
21         this.firstName = firstName;
22     }
23 
24     public String getLastName() {
25         return lastName;
26     }
27 
28     public void setLastName(String lastName) {
29         this.lastName = lastName;
30     }
31     
32 }
Employee.java

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2021-08-20
  • 2021-12-25
  • 2021-08-06
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2021-04-10
  • 2021-12-15
  • 2022-12-23
  • 2022-01-27
  • 2021-09-02
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案