java class files in current directory?

后端 未结 1 469
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 08:38

How \"java\" knows the class file to execute without setting the class path.ie.,Does it check in the current directory by default or we need to set the class path for curren

相关标签:
1条回答
  • 2020-12-10 09:25

    It checks the current directory first. If the class is not found, it searches for that class in the class path.

    The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings. [source]

    0 讨论(0)
提交回复
热议问题