tools.jar [message #197674] |
Fri, 04 March 2005 23:34 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
I have some plugin code that depends on tools.jar (from Sun 1.5 JDK), and
also on the org.eclipse.jdt.core plugin.
Q1) What is the best way to express the tools.jar dependency in my Eclipse
plugin project? I don't really want to ship a local copy of tools.jar with
my plugin; I want users to depend on the presence of the JDK, so that they
get the tools.jar that matches their JDK.
Q2) If I have to do this with classpath variables, is there some way to make
it so that installing the plugin automatically sets the classpath variable
or at least prompts the user to set it? It seems unacceptable to ask users
to remember to go to preferences and manually enter a classpath variable
with the appropriate name and contents, especially since JAVA_HOME probably
points there already.
Q3) What I'd really like to do is just use the JAVA_HOME env variable. Is
there some way to specify a lib path with an env variable in it? I have
searched help, Googled, and perused my Eclipse books, to no avail.
Thanks!
Walter Harley
BEA Systems Inc.
|
|
|
Re: tools.jar [message #197685 is a reply to message #197674] |
Sat, 05 March 2005 10:48 |
Genady Beryozkin Messages: 410 Registered: July 2009 |
Senior Member |
|
|
A plugin that I develop (the RMI Plugin for Eclipse) also depends on the
existance of "tools.jar" library.
A1: I didn't find any elegant way to express such dependency.
A2: You can check all configred/detected JREs and search them for the
presence of "tools.jar" file in the "lib" folder.
Notice that a user may not have such file at all, or it can have a
different name (e.g, on Mac).
My plugin code tries to locate the "tools.jar" file in the project's JRE
installation, and if it's not found there,
it prompts the user to download/configure a full SDK installation. I
don't use the JAVA_HOME variable,
since it may point nowhere.
A3: Look at bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=86710
It a full SDK is detected by eclipse as the default JRE, you will be
able to just look there.
Genady
Walter Harley wrote:
>I have some plugin code that depends on tools.jar (from Sun 1.5 JDK), and
>also on the org.eclipse.jdt.core plugin.
>
>Q1) What is the best way to express the tools.jar dependency in my Eclipse
>plugin project? I don't really want to ship a local copy of tools.jar with
>my plugin; I want users to depend on the presence of the JDK, so that they
>get the tools.jar that matches their JDK.
>
>Q2) If I have to do this with classpath variables, is there some way to make
>it so that installing the plugin automatically sets the classpath variable
>or at least prompts the user to set it? It seems unacceptable to ask users
>to remember to go to preferences and manually enter a classpath variable
>with the appropriate name and contents, especially since JAVA_HOME probably
>points there already.
>
>Q3) What I'd really like to do is just use the JAVA_HOME env variable. Is
>there some way to specify a lib path with an env variable in it? I have
>searched help, Googled, and perused my Eclipse books, to no avail.
>
>Thanks!
> Walter Harley
> BEA Systems Inc.
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds