Differences between classpath and sourcepath options of javac

前端 未结 4 1623
甜味超标
甜味超标 2020-11-30 03:35

I read the Sun documentation and a lot of posts on Stack Overflow, but I\'m still confused about the differences between the Java compiler options -cp and

4条回答
  •  一向
    一向 (楼主)
    2020-11-30 04:36

    CLASSPATH tells the compiler and the class loader where to look for the .class files it needs.

    Sourcepath is something I don't use so much. I believe it's optional, because usually the current directory is the sourcepath. CLASSPATH is not.

提交回复
热议问题