TOC
idea创建javaproject项目,引入jar包并打包
创建项目
![1587525810594](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120114618-1951097538.png)
![1587525855487](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120116249-2029775912.png)
![1587525935149](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120117445-1307338419.png)
![1587525955467](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120118593-1452948616.png)
引入jar包依赖
- 在根目录创建文件夹放置jar包,我放在了
lib
文件夹中
![1587526129952](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120119625-1098897931.png)
![1587526155144](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120121829-2035619851.png)
![1587526219338](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120123512-1397780507.png)
![1587526266466](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120124258-1667074497.png)
![1587526305818](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120125273-127775568.png)
![1587526345808](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120126059-1584387914.png)
![1587526365393](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120127028-428190159.png)
![1587526385633](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120128277-1307551744.png)
![1587526414899](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120129208-184236563.png)
package Main;
import com.alibaba.fastjson.JSON;
public class TestMain {
public static void main(String[] args) {
System.out.println("12312321423");
User user=new User();
user.setAge(10);
user.setName("nihao");
System.out.println(JSON.toJSONString(user));
}
}
class User{
private String name;
private Integer age;
public User() { }
public String getName() {
return name;
}
public Integer getAge() {
return age;
}
public void setName(String name) {
this.name = name;
}
public void setAge(Integer age) {
this.age = age;
}
}
项目打包为jar包
![1587526660426](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120130417-2138105296.png)
![1587527882787](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120130853-753507380.png)
![1587527922578](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120131422-1511357305.png)
- 构建build-build artifacts-build
![1587526818665](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120132577-1870592628.png)
![1587526852063](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120133774-1020494443.png)
![1587527941354](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120134659-315536972.png)
![1587528003203](https://img2020.cnblogs.com/blog/1465807/202004/1465807-20200422120135297-655545473.png)