javacommand-linefrege

What does "build:" mean in the java -cp option?


I was learning about Frege and saw this command line:

$ java -Xss1m -cp build:fregec.jar examples.SimpleIO

I've never seen that build: before. What does that mean and what does it do?

More context: https://github.com/Frege/frege/issues/289

I don't see it documented in this official article or when I type java at the command line.


Solution

  • : is the separator, so it's including build and fregec.jar on the classpath.

    Looking at Frege specifically, you first use it to compile some code and create some class files in the build directory. For example:

    java -Xss1m -jar fregec.jar -d build SimpleIO.fr
    

    Then to run the compiled code you need both Frege itself, and the class files you just created, on the classpath:

    java -Xss1m -cp build:fregec.jar examples.SimpleIO