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: Using Lomboz plugin with Eclipse



Stephen Paulsen <email@hidden>

>There is nothing in the JLS or the JVM spec that specifies the
>path "jre/lib/tools.jar" or that even requires the existence of
>a "tools.jar" file. To assume otherwise *is* an error on the
>part of the programmer.

Only if the dependency is not documented. If the dependency is documented,
and the way the file is used is explained, then you can tie a product to
whatever files you want. Just don't pretend it's portable if it really
isn't.

The most frequent use of "tools.jar" is simply checking for its existence
as an indicator that the Javac class (or some such Sun-supplied tool) is
available. The silliness of this is that frequently the file's existence
is only a touchstone, as the program then proceeds to load the Javac class
(or whatever tool), tacitly assuming that tools.jar is also in the
classpath.

In other words, rarely does the contents of tools.jar even matter. That's
why an empty tools.jar often works with otherwise recalcitrant non-portable
code.

One would think by now that Java programmers had sufficiently mastered the
use of Class.forName(), which has been present since JDK 1.0.2, to obviate
a senseless dependence on "tools.jar".

Since I don't know how the Lomboz plugin actually uses "tools.jar", they
may not fall prey to this level of silliness in programming practice, but
they nevertheless have a third-party dependency. As a first attempt at a
work-around, an empty tools.jar is surely an easy enough experiment to try.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Using Lomboz plugin with Eclipse (From: René Jansen <email@hidden>)
 >Re: Using Lomboz plugin with Eclipse (From: Stephen Paulsen <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.