Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » access to reserved variables
access to reserved variables [message #152916] Tue, 04 November 2003 20:25 Go to next message
Eclipse UserFriend
Originally posted by: denisem.complusdata.com

Hello,

Can someone please tell me I can gain access to Eclipse's reserved variables
such as ECLIPSE_HOME and JRE_SRC from my plugin?.

Thanks,
Denise
Re: access to reserved variables [message #152979 is a reply to message #152916] Wed, 05 November 2003 07:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: denisem.complusdata.com

I've done some research and have come across the JavaCore and
EclipseHomeInitializer classes. I have added both jdtcore.jar and
pdecore.jar to my classpath, and tried finding these variables using these
classes.

To find the JRE_SRC I have tried to execute:
String[] variables = JavaCore.getClasspathVariableNames();
for (int i=0; i<variables.length; i++)
System.out.println("Variable: " + variables[i]);

But eclipse throws:
Unhandled exception caught in event loop.
Reason:
org/eclipse/jdt/core/JavaCore

For ECLIPSE_HOME I tried:
Preferences pref = PDECore.getDefault().getPluginPreferences();
String platformHome = pref.getString(ICoreConstants.PLATFORM_PATH);
System.out.println("ECLIPSE_HOME = " + platformHome);

But eclipse throws:
Unhandled exception caught in event loop.
Reason:
org/eclipse/pde/internal/core/PDECore
Unhandled exception caught in event loop.
Reason:
Failed to execute runnable (java.lang.NoClassDefFoundError:
org/eclipse/pde/internal/core/PDECore)

Any suggestions?

Thanks,
Denise

"Denise Mangano" <denisem@complusdata.com> wrote in message
news:bo9jd8$ojj$1@eclipse.org...
> Hello,
>
> Can someone please tell me I can gain access to Eclipse's reserved
variables
> such as ECLIPSE_HOME and JRE_SRC from my plugin?.
>
> Thanks,
> Denise
>
>
Re: access to reserved variables [message #153180 is a reply to message #152979] Wed, 05 November 2003 13:42 Go to previous message
Eclipse UserFriend
Originally posted by: denisem.complusdata.com

In case anyone is interested in the resolution - I added
org.eclipse.pde.core & org.eclipse.jdt.core to my plugin's dependencies, and
I can now access the variables. I'd be interested to know of any
alternative methods of achieving the same results without requiring those
plugins to be loaded.

Thanks.

"Denise Mangano" <denisem@complusdata.com> wrote in message
news:boapip$tc3$1@eclipse.org...
> I've done some research and have come across the JavaCore and
> EclipseHomeInitializer classes. I have added both jdtcore.jar and
> pdecore.jar to my classpath, and tried finding these variables using these
> classes.
>
> To find the JRE_SRC I have tried to execute:
> String[] variables = JavaCore.getClasspathVariableNames();
> for (int i=0; i<variables.length; i++)
> System.out.println("Variable: " + variables[i]);
>
> But eclipse throws:
> Unhandled exception caught in event loop.
> Reason:
> org/eclipse/jdt/core/JavaCore
>
> For ECLIPSE_HOME I tried:
> Preferences pref = PDECore.getDefault().getPluginPreferences();
> String platformHome = pref.getString(ICoreConstants.PLATFORM_PATH);
> System.out.println("ECLIPSE_HOME = " + platformHome);
>
> But eclipse throws:
> Unhandled exception caught in event loop.
> Reason:
> org/eclipse/pde/internal/core/PDECore
> Unhandled exception caught in event loop.
> Reason:
> Failed to execute runnable (java.lang.NoClassDefFoundError:
> org/eclipse/pde/internal/core/PDECore)
>
> Any suggestions?
>
> Thanks,
> Denise
>
> "Denise Mangano" <denisem@complusdata.com> wrote in message
> news:bo9jd8$ojj$1@eclipse.org...
> > Hello,
> >
> > Can someone please tell me I can gain access to Eclipse's reserved
> variables
> > such as ECLIPSE_HOME and JRE_SRC from my plugin?.
> >
> > Thanks,
> > Denise
> >
> >
>
>
Previous Topic:Bits and pieces about eclipse
Next Topic:Dynamically modifying the classpath entries of a plugin
Goto Forum:
  


Current Time: Thu Jul 17 23:04:13 EDT 2025

Powered by FUDForum. Page generated in 0.06435 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top