我有几个包和类如何通过输入java HappyFamilies在命令提示符下运行名为HappyFamilies的包?
./ folder $ java HappyFamilies
答案 0 :(得分:0)
从你的软件包中我了解到,HappyFamilies不是一个包,它是一个java类。从命令提示符
运行它 javac /absolute_path_name/HappyFamilies.java
编译成功后
java /absolute_path_name/HappyFamilies