package testing;
public class HelloWorld {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello World");
testing123(false,false);
}
public static void testing123(boolean weekday, boolean vacation) {
// TODO Auto-generated method stub
if (!weekday || vacation) {
System.out.println("You're going to sleep-in");
} else {
System.out.println("You're not going to sleep-in");
}
}
错误:
C:\Users\xxxx\workspace\test\src\testing>javac HelloWorld.java
C:\Users\xxxx\workspace\test\src\testing>java HelloWorld
java.lang.NoClassDefFoundError: HelloWorld (wrong name: testing/HelloWorld)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
目录:C:\ Users \ xxxx \ workspace \ test \ src \ testing
詹金斯失败是因为我把目录(从詹金斯拉文件的地方)作为测试文件夹,所以可以理解的是,当我去运行HelloWorld时,它会返回一个未找到的文件....我的问题是,如果我在包中有多个文件,我该怎么办(我有另一个类调用这个文件)所以我希望能够构建两个并运行它们,这可能吗?谢谢!