简体   繁体   English

Proguard for Java混淆,从Windows迁移到Mac,找不到classes.jar

[英]Proguard for java obfuscation, migrate from windows to mac, cannot find classes.jar

I'm migrating a java project from Windows to macOS 10.13.6 (High Sierra). 我正在将Java项目从Windows迁移到macOS 10.13.6(High Sierra)。 I want to use ProGuard, triggered from an ant script. 我想使用从Ant脚本触发的ProGuard。 On Windows I added rt.jar as input to ProGuard. 在Windows上,我将rt.jar作为输入添加到ProGuard。 I've learned that the equivalent on macOS should be classes.jar, found at for example 我了解到,macOS上的等效项应该是classes.jar,例如在

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar. 

On my system, in /System/Library/Frameworks/JavaVM.framework/Versions there are folders 'Current' and 'A' and no classes.jar under any of them. 在我的系统上,在/System/Library/Frameworks/JavaVM.framework/Versions中,有文件夹“当前”和“ A”,而它们之下都没有classes.jar。 I have JDK 10 at /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk . 我在/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk具有JDK 10。 In Contents/Home/lib there are in all 793 items, including a number of .jar and .dylib files. Contents/Home/lib中,共有793个项目,包括许多.jar和.dylib文件。 Is any of those the equivalent of rt.jar or can I find it elsewhere? 这些是rt.jar的等价物还是我可以在其他地方找到它?

I actually found an answer to my question: https://sourceforge.net/p/proguard/discussion/182455/thread/5ac4a153/?limit=25#28db 我实际上找到了我的问题的答案: https : //sourceforge.net/p/proguard/discussion/182455/thread/5ac4a153/?limit=25#28db

Runtime classes can now be added as modules to Proguard. 现在可以将运行时类作为模块添加到Proguard。 They reside in [java-home]/Contents/Home/jmods 它们位于[java-home] / Contents / Home / jmods中

Running 运行
jdeps myjar.jar jdeps myjar.jar

returns the library modules to add for running proguard on myjar.jar 返回要添加的库模块,以便在myjar.jar上运行proguard

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM