-1

After reading this answer Setting multiple jars in java classpath I'm still puzzled. Is there an only way to specify a classpath so it would run in Linux and Windows? For example, I'm running these 2 commands and after '*' wildcard in Linux, i need to put ':', but in 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 $*

Thanks.

Community
  • 1
  • 1
rok
  • 5,653
  • 13
  • 48
  • 89

1 Answers1

2

There isn't such a thing. You should make a separate ".sh" and ".bat" file, or you could put all program dependencies inside your ".jar" file and turn it into an executable file. You would only need the jar file in any OS as you have a compliant jvm.

Alexander Jardim
  • 2,164
  • 1
  • 11
  • 22