Opening class in package from console in Java

前端 未结 2 1490
梦毁少年i
梦毁少年i 2020-12-20 10:09

So when i try to open a java class that\'s not in a package from the command prompt it all works fine, but when I try to open a class that\'s in a package it gives me NoClas

2条回答
  •  渐次进展
    2020-12-20 10:46

    NoClassDefFoundError means that your JVM can't find your class at runtime. This could be because it's not visible (set to private or protected, or just no access modifier).

    It could also be missing from your build path

提交回复
热议问题