嗨我在Windows 10操作系统上使用JDK11,我使用的Jshell版本是11.0.1。
我试图执行各种Jshell命令,并执行下面的命令
我有一个示例程序,它使用来自多个JAR文件Employee.jar和spring-context-5.1.3.jar文件的类。
登录到Jshell之后我使用下面的命令在Jshell中设置类路径,但是它抛出了错误
jshell> /env -class-path D:\JshellClassPath\Employee.jar:D:\JshellClassPath\spring-context-5.1.3.jar
| File 'D:\JshellClassPath\Employee.jar:D:\JshellClassPath\spring-context-5.1.3.jar' for '--class-path' is not found.
如果我只设置一个Jar文件并执行上面的命令它工作正常,但为什么我不能设置多个Jar文件/ env命令?
在Windows平台上,您必须使用;
作为分隔符而不是:
。