junit - java.lang.NoClassDefFoundError with two different src folders -
i have 2 source folders in same project, 1 called layout
, other 1 called user
. there class called genlayout
in layout
source folder generates layout class (extends given class) class in user
source folder. here of code:
genlayout loader = new genlayout(interfaceclass); byte[] bytes = loader.dump(); implclass = defineclass(null, bytes, 0, bytes.length);
the problem once run junit test case, throws
java.lang.noclassdeffounderror: com.user.types.byte
com.user.types.byte
self-defined class, , has nothing primitive type byte
the test case works fine if put files in same src folder.
two source folders have different output folders, 1 called layout_bin
, other 1 user_bin
here .classpath file:
<?xml version="1.0" encoding="utf-8"?> <classpath> <classpathentry kind="src" output="layout_bin" path="layout"/> <classpathentry kind="src" output="user_bin" path="user"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.jre_container"/> <classpathentry kind="lib" path="/vm_test/vm/lib/junit-4.10.jar"/> <classpathentry kind="lib" path="/vm_test/vm/lib/asm-all-4.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath>
Comments
Post a Comment