3

Java系列 | IntelliJ IDEA 如何导入和使用一个Jar包 - Tinywan

 1 year ago
source link: https://www.cnblogs.com/tinywan/p/17411363.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

第一步:创建lib文件

创建lib文件,统一管理导入的jar包(若已有lib文件,则直接可以进行第二步)
1021265-20230518110516437-1649585837.png

文件名称命名为`lib`

第二步:对lib文件建立依赖

选择【File】→【Project Structure…】

1021265-20230518110744018-229261162.png

 在弹出的页面中选择【Modules】再选择此项目,点击右边的【Dependencies】,再选择下面的小加号,选择【1 JARs or Directories…】或者【2 Library…】

1021265-20230518110828798-1750158149.png

 找到此项目中的 lib 文件(jar包所在的本地路径)并选择,点击【OK】

1021265-20230518110855541-1580655958.png

第三步:导入jar包

1021265-20230518111046348-1061833583.png
package com.tinywan.cms.api.v1;

import com.zzhy.thirdparty.sdk.crypto.utils.SM4Utils;

/**
 * @author Tinywan(ShaoBo Wan)
 * @description null.java
 * @createDate 2023/5/18 10:15
 */

public class SM4Test {
    public static final String data = "BGCr_zox9gCJ4cTyh4FjYsP7IvlB3uTL9MHDDLETFGpGlbQ0=";

    public static void main(String[] args) {
        String key = "e9d56722cf902909793b3bdcdbe48ce0";
        System.out.println(new String(SM4Utils.decryptBase64Url(key,data.getBytes())));
    }
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK