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

Allow wildcard matching in java.classPath setting #257

Open
AaronAsAChimp opened this issue May 26, 2023 · 0 comments
Open

Allow wildcard matching in java.classPath setting #257

AaronAsAChimp opened this issue May 26, 2023 · 0 comments

Comments

@AaronAsAChimp
Copy link

When using the java.classPath setting each JAR file needs to specified separately. It would be helpful if it allowed wildcards because it alleviates manually updating this setting every time a JAR is added or removed. It also makes it consistent with the way the class path is set for javac and Ant.

Current Behavior

The language server crashes with the exception:

java.nio.file.InvalidPathException: Illegal char <*> at index 4: lib\*
	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
	at java.base/java.nio.file.Path.of(Path.java:147)
	at java.base/java.nio.file.Paths.get(Paths.java:69)
	at org.javacs.JavaLanguageServer.classPath(JavaLanguageServer.java:131)
	at org.javacs.JavaLanguageServer.createCompiler(JavaLanguageServer.java:94)
	at org.javacs.JavaLanguageServer.compiler(JavaLanguageServer.java:39)
	at org.javacs.JavaLanguageServer.lint(JavaLanguageServer.java:61)
	at org.javacs.JavaLanguageServer.doAsyncWork(JavaLanguageServer.java:532)
	at org.javacs.lsp.LSP.connect(LSP.java:237)
	at org.javacs.Main.main(Main.java:30)

Expected Behavior

Allow using wildcards similar to the way Ant or javac's pattern matching works.

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

1 participant