NoClassDefFoundError on an interface, not a class

前端 未结 6 765
-上瘾入骨i
-上瘾入骨i 2020-12-21 00:05

I have an issue with NoClassDefFoundError. I am using interfaces, and no class definition should be available:

package code;
public interface Co         


        
6条回答
  •  时光取名叫无心
    2020-12-21 01:01

    If you have somedirectory/code in your classpath, then that's wrong. You always need the base directory in your classpath (in this case it would be somedirectory). Java itself will search those roots for a directory called code containing a file called Constants.class.

提交回复
热议问题