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 quit working (SOLVED!)



Duane and Julie wrote:

>The offending file turned out to be 'gnujaxp.jar' in my
>~/Library/Java/Extensions directory.  Without knowing the internals of
>Eclipse I can't think of any other way I could have solved this problem.
>
>Is this a bug?  It was there because another application required it.  I
>don't know right now which application that is, but if I still use it, I'm
>sure it will crash as well, for the opposite reason, sometime in the future.

If it does crash, come back and tell us what crashed, and we can discuss
then about how to fix it.

As Andre pointed out, there are several strategies for dealing with
numerous library-jar files.  I've used his strategy of keeping a separate
dir with all the "supporting libraries" in it, and then only referring to
them as necessary with specific classpath elements.

That works pretty well, unless a program needs a whole shipload of
supporting libs.  Then I've switched strategy to capitalize on how Java
extensions work, which is to scan an entire directory for jars (or zips),
and add them all to the classpath.

To do that, you prepend a specific dir-path to the property
"java.ext.dirs", so the extensions are looked for in the app-specific dir
first, then in the usual extension locations.  This makes it easy to manage
libraries, too, as all it takes is moving a jar-file in or out of a
directory.  Or just moving a sym-link in or out.

Another strategy is to put a Class-Path attribute in the manifest of a jar,
which then refers to adjacent jars.  I've used this strategy in other
situations where libraries were interconnected in a tree or graph of
dependencies.  That's not as easily changed as an extension dir, because
it's harder to edit a jar manifest, but sometimes it's a sensible solution.

  -- GG



 _______________________________________________
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



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.