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

如果是一个经过xjar加密后的jar包,被其它新项目依赖后,那这个新项目该怎么启动 #138

Open
dz-java opened this issue Oct 17, 2024 · 3 comments

Comments

@dz-java
Copy link

dz-java commented Oct 17, 2024

如果是一个经过xjar加密后的jar包,被其它项目依赖后,那这个新项目该怎么解密启动呢?

@zzqo
Copy link

zzqo commented Oct 17, 2024

使用XJarClassLoader去加载它,具体代码你可以去看xjar源码里面的io.xjar.jar.XJarLauncher#launch()方法是怎么加载的

@dz-java
Copy link
Author

dz-java commented Oct 17, 2024

使用XJarClassLoader去加载它,具体代码你可以查看xjar源码里面的io.xjar.jar.XJarLauncher#launch()方法是怎么加载的

需要做什么操作呢? 改项目启动命令可以实现吗? 还是要改源码?

@MisterChangRay
Copy link

xjar是用于给jar包加密的,也就是加密解密都需要xjar才行。

如果是独立包,然后需要加密提供给第三方使用,这种情况建议将独立的包封装为微服务,提供远程调用接口比较合适。

不然的话就需要为第三方包适配xjar的classloader, 而且密钥泄漏了的话,那么你源码也能被解密出来了。

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