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

crucible-jvm: Allow specifying Java's location with --java-bin-dirs/PATH #633

Closed
RyanGlScott opened this issue Feb 2, 2021 · 0 comments · Fixed by #636
Closed

crucible-jvm: Allow specifying Java's location with --java-bin-dirs/PATH #633

RyanGlScott opened this issue Feb 2, 2021 · 0 comments · Fixed by #636

Comments

@RyanGlScott
Copy link
Contributor

Currently, the crucible-jvm executable allows specifying the locations of Java classes through the -j flag (for JAR files) and the -c flag (for .class files). This has two issues:

  1. For JDK 8 and earlier, this requires finding where your JDK installation's rt.jar file is and manually passing it to crucible-jvm. This is tedious.
  2. This approach doesn't work at all for JDK 9 and later—see Modern Java support saw-script#861.

Elsewhere, SAW aims to fix these issues with GaloisInc/saw-script#1030, which adds a -b flag which points to the location where the java executable lives. (Alternatively, if -b isn't set, SAW can also find java if it is located on the PATH.) With this information, one doesn't need to specify where rt.jar lives at all, as it can be inferred from java -XshowSettings:properties. Moreover, knowing where java is located is essential to getting JDK 9 and later to work.

I propose we adopt a similar -b/PATH scheme for crucible-jvm.

RyanGlScott added a commit that referenced this issue Feb 3, 2021
This mirrors a similar recent change introduced to SAW in
GaloisInc/saw-script#1030.

While I was in town, I updated the two `crucible-jvm`–related test suites
to use the `PATH` instead of the `-j` flag. I can't exactly confirm via CI
if these changes work (see #634), but they appear to do the right thing
locally.

Fixes #633.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant