Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Using a config.ini in a PDE run configuration
Using a config.ini in a PDE run configuration [message #55934] Thu, 16 April 2009 15:42 Go to next message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,

I am trying to set up an environment for developing an equinox-based
application. This is a server-based application, not a UI application,
but the tools for the run environment make me think this is the right
place to ask this. So correct me if I'm wrong ;-)

I'm following this tutorial:

http://springosgi.googlepages.com/

And that works great, I can create a target platform to work in no
problem. However, I have a config.ini that I'd like to use to specify
the bundles I want (though this wouldn't be a hard requirement) and to
specify the osgi variable 'org.osgi.framework.system.packages'.

The problem I'm running into is that if I specify a configuration area,
when I run the platform, my config.ini is over-written. I tried
specifying 'org.osgi.framework.system.packages' in the VM arguments, but
packages near the end seem to be ignored (I'm guessing there's a limit
to how big the command line for the VM argument can be).

Is there any way to get the target platform to use my config.ini without
modifying it?

Thanks for any pointers!

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #55971 is a reply to message #55934] Thu, 16 April 2009 15:50 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Hi,
>
> I am trying to set up an environment for developing an equinox-based
> application. This is a server-based application, not a UI application,
> but the tools for the run environment make me think this is the right
> place to ask this. So correct me if I'm wrong ;-)
>
> I'm following this tutorial:
>
> http://springosgi.googlepages.com/
>
> And that works great, I can create a target platform to work in no
> problem. However, I have a config.ini that I'd like to use to specify
> the bundles I want (though this wouldn't be a hard requirement) and to
> specify the osgi variable 'org.osgi.framework.system.packages'.
>
> The problem I'm running into is that if I specify a configuration area,
> when I run the platform, my config.ini is over-written. I tried
> specifying 'org.osgi.framework.system.packages' in the VM arguments, but
> packages near the end seem to be ignored (I'm guessing there's a limit
> to how big the command line for the VM argument can be).
>
> Is there any way to get the target platform to use my config.ini without
> modifying it?
>
> Thanks for any pointers!

When you're selfhosting, in Eclipse Application launch configuration,
there should be a "Configuration" tab where you can specify a config.ini
to use. Note that in 3.5, we're working on removing that and just
allowing you to specify a set of properties.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #55997 is a reply to message #55971] Thu, 16 April 2009 15:58 Go to previous messageGo to next message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Hi,
>>

[snip]

>> Is there any way to get the target platform to use my config.ini
>> without modifying it?
>>
>> Thanks for any pointers!
>
> When you're selfhosting, in Eclipse Application launch configuration,
> there should be a "Configuration" tab where you can specify a config.ini
> to use. Note that in 3.5, we're working on removing that and just
> allowing you to specify a set of properties.
>

Aha! At first I thought "WTF?!?! I don't recall seeing a
'Configuration' tab!!!" but then I see there is an "Eclipse Application"
(as you suggest) type that has a configuration tab, the "OSGI
Framework" run configuration, which is what I was using, does not.
Thank you so much Chris, I'll have a look at doing an Eclipse
Application run configuration instead!

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #56051 is a reply to message #55997] Thu, 16 April 2009 16:09 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Aha! At first I thought "WTF?!?! I don't recall seeing a
> 'Configuration' tab!!!" but then I see there is an "Eclipse Application"
> (as you suggest) type that has a configuration tab, the "OSGI
> Framework" run configuration, which is what I was using, does not. Thank
> you so much Chris, I'll have a look at doing an Eclipse Application run
> configuration instead!

Both of the launch configurations are near identical... especially when
Eclipse 3.5 comes out.

You should still be able to pass OSGi properties as system properties
via -Dosgi.property=foo in the OSGi launch configuration.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #56076 is a reply to message #55997] Thu, 16 April 2009 16:09 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Aha! At first I thought "WTF?!?! I don't recall seeing a
> 'Configuration' tab!!!" but then I see there is an "Eclipse Application"
> (as you suggest) type that has a configuration tab, the "OSGI
> Framework" run configuration, which is what I was using, does not. Thank
> you so much Chris, I'll have a look at doing an Eclipse Application run
> configuration instead!

Both of the launch configurations are near identical... especially when
Eclipse 3.5 comes out.

You should still be able to pass OSGi properties as system properties
via -Dosgi.property=foo in the OSGi launch configuration.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #56103 is a reply to message #56051] Thu, 16 April 2009 16:14 Go to previous messageGo to next message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Aha! At first I thought "WTF?!?! I don't recall seeing a
>> 'Configuration' tab!!!" but then I see there is an "Eclipse
>> Application" (as you suggest) type that has a configuration tab, the
>> "OSGI Framework" run configuration, which is what I was using, does
>> not. Thank you so much Chris, I'll have a look at doing an Eclipse
>> Application run configuration instead!
>
> Both of the launch configurations are near identical... especially when
> Eclipse 3.5 comes out.
>
Cool, I might have to download a snapshot then.

> You should still be able to pass OSGi properties as system properties
> via -Dosgi.property=foo in the OSGi launch configuration.
>
Yeah, but I have a lot of system packages to make available to the
runtime and I *think* that the length of the command line is limiting me.

BTW, I still seem to have my config.ini overwritten. I'm going to try a
couple more things, but is it expected that the eclipse run config is
going to overwite an existing config.ini if I tell the run config that
the configuration area is in the same directory where my template
config.ini lives? Also, the overwritten config.ini still doesn't have
my system packages variable in it.

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #56129 is a reply to message #56103] Thu, 16 April 2009 16:23 Go to previous messageGo to next message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Craig L. Ching wrote:
> BTW, I still seem to have my config.ini overwritten. I'm going to try a
> couple more things, but is it expected that the eclipse run config is
> going to overwite an existing config.ini if I tell the run config that
> the configuration area is in the same directory where my template
> config.ini lives? Also, the overwritten config.ini still doesn't have
> my system packages variable in it.
>
Yep, that does indeed seem to be the case. It's a bit disappointing, I
have a maven assembly that has everything I need, it would be nice if I
could just point the run configuration at the extracted assembly and say
"use that configuration." But I'm sure I can make this work somehow ;-)
Thanks for your help Chris!

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #56154 is a reply to message #56129] Thu, 16 April 2009 16:53 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Yep, that does indeed seem to be the case. It's a bit disappointing, I
> have a maven assembly that has everything I need, it would be nice if I
> could just point the run configuration at the extracted assembly and say
> "use that configuration." But I'm sure I can make this work somehow ;-)
> Thanks for your help Chris!

The template config.ini is only used for launching/self-hosting... it
doesn't work when you export. I generally recommend avoiding specifying
your own config.ini as that feature is going away in 3.5 and use -D vm
arguments for properties if possible. If you're exporting system
packages, why not create a fragment to the system bundle and export them
that way?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #56177 is a reply to message #56154] Thu, 16 April 2009 17:10 Go to previous message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Yep, that does indeed seem to be the case. It's a bit disappointing,
>> I have a maven assembly that has everything I need, it would be nice
>> if I could just point the run configuration at the extracted assembly
>> and say "use that configuration." But I'm sure I can make this work
>> somehow ;-) Thanks for your help Chris!
>
> The template config.ini is only used for launching/self-hosting... it
> doesn't work when you export. I generally recommend avoiding specifying
> your own config.ini as that feature is going away in 3.5 and use -D vm
> arguments for properties if possible. If you're exporting system
> packages, why not create a fragment to the system bundle and export them
> that way?
>

Because I hadn't thought of that? ;-P My only defense is that I thought
I *was* doing the right thing, but thanks for the advice, I'll probably
end up doing that then. Thanks again for your help Chris!

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #595504 is a reply to message #55934] Thu, 16 April 2009 15:50 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Hi,
>
> I am trying to set up an environment for developing an equinox-based
> application. This is a server-based application, not a UI application,
> but the tools for the run environment make me think this is the right
> place to ask this. So correct me if I'm wrong ;-)
>
> I'm following this tutorial:
>
> http://springosgi.googlepages.com/
>
> And that works great, I can create a target platform to work in no
> problem. However, I have a config.ini that I'd like to use to specify
> the bundles I want (though this wouldn't be a hard requirement) and to
> specify the osgi variable 'org.osgi.framework.system.packages'.
>
> The problem I'm running into is that if I specify a configuration area,
> when I run the platform, my config.ini is over-written. I tried
> specifying 'org.osgi.framework.system.packages' in the VM arguments, but
> packages near the end seem to be ignored (I'm guessing there's a limit
> to how big the command line for the VM argument can be).
>
> Is there any way to get the target platform to use my config.ini without
> modifying it?
>
> Thanks for any pointers!

When you're selfhosting, in Eclipse Application launch configuration,
there should be a "Configuration" tab where you can specify a config.ini
to use. Note that in 3.5, we're working on removing that and just
allowing you to specify a set of properties.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #595517 is a reply to message #55971] Thu, 16 April 2009 15:58 Go to previous message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Hi,
>>

[snip]

>> Is there any way to get the target platform to use my config.ini
>> without modifying it?
>>
>> Thanks for any pointers!
>
> When you're selfhosting, in Eclipse Application launch configuration,
> there should be a "Configuration" tab where you can specify a config.ini
> to use. Note that in 3.5, we're working on removing that and just
> allowing you to specify a set of properties.
>

Aha! At first I thought "WTF?!?! I don't recall seeing a
'Configuration' tab!!!" but then I see there is an "Eclipse Application"
(as you suggest) type that has a configuration tab, the "OSGI
Framework" run configuration, which is what I was using, does not.
Thank you so much Chris, I'll have a look at doing an Eclipse
Application run configuration instead!

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #595533 is a reply to message #55997] Thu, 16 April 2009 16:09 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Aha! At first I thought "WTF?!?! I don't recall seeing a
> 'Configuration' tab!!!" but then I see there is an "Eclipse Application"
> (as you suggest) type that has a configuration tab, the "OSGI
> Framework" run configuration, which is what I was using, does not. Thank
> you so much Chris, I'll have a look at doing an Eclipse Application run
> configuration instead!

Both of the launch configurations are near identical... especially when
Eclipse 3.5 comes out.

You should still be able to pass OSGi properties as system properties
via -Dosgi.property=foo in the OSGi launch configuration.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #595538 is a reply to message #55997] Thu, 16 April 2009 16:09 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Aha! At first I thought "WTF?!?! I don't recall seeing a
> 'Configuration' tab!!!" but then I see there is an "Eclipse Application"
> (as you suggest) type that has a configuration tab, the "OSGI
> Framework" run configuration, which is what I was using, does not. Thank
> you so much Chris, I'll have a look at doing an Eclipse Application run
> configuration instead!

Both of the launch configurations are near identical... especially when
Eclipse 3.5 comes out.

You should still be able to pass OSGi properties as system properties
via -Dosgi.property=foo in the OSGi launch configuration.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #595546 is a reply to message #56051] Thu, 16 April 2009 16:14 Go to previous message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Aha! At first I thought "WTF?!?! I don't recall seeing a
>> 'Configuration' tab!!!" but then I see there is an "Eclipse
>> Application" (as you suggest) type that has a configuration tab, the
>> "OSGI Framework" run configuration, which is what I was using, does
>> not. Thank you so much Chris, I'll have a look at doing an Eclipse
>> Application run configuration instead!
>
> Both of the launch configurations are near identical... especially when
> Eclipse 3.5 comes out.
>
Cool, I might have to download a snapshot then.

> You should still be able to pass OSGi properties as system properties
> via -Dosgi.property=foo in the OSGi launch configuration.
>
Yeah, but I have a lot of system packages to make available to the
runtime and I *think* that the length of the command line is limiting me.

BTW, I still seem to have my config.ini overwritten. I'm going to try a
couple more things, but is it expected that the eclipse run config is
going to overwite an existing config.ini if I tell the run config that
the configuration area is in the same directory where my template
config.ini lives? Also, the overwritten config.ini still doesn't have
my system packages variable in it.

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #595550 is a reply to message #56103] Thu, 16 April 2009 16:23 Go to previous message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Craig L. Ching wrote:
> BTW, I still seem to have my config.ini overwritten. I'm going to try a
> couple more things, but is it expected that the eclipse run config is
> going to overwite an existing config.ini if I tell the run config that
> the configuration area is in the same directory where my template
> config.ini lives? Also, the overwritten config.ini still doesn't have
> my system packages variable in it.
>
Yep, that does indeed seem to be the case. It's a bit disappointing, I
have a maven assembly that has everything I need, it would be nice if I
could just point the run configuration at the extracted assembly and say
"use that configuration." But I'm sure I can make this work somehow ;-)
Thanks for your help Chris!

Cheers,
Craig
Re: Using a config.ini in a PDE run configuration [message #595559 is a reply to message #56129] Thu, 16 April 2009 16:53 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Craig L. Ching wrote:
> Yep, that does indeed seem to be the case. It's a bit disappointing, I
> have a maven assembly that has everything I need, it would be nice if I
> could just point the run configuration at the extracted assembly and say
> "use that configuration." But I'm sure I can make this work somehow ;-)
> Thanks for your help Chris!

The template config.ini is only used for launching/self-hosting... it
doesn't work when you export. I generally recommend avoiding specifying
your own config.ini as that feature is going away in 3.5 and use -D vm
arguments for properties if possible. If you're exporting system
packages, why not create a fragment to the system bundle and export them
that way?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Using a config.ini in a PDE run configuration [message #595566 is a reply to message #56154] Thu, 16 April 2009 17:10 Go to previous message
Craig L. Ching is currently offline Craig L. ChingFriend
Messages: 21
Registered: July 2009
Junior Member
Chris Aniszczyk wrote:
> Craig L. Ching wrote:
>> Yep, that does indeed seem to be the case. It's a bit disappointing,
>> I have a maven assembly that has everything I need, it would be nice
>> if I could just point the run configuration at the extracted assembly
>> and say "use that configuration." But I'm sure I can make this work
>> somehow ;-) Thanks for your help Chris!
>
> The template config.ini is only used for launching/self-hosting... it
> doesn't work when you export. I generally recommend avoiding specifying
> your own config.ini as that feature is going away in 3.5 and use -D vm
> arguments for properties if possible. If you're exporting system
> packages, why not create a fragment to the system bundle and export them
> that way?
>

Because I hadn't thought of that? ;-P My only defense is that I thought
I *was* doing the right thing, but thanks for the advice, I'll probably
end up doing that then. Thanks again for your help Chris!

> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk

Cheers,
Craig
Previous Topic:When is a newly imported project ready to read?
Next Topic:Unable to export to other platforms
Goto Forum:
  


Current Time: Fri Jun 18 03:54:55 GMT 2021

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

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

Back to the top