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

New versions of Java #442

Open
meciarm opened this issue Mar 28, 2019 · 4 comments
Open

New versions of Java #442

meciarm opened this issue Mar 28, 2019 · 4 comments

Comments

@meciarm
Copy link

meciarm commented Mar 28, 2019

Hello,
we are using WALA 1.5.2 (via Maven). Due to my best knowledge, it runs on Java 8 JDK / JRE and it is capable of analyzing bytecode of programs written in Java 8 or lower.

My first question is:
Can I somehow make it run on JDK / JRE of Java 9 / Java 10 / Java 11?

I have tried to run WALA on each of them and I obtained following exception: com.ibm.wala.ipa.cha.ClassHierarchyException: failed to load root <Primordial,Ljava/lang/Object>. I have found in mailing list and documentation, that it might be solved by modification of WALA's property file. However, I have noticed that structure of new Java JDK / JRE versions has changes (rt.jar / core.jar files are not present in newer Java versions), so I was wondering whether modification of WALA property file still could solve this issue or there exists other way how to make it run on newer Java versions.

My second question is:
Is it planned to extends analysis done by WALA to bytecode of Java 9 / Java 10 / Java 11 programs in future?

@msridhar
Copy link
Member

Thanks for the report, @meciarm. For now, I believe you should be able to make WALA run on Java 9+ by modifying the property file to point to a JDK 8 rt.jar. I have not tried this personally, and if you could give it a try I would appreciate it if you reported back on if it worked.

We do plan to fix WALA so it runs out of the box on JDK 11, analyzing the libraries distributed with JDK 11. My hope is we are able to get something going in the next couple of months, but I can't promise anything. I'd be happy to mentor anyone who is interested in contributing a fix here.

@liborvytlacil
Copy link

Hello,
I would like to provide a feedback on the suggestion of @msridhar . I have been able to successfully run WALA on Java 9+ by adding wala.properties file to my classpath, with java_runtime_dir property set to a path of a directory containing JDK 8 rt.jar. Thanks for the tip.

@anabioticsoul
Copy link

anabioticsoul commented Sep 5, 2021

I could run WALA on Java 16.0.1 with adding JRE 8 path to wala.properties. Thanks a lot.

@msridhar
Copy link
Member

msridhar commented Sep 5, 2021

FWIW, I believe the WALA master branch should at least not crash now for input programs using Java 11 bytecodes. We still don't have full support for all features, like modules.

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

4 participants