我想在javac命令中指定类路径。但是当我使用&#34 ;;"为了分离类路径的路径,我得到错误"路径未找到"。
如何编写javac命令以在类路径中包含两个文件夹?
-- this works
PS C:\vsctest\myTask> javac -classpath c:\packages *.java
-- this does not work. why?
PS C:\vsctest\myTask> javac -classpath .;c:\packages *.java
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
c:\packages : The term 'c:\packages' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:20
+ javac -classpath .;c:\packages *.java
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (c:\packages:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException