Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to detect if launching from eclipse
How to detect if launching from eclipse [message #62244] Tue, 19 May 2009 09:24 Go to next message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
In my OSGi application I'm using a password masking trick which sends
backspaces on a separate thread to hide the password when reading from
System.in.

This works fine when launching my application from a console, but not
within Eclipse.

Is there a way to find out if my application is running within Eclipse?

---
Anders
Re: How to detect if launching from eclipse [message #62700 is a reply to message #62244] Fri, 22 May 2009 19:14 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You can try looking for the "eclipse.pde.launcher" system property.

Also the "eclipse.commands" system property should have something like:
-dev
file:C:/Dev/Platform/Workspace/.metadata/.plugins/org.eclips e.pde.core/New_configuration/dev.properties

-Andrew

Anders Forsell wrote:
> In my OSGi application I'm using a password masking trick which sends
> backspaces on a separate thread to hide the password when reading from
> System.in.
>
> This works fine when launching my application from a console, but not
> within Eclipse.
>
> Is there a way to find out if my application is running within Eclipse?
>
> ---
> Anders
Re: How to detect if launching from eclipse [message #62823 is a reply to message #62700] Sun, 24 May 2009 06:14 Go to previous message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
Thanks Andrew!

I found the "eclipse.launcher" property and check if it ends with
"eclipse.exe".

---
Anders
"Andrew Niefer" <aniefer@ca.ibm.com> skrev i meddelandet
news:gv6tja$58g$1@build.eclipse.org...
> You can try looking for the "eclipse.pde.launcher" system property.
>
> Also the "eclipse.commands" system property should have something like:
> -dev
> file:C:/Dev/Platform/Workspace/.metadata/.plugins/org.eclips e.pde.core/New_configuration/dev.properties
>
> -Andrew
>
> Anders Forsell wrote:
>> In my OSGi application I'm using a password masking trick which sends
>> backspaces on a separate thread to hide the password when reading from
>> System.in.
>>
>> This works fine when launching my application from a console, but not
>> within Eclipse.
>>
>> Is there a way to find out if my application is running within Eclipse?
>>
>> ---
>> Anders
Re: How to detect if launching from eclipse [message #597776 is a reply to message #62244] Fri, 22 May 2009 19:14 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You can try looking for the "eclipse.pde.launcher" system property.

Also the "eclipse.commands" system property should have something like:
-dev
file:C:/Dev/Platform/Workspace/.metadata/.plugins/org.eclips e.pde.core/New_configuration/dev.properties

-Andrew

Anders Forsell wrote:
> In my OSGi application I'm using a password masking trick which sends
> backspaces on a separate thread to hide the password when reading from
> System.in.
>
> This works fine when launching my application from a console, but not
> within Eclipse.
>
> Is there a way to find out if my application is running within Eclipse?
>
> ---
> Anders
Re: How to detect if launching from eclipse [message #597816 is a reply to message #62700] Sun, 24 May 2009 06:14 Go to previous message
Anders Forsell is currently offline Anders ForsellFriend
Messages: 127
Registered: July 2009
Senior Member
Thanks Andrew!

I found the "eclipse.launcher" property and check if it ends with
"eclipse.exe".

---
Anders
"Andrew Niefer" <aniefer@ca.ibm.com> skrev i meddelandet
news:gv6tja$58g$1@build.eclipse.org...
> You can try looking for the "eclipse.pde.launcher" system property.
>
> Also the "eclipse.commands" system property should have something like:
> -dev
> file:C:/Dev/Platform/Workspace/.metadata/.plugins/org.eclips e.pde.core/New_configuration/dev.properties
>
> -Andrew
>
> Anders Forsell wrote:
>> In my OSGi application I'm using a password masking trick which sends
>> backspaces on a separate thread to hide the password when reading from
>> System.in.
>>
>> This works fine when launching my application from a console, but not
>> within Eclipse.
>>
>> Is there a way to find out if my application is running within Eclipse?
>>
>> ---
>> Anders
Previous Topic:View menuContribution always disabled
Next Topic:View menuContribution always disabled
Goto Forum:
  


Current Time: Sun Jun 20 23:34:36 GMT 2021

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

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

Back to the top