package com.company.application; public class MainClass { public static void main(String[] args) { } } And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to “.“ (current directory). Which two java commands entered at the command line will run MainClass?()
- A、 java MainClass if run from the /apps directory
- B、 java com.company.application.MainClass if run from the /apps directory
- C、 java -classpath /apps com.company.application.MainClass if run from any directory
- D、 java -classpath . MainClass if run from the /apps/com/company/application directory
- E、 java -classpath /apps/com/company/application:. MainClass if run from the /apps directory
- F、 java com.company.application.MainClass if run from the /apps/com/company/application directory
正确答案:B,C
答案解析:有
微信扫一扫手机做题