javapathfinder / jpf-core

JPF is an extensible software analysis framework for Java bytecode. jpf-core is the basis for all JPF projects; you always need to install it. It contains the basic VM and model checking infrastructure, and can be used to check for concurrency defects like deadlocks, and unhandled exceptions like NullPointerExceptions and AssertionErrors.
527 stars 334 forks source link

Build Error occurring when I have the correct version of Java installed? #426

Closed StarlightRT closed 10 months ago

StarlightRT commented 10 months ago

I am trying to build the JPF with the master branch. I have the correct version of Java yet am getting the following error. I have reinstalled Java 11 many times. What can I do to solve this?

Screenshot 2023-11-28 203459

Thanks

Edit: I have updated to Java 11.21 and that is also not working correctly.

image

cyrille-artho commented 10 months ago

Due to incompatibilities between Oracle's JDK and OpenJDK, we only support OpenJDK 11. Supporting both would be quite challenging (but of course a patch that enables support for both would be very welcome).

ghost-cai commented 9 months ago

I used the openjdk11 but still have this error. image

cyrille-artho commented 9 months ago

You need OpenJDK version 11, but probably a newer version. I use:

openjdk version "11.0.21" 2023-10-17
OpenJDK Runtime Environment (build 11.0.21+9)
OpenJDK 64-Bit Server VM (build 11.0.21+9, mixed mode)
ghost-cai commented 9 months ago

I hava an another question. Can jpf-core used to a whole jar package? Hope your answer.

cyrille-artho commented 9 months ago

The classes you want to analyze simply have to be accessible to JPF, either as class files or in a JAR file. As long as you set the classpath options correctly, JPF can find them.

ghost-cai commented 9 months ago

But there isn't an example to analyze a whole jar in the examples. I hope the officials can write an example about analyzeing a whole jar package. We can easier and more detailde to know how to use the jpf-core.

cyrille-artho commented 9 months ago

Yes, this would be helpful. I think a separate stand-alone mini project that builds one or two files from scratch and then runs them in JPF could illustrate how JPF is used from a new project. Such a project could be in its own repository, as to reflect how a "real" project would integrate using JPF.