Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

控制台Scanner nextLine()获取用户输入执行报错 #115

Open
xutaocc opened this issue Aug 18, 2022 · 5 comments
Open

控制台Scanner nextLine()获取用户输入执行报错 #115

xutaocc opened this issue Aug 18, 2022 · 5 comments

Comments

@xutaocc
Copy link

xutaocc commented Aug 18, 2022

image

package com.tool;

import java.util.Scanner;

public class App {
public static void main(String[] args) {
System.out.println("你好");//
Scanner scanner = new Scanner(System.in);
System.out.println(scanner.nextLine());
System.out.println(scanner.nextLine());

}

}

以上代码加密后执行就会报错

以下是加密和执行过程

public class App {
public static void main(String[] args) throws Exception {
XCryptos.encryption()
.from("D:\dev_lab\a_my_project\java\xjar-console-demo\target\xjar-console-demo-1.0-SNAPSHOT-jar-with-dependencies.jar")
.use("io.xjar")
.to("C:\Users\Administrator\Desktop\encrypted990.jar");
}
}

C:\Users\Administrator\Desktop>go build xjar.go

xjar.exe java -jar C:\Users\Administrator\Desktop\encrypted990.jar

@zundaren
Copy link

main函数不要加密

@xutaocc
Copy link
Author

xutaocc commented Oct 11, 2022

好的感谢

@limeiyang
Copy link

好的感谢

请问有用没有 我好想没解决

@limeiyang
Copy link

main函数不要加密

我 main 函数不加密也报错诶,是 exclude 不起作用么?

@zundaren
Copy link

main函数不要加密

我 main 函数不加密也报错诶,是 exclude 不起作用么?

检查密码是否正确,如果有报错查看对应文件的行数判断错误的原因,像上面截图的没有读到参数,可能就是没有读到密码,反射解密失败。一般来说 io.xjar ,main不可以加密

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants