Java Question java.lang.NoClassDefFoundError - one more time :-(

pmj

Member
Licensed User
Longtime User
Every night for a whole week, I have tried to find out why I get this NoClassDefFoundError error in Basic4android when I try to create a simple library.
B4X:
Installing file.
PackageAdded: package:test.test.test
main_process_globals (java line: 247)
java.lang.NoClassDefFoundError: my.first.test.MyLibTest
   at test.test.test.main._process_globals(main.java:247)
   at test.test.test.main.initializeProcessGlobals(main.java:227)
   at test.test.test.main.afterFirstLayout(main.java:80)
   at test.test.test.main.access$100(main.java:16)
   at test.test.test.main$WaitForLayout.run(main.java:72)
   at android.os.Handler.handleCallback(Handler.java:605)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4507)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
   at dalvik.system.NativeStart.main(Native Method)
I have followed Erel's video tutorial to the letter - I have uninstalled and reinstalled all relevant programs and have even installed all the programs on another PC - same error.

My environment looks like this:
*
Danish Windows 7 32bit
Android SDK rev. 20 (API 8, 10 and 15)
Basic4android 2.0
Eclipse SDK-4.2-WIN32
Java jdk1.7.0_05 (Have tried jdk1.6 unsuccessfully)
Cell phones: Samsung Galaxy Note and Samsung Galaxy S

All paths in Eclipse is checked again and again.

But I've noticed something strange:

When I use Basic4android release v1.90 will be no NoClassDefFoundError - but the program freezes!
When I use the release Basic4android v2.0 comes a NoClassDefFoundError - (and the program freezes)!

Maybe it has something to do with my Windows is not in English?
Perhaps the classpath in windows environment variables are incorrectly?
(How does your classpath look like?)
Is there perhaps an error in B4AShared.jar?

I hope to get the right tip, lest I tear more hair of my head !:sign0085:
 

Attachments

  • Eclipseclip.JPG
    Eclipseclip.JPG
    90.8 KB · Views: 294

pmj

Member
Licensed User
Longtime User
java.lang.NoClassDefFoundError - one more time :-(

Thanks for the reply, Erel.

To be precise: You mean Java SE development kit 6?
I've tried but still get the error.

I am attaching my Eclipse project and my B4a project in hopes that someone can find fault.

Many hopeful greetings from Per. :sign0085:
 

Attachments

  • EclipseMyLibTest.zip
    1.9 KB · Views: 255
  • B4aMyLibTest.zip
    5.7 KB · Views: 257

pmj

Member
Licensed User
Longtime User
I am a very happy man now - for now it works!! :sign0060:

I've been playing with Windows enviroment variables, and then I suddenly get no error message anymore.

To see my environment variables out now:

CLASSPATH C:\Program Files\Java\ jdk1.6.0_32 \ lib.;
JAVA_HOME C:\Program Files\Java\ jdk1.6.0_32 \ bin
PATH C:\Program Files\Java\ jdk1.6.0_32 \ bin

Does your environment variables look in the same way, Erel?

Thanks provisionally!
 
Top