在读了这个答案之后,Setting multiple jars in java classpath,我仍然感到困惑。是否只有一种方法可以指定类路径,以便在Linux和Windows中运行?例如,我正在运行这两个命令,在Linux中的“*”通配符之后,我需要放“:”,但在Windows - ';‘中。
java -mx1300m -cp "*;" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "wordsAndTags,typedDependencies,penn" edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz %1
java -mx500m -cp "$scriptdir/*:" edu.stanford.nlp.parser.lexparser.LexicalizedParser \
-outputFormat "typedDependencies" edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz $*谢谢。
发布于 2013-05-06 17:04:15
根本没有这样的东西。您应该创建一个单独的".sh“和".bat”文件,或者您可以将所有程序依赖项放入".jar“文件中,并将其转换为可执行文件。您只需要在任何操作系统中使用jar文件,因为您有一个兼容的jvm。
https://stackoverflow.com/questions/16403465
复制相似问题