-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add support to read classpath from the CLASSPATH environment variable #256
base: master
Are you sure you want to change the base?
Conversation
Setting an explicit Java classpath is currently supported via the java.classPath JSON initialization parameter. I too use the language server with Java source code that is not compiled using Maven, Gradle, or Bazel. When I do, I configure my editor to supply the language server with a classpath and documentation path using java.classPath and java.docPath. By using JSON to make these settings, I can work on more than one project at a time in my editor, with each running language server receiving the right classpath for the project it is handling. |
Sometimes I just want to write a single file which is to be run using java source launcher. Or I can have the classpath stored in a file and I can use it like so:
and in the ///usr/bin/env java -cp `cat classpath.txt` $0 $@; exit
class myScript {
/* ... */
} If the lang server have support for CLASSPATH environment variable, I don't have to create a separate file. |
Can you please add a test @andirady ? |
Done. The behavior is, when it's a simple project and |
Some workflows doesn't use maven, gradle or bazel. This PR allows the user to declare the CLASSPATH environment variable.