Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eclipse - java.lang.NoClassDefFoundError: com/sleepycat/je/DatabaseException



Hello Guys,

thanks for your answers. I've solved it.

I did not know that the extensions on System could be overridden. So I've moved the jar to /Library/Java/Extensions and I've checked if Eclipse loaded it. Eclipse in fact loaded the classes. But the problem was still present. So I have explicitly added the jar file as a Referenced Library and then it worked. 

My question is why Eclipse loaded the imported classes to compile the class and not to run it. Does anybody know? Is there anyway that the classes in the OS Java extensions are always loaded in Eclipse for Compile and Run?

Thanks,

GA




On Sep 28, 2008, at 6:21 PM, Mike Swingler wrote:

On Sep 28, 2008, at 3:57 AM, Guillermo Acilu wrote:

Hello guys,

I am having a problem testing an small Java code to be used with Berkeley DB Java Edition. I have created a Java Project, then I've created a package and inside of this package I've created a class with the following code:

<snip>

I do not understand why. The BerkeleyDB jar files are placed already in /System/Library/Java/Extensions and the class compiles correctly. Any idea on why it is not running? What am I forgetting?

Please do not put 3rd party jar files into /System/Library/Java/Extensions. That directory is reserved for use by Apple, and we may blow it's contents away with a Software Update. We reserve the right to rewrite everything in /System. The proper place for this jar is on your application's classpath (either bundled with your double-clickable app, or specified on the command line with your Java invocation).

If you must use an extensions directory, use ~/Library/Java/Extensions, or the system-wide /Library/Java/Extensions. Eclipse probably did not recognize that you added another jar to your extensions, so you may have to remove, and re-add the "Apple JVM" for Eclipse to pick it up.

Cheers,
Mike Swingler
Java Runtime Engineer
Apple Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Eclipse - java.lang.NoClassDefFoundError: com/sleepycat/je/DatabaseException (From: Guillermo Acilu <email@hidden>)
 >Re: Eclipse - java.lang.NoClassDefFoundError: com/sleepycat/je/DatabaseException (From: Mike Swingler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.