Search code examples
java-9jshell

jshell classpath in Windows


I have a list of JARS in a directory and I need to add then to JShell classpath. I was trying to avoid typing each individual JAR file name and using wildcard "*" by CLASSPATH environment variable. But in Windows 10, apparently, jshell is not taking the classpath.

  1. I first tried setting the classpath in command prompt.

    SET CLASSPATH=lib/*

    Did not work when I started jshell. When I executed /env command, gave a blank response.

  2. Next, I tried jshell --class-path=%CLASSPATH%. This type, when I typed /env command, it listed out all JARS in classpath. But still I could not import the classes in the JAR.

Please let me know what is the issue. Thanks in advance.


Solution

  • It was an issue with intellij cache. There was no issue with JShell classpath.