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

jarjar.rules file creates wrong j2objc.jar #1805

Open
YummyTastyCode opened this issue Nov 6, 2021 · 0 comments
Open

jarjar.rules file creates wrong j2objc.jar #1805

YummyTastyCode opened this issue Nov 6, 2021 · 0 comments

Comments

@YummyTastyCode
Copy link

What did I do?
git clone the project.
execute make dist

build fails:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Sets
at com.google.devtools.j2objc.Options.(Options.java:128)
at com.google.devtools.j2objc.J2ObjC.main(J2ObjC.java:159)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Sets
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 2 more

I found that the problem is about the file https://github.com/google/j2objc/blob/master/translator/jarjar.rules

This file should be empty. Otherwise, it moves Sets.java binary (several Set*.class files) into the wrong directory.
I can make a PR in order to resolve this issue. But before I want to know what's the actual reason for jarjar.rules?
How does it work here? What should I do right now?
My Macbook has M1 arch and I use this JAVA version.
15.0.2 (x86_64) "Oracle Corporation" - "Java SE 15.0.2" /Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home

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

1 participant