[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: "JRE_LIB";"JRE_SRC","JRE_SRCROOT"
|
Yes, you are right, we should have added them to the JavaUI API.
This can't be done anymore for the 1.0 release. However, you can savely use
the string constants. But you have to make sure
that the JavaUI plugin is loaded before you access the variables: Your
plugin must import jdt.ui.
It is the Java UI that initializes and manages the variables in the
'Installed JREs' preference page.
If you don't want to depend on any UI plugins, and just need a location of a
JRE, use
org.eclipse.jdt.launching.JavaRuntime.getDefaultVMInstall()
(.getInstallLocation())
Martin
----- Original Message -----
From: "Ilya Rozenberg" <irozenberg@xxxxxxxxxxxx>
Newsgroups: eclipse.tools
Sent: Wednesday, August 01, 2001 8:14 PM
Subject: "JRE_LIB";"JRE_SRC","JRE_SRCROOT"
> Should they be defined as constants (public static final ) in some
external
> package?
> Currently even eclipse own PDE package have to define its own constants
for
> them or hard code them.
>
> jdt\internal\ui\preferences\ClasspathVariablesPreferencePage.java(28):
> public static final String JRELIB_VARIABLE= "JRE_LIB";
>
> pde\internal\wizards\PluginPathUpdater.java(34): public static final
String
> JRE_VAR= "JRE_LIB";
> pde\internal\base\BuildPathUtil.java(49): IPath jrePath = new
> Path("JRE_LIB");