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




On Sep 28, 2008, at 2:55 PM, sam wrote:

If your project is built using a different build tool, it probably still runs 'javac' at some point, so the default for 'javac' would be the same.

Assuming the project was built with Eclipse directly, Eclipse doesn't use javac at all; it has its own compiler (ecj). [Incidentally this is available separately, which can be useful if you want an open-source java compiler, on relaxed Eclipse license terms, to include with your app. So it's good to know about.]

Since both Eclipse and ECJ originated with IBM the pairing makes some sense. Apple used to provide a courtesy build of ecj but I don't see one around anymore. ECJ being native I remember it was considered faster than javac at one time.


Personally I would second the recommendation not to use extension folders but to include library files within each project that needs them. As well as avoiding this kind of problem, this makes it easier to work with the project on other machines - just checkout from your source repository and you're ready to go. You don't need to remember that 3 years ago on your old machine you happened to install some third-party .jar file in your /Library/Java/Extensions.

I would agree with this as well, the easiest way to avoid extension problems is don't use the extension directories. However, if you want insurance that you are getting the version of a jar you want and not some other version that a user has stuck in their extension directories - I do have a non-standard ClassLoader that will retrieve packages from where you indicate, searching there before checking the extension directories. You might have to explain to your boss how this non-standard ClassLoader is protecting you from extension problems. But I don't actually use it for that anywhere myself. The extension problems are a little too infrequent and the solution maybe a bit too non-standard. The code used to have a more daily use for me in allowing javac to compile directly into zip files.

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative



_______________________________________________
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: 
 >Re: Eclipse - java.lang.NoClassDefFoundError: com/sleepycat/je/DatabaseException (From: Greg Guerin <email@hidden>)
 >Re: Eclipse - java.lang.NoClassDefFoundError: com/sleepycat/je/DatabaseException (From: sam <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.