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

Handle -bootclasspath argument #1010

Open
msridhar opened this issue Jan 12, 2017 · 0 comments
Open

Handle -bootclasspath argument #1010

msridhar opened this issue Jan 12, 2017 · 0 comments
Labels
Milestone

Comments

@msridhar
Copy link
Contributor

I am trying to get the Checker framework working in the context of a small Android project built with Buck. For Android projects, Buck uses the -bootclasspath argument when invoking javac, with an argument list like:

javac -source 7 -target 7 -g -bootclasspath /Users/msridhar/Library/Android/sdk/platforms/android-24/android.jar:/Users/msridhar/Library/Android/sdk/platforms/android-24/optional/org.apache.http.legacy.jar -d /Users/msridhar/my-first-buck-project/buck-out/bin/java/com/example/activity/lib__activity__classes -classpath '' @buck-out/gen/java/com/example/activity/__activity__srcs

It looks like the CheckerMain javac wrapper doesn't handle -bootclasspath correctly. This regular expression won't match the -bootclasspath argument, so I think the argument will still get passed to the underlying javac library. This leads to a warning that the annotated JDK is not being used. (I'm not sure how exactly javac handles seeing both -bootclasspath and -Xbootclasspath/p: arguments.)

Other related arguments that are not handled are -Xbootclasspath/a: and -Xbootclasspath/: (as far as I can see), as mentioned here. Properly handling combinations of these arguments may be a bit tricky; it's unclear how javac handles it from the documentation.

@mernst mernst added the Android label Apr 4, 2017
@mernst mernst added this to the Medium milestone Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants