0

I am currently trying to load a class from another project, but it gives me this error in run-time and not compile time:

VFY: unable to resolve static field 840 (Read) in Lshared/TestingMode;

Caused by: java.lang.NoClassDefFoundError: shared.TestingMode

And this is the class :

public enum TestingMode {
Read,
Write}

I have imported the projects and fixed the Java Build Path so there are no compile errors.

  • Maybe this helps: http://stackoverflow.com/questions/6352215/java-why-java-lang-noclassdeffounderror-caused-by-static-field-initializ-failur – cpt. jazz Dec 08 '12 at 16:56

1 Answers1

0

Instead creating enum, create a public class, its members are in public static final variables and access it from class name.

Refer this answer https://stackoverflow.com/a/4822906/603233

Community
  • 1
  • 1
kumar_android
  • 2,273
  • 1
  • 21
  • 30