Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Reading OS CLASSPATH from an Eclipse Plug-in ?
Reading OS CLASSPATH from an Eclipse Plug-in ? [message #41186] Thu, 09 January 2003 10:22 Go to next message
Alexandre Vermeerbergen is currently offline Alexandre VermeerbergenFriend
Messages: 110
Registered: July 2009
Senior Member
Hello,

I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
save needless user work to set the PATH for a Jar file that is already in
system CLASSPATH (db2java.zip, if you mind, but it could be anything in the
system CLASSPATH).

I have tried
String classPath = System.getProperty("java.class.path");

But it only returns Eclipse's internal classpath:

Class path =
E:\eclipse21M3\eclipse\plugins\org.eclipse.pde.ui_2.1.0\laun cher\slimlaunche
r.jar;E:\eclipse21M3\eclipse\plugins\org.eclipse.core.boot_2 .1.0\boot.jar

And I do not want to force my users to launch Eclipse using a modified
command line, such as with option -cp <...>.

How could I do that without resorting to JNI ?

Best regards,

Alex.
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #41281 is a reply to message #41186] Thu, 09 January 2003 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dwhitema.us.ibm.com

ask in eclipse.tools

"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:avjhme$1hu$1@rogue.oti.com...
> Hello,
>
> I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> save needless user work to set the PATH for a Jar file that is already in
> system CLASSPATH (db2java.zip, if you mind, but it could be anything in
the
> system CLASSPATH).
>
> I have tried
> String classPath = System.getProperty("java.class.path");
>
> But it only returns Eclipse's internal classpath:
>
> Class path =
>
E:\eclipse21M3\eclipse\plugins\org.eclipse.pde.ui_2.1.0\laun cher\slimlaunche
> r.jar;E:\eclipse21M3\eclipse\plugins\org.eclipse.core.boot_2 .1.0\boot.jar
>
> And I do not want to force my users to launch Eclipse using a modified
> command line, such as with option -cp <...>.
>
> How could I do that without resorting to JNI ?
>
> Best regards,
>
> Alex.
>
>
>
>
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #41438 is a reply to message #41186] Fri, 10 January 2003 07:00 Go to previous messageGo to next message
David Vydra is currently offline David VydraFriend
Messages: 12
Registered: July 2009
Junior Member
I am not sure if Eclipse has it, but Ant source code has classes to read OS
env vars.
-d
"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:avjhme$1hu$1@rogue.oti.com...
> Hello,
>
> I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> save needless user work to set the PATH for a Jar file that is already in
> system CLASSPATH (db2java.zip, if you mind, but it could be anything in
the
> system CLASSPATH).
>
> I have tried
> String classPath = System.getProperty("java.class.path");
>
> But it only returns Eclipse's internal classpath:
>
> Class path =
>
E:\eclipse21M3\eclipse\plugins\org.eclipse.pde.ui_2.1.0\laun cher\slimlaunche
> r.jar;E:\eclipse21M3\eclipse\plugins\org.eclipse.core.boot_2 .1.0\boot.jar
>
> And I do not want to force my users to launch Eclipse using a modified
> command line, such as with option -cp <...>.
>
> How could I do that without resorting to JNI ?
>
> Best regards,
>
> Alex.
>
>
>
>
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #42039 is a reply to message #41438] Fri, 17 January 2003 22:06 Go to previous message
Robert Gagliardo is currently offline Robert GagliardoFriend
Messages: 2
Registered: July 2009
Junior Member
yes, but it\'s quite a bit of work to do so :)



David Vydra wrote:

> I am not sure if Eclipse has it, but Ant source code has classes to read OS
> env vars.
> -d
> \"Alexandre Vermeerbergen\" <ave@ds-fr.com> wrote in message
> news:avjhme$1hu$1@rogue.oti.com...
> > Hello,
> >
> > I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> > save needless user work to set the PATH for a Jar file that is already in
> > system CLASSPATH (db2java.zip, if you mind, but it could be anything in
> the
> > system CLASSPATH).
> >
> > I have tried
> > String classPath = System.getProperty(\"java.class.path\");
> >
> > But it only returns Eclipse\'s internal classpath:
> >
> > Class path =
> >
>
E:\\eclipse21M3\\eclipse\\plugins\\org.eclipse.pde.ui_2.1.0\ \launcher\\slimlaunche
> >
r.jar;E:\\eclipse21M3\\eclipse\\plugins\\org.eclipse.core.bo ot_2.1.0\\boot.jar
> >
> > And I do not want to force my users to launch Eclipse using a modified
> > command line, such as with option -cp <...>.
> >
> > How could I do that without resorting to JNI ?
> >
> > Best regards,
> >
> > Alex.
> >
> >
> >
> >
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #588524 is a reply to message #41186] Thu, 09 January 2003 13:32 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
ask in eclipse.tools

"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:avjhme$1hu$1@rogue.oti.com...
> Hello,
>
> I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> save needless user work to set the PATH for a Jar file that is already in
> system CLASSPATH (db2java.zip, if you mind, but it could be anything in
the
> system CLASSPATH).
>
> I have tried
> String classPath = System.getProperty("java.class.path");
>
> But it only returns Eclipse's internal classpath:
>
> Class path =
>
E:\eclipse21M3\eclipse\plugins\org.eclipse.pde.ui_2.1.0\laun cher\slimlaunche
> r.jar;E:\eclipse21M3\eclipse\plugins\org.eclipse.core.boot_2 .1.0\boot.jar
>
> And I do not want to force my users to launch Eclipse using a modified
> command line, such as with option -cp <...>.
>
> How could I do that without resorting to JNI ?
>
> Best regards,
>
> Alex.
>
>
>
>
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #588563 is a reply to message #41186] Fri, 10 January 2003 07:00 Go to previous message
David Vydra is currently offline David VydraFriend
Messages: 12
Registered: July 2009
Junior Member
I am not sure if Eclipse has it, but Ant source code has classes to read OS
env vars.
-d
"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:avjhme$1hu$1@rogue.oti.com...
> Hello,
>
> I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> save needless user work to set the PATH for a Jar file that is already in
> system CLASSPATH (db2java.zip, if you mind, but it could be anything in
the
> system CLASSPATH).
>
> I have tried
> String classPath = System.getProperty("java.class.path");
>
> But it only returns Eclipse's internal classpath:
>
> Class path =
>
E:\eclipse21M3\eclipse\plugins\org.eclipse.pde.ui_2.1.0\laun cher\slimlaunche
> r.jar;E:\eclipse21M3\eclipse\plugins\org.eclipse.core.boot_2 .1.0\boot.jar
>
> And I do not want to force my users to launch Eclipse using a modified
> command line, such as with option -cp <...>.
>
> How could I do that without resorting to JNI ?
>
> Best regards,
>
> Alex.
>
>
>
>
Re: Reading OS CLASSPATH from an Eclipse Plug-in ? [message #588794 is a reply to message #41438] Fri, 17 January 2003 22:06 Go to previous message
Robert Gagliardo is currently offline Robert GagliardoFriend
Messages: 2
Registered: July 2009
Junior Member
yes, but it\'s quite a bit of work to do so :)



David Vydra wrote:

> I am not sure if Eclipse has it, but Ant source code has classes to read OS
> env vars.
> -d
> \"Alexandre Vermeerbergen\" <ave@ds-fr.com> wrote in message
> news:avjhme$1hu$1@rogue.oti.com...
> > Hello,
> >
> > I need to read the OS / system CLASSPATH from an Eclipse Plug-in, so as to
> > save needless user work to set the PATH for a Jar file that is already in
> > system CLASSPATH (db2java.zip, if you mind, but it could be anything in
> the
> > system CLASSPATH).
> >
> > I have tried
> > String classPath = System.getProperty(\"java.class.path\");
> >
> > But it only returns Eclipse\'s internal classpath:
> >
> > Class path =
> >
>
E:\\eclipse21M3\\eclipse\\plugins\\org.eclipse.pde.ui_2.1.0\ \launcher\\slimlaunche
> >
r.jar;E:\\eclipse21M3\\eclipse\\plugins\\org.eclipse.core.bo ot_2.1.0\\boot.jar
> >
> > And I do not want to force my users to launch Eclipse using a modified
> > command line, such as with option -cp <...>.
> >
> > How could I do that without resorting to JNI ?
> >
> > Best regards,
> >
> > Alex.
> >
> >
> >
> >
Previous Topic:Who can help me to find a job about java in Canada??
Next Topic:Knoppix for showing off Eclipse
Goto Forum:
  


Current Time: Sat Apr 20 03:30:28 GMT 2024

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

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

Back to the top