In Eclipse, Server view, I created a new Server and following the prompts
created a new Tomcat 5.5 server.

I would like to know how is the related .LAUNCH file created in
<workspace-folder>\.metadata\.plugins\org.eclipse.debug.core\.launches

By creation, I mean it has some deafult VM settings;
where do they come from?
can I edit or set any preferance whereby the default VM settings; are
appended with a few of my own (sparing me the effort of editing the launch
configuration, every time I creat a server instance)

~g1
PS: For some reason; I need to 're-cycle' (delete & create-new) the server
instance a lot of times.]]>2009-07-17T11:31:31-00:00Re: Default VM settings in the .launch file for Tomcat server.https://www.eclipse.org/forums/index.php/mv/msg/74858/233797/#msg_233797
> Hi,
>
> In Eclipse, Server view, I created a new Server and following the
> prompts created a new Tomcat 5.5 server.
>
> I would like to know how is the related .LAUNCH file created in
> <workspace-folder>\.metadata\.plugins\org.eclipse.debug.core\.launches

It's created programmatically by the WTP server support. I can point
you to source code if you want to dig deeper.

>
> By creation, I mean it has some deafult VM settings;
> where do they come from?
> can I edit or set any preferance whereby the default VM settings; are
> appended with a few of my own (sparing me the effort of editing the
> launch configuration, every time I creat a server instance)

The only preference that I can think of that would affect the server
launching like this for Tomcat servers is the Default VM Arguments
available in the Installed JRE. These arguments would not appear in the
launch configuration, but would be included when Tomcat is started with
a Tomcat runtime that used that JRE.

>
> ~g1
> PS: For some reason; I need to 're-cycle' (delete & create-new) the
> server instance a lot of times.

What goes wrong that you need to re-cycle the server?

>]]>Larry Isaacs2009-07-17T13:20:02-00:00Re: Default VM settings in the .launch file for Tomcat server.https://www.eclipse.org/forums/index.php/mv/msg/74858/233813/#msg_233813
To be explicit, I want the VM arguments in the Launch file to include....

I can easily do that by editing the launch configuration via the wizard
provided; but I was looking for a way, whereby those -X vm paramaters are
applied to the server launch configuration everytime it is created by
default.

But I find myself, recycling the server instance very often and its a pain
to edit the configuration to add the custom -X vm parameters every time;
and so want it added by default.

As it is done programatically by the WTP plugin, please can you point me
to the exact plugin/ source; (I am assuming the parameters are picked from
a resources bundle and not hard coded....that way maybe I can edit the
resources bundle and rebuild the plugin and use).

~g1]]>Jeevan Sunkersett2009-07-17T18:41:03-00:00Re: Default VM settings in the .launch file for Tomcat server.https://www.eclipse.org/forums/index.php/mv/msg/74858/233821/#msg_233821
if what you say, works ....

> The only preference that I can think of that would affect the server
> launching like this for Tomcat servers is the Default VM Arguments
> available in the Installed JRE. These arguments would not appear in the
> launch configuration, but would be included when Tomcat is started with
> a Tomcat runtime that used that JRE.

that too can suffice for now; let me test it.

~g1

PS: BTW, I only took Tomcat as an example.
I guess this will apply to any server supported in WTP
(I am primarily using Gerinomo)]]>Jeevan Sunkersett2009-07-17T18:44:48-00:00Re: Default VM settings in the .launch file for Tomcat server.https://www.eclipse.org/forums/index.php/mv/msg/74858/233828/#msg_233828
> Thx Larry ,
>
> To be explicit, I want the VM arguments in the Launch file to include....
>
> -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=104 4
>
> (for remote debuging)
>
> I can easily do that by editing the launch configuration via the wizard
> provided; but I was looking for a way, whereby those -X vm paramaters
> are applied to the server launch configuration everytime it is created
> by default.
>
> But I find myself, recycling the server instance very often and its a
> pain to edit the configuration to add the custom -X vm parameters every
> time; and so want it added by default.
>
> As it is done programatically by the WTP plugin, please can you point me
> to the exact plugin/ source; (I am assuming the parameters are picked
> from a resources bundle and not hard coded....that way maybe I can edit
> the resources bundle and rebuild the plugin and use).

What needs to be done to "fix up" a default launch configuration is
either dynamic or fixed, so there isn't much to gained by a resource
bundle lookup. You can start with the
org.eclipse.jst.server.tomcat.core.TomcatServerBehaviour.set upLaunchConfiguration()
class found in the tomcat.core plug-in. That is where the Tomcat
plug-in applies it's required changes to the launch configuration.

You can also look at
org.eclipse.wst.server.core.Server.getLaunchConfiguration() to see where
the launch configuration "originates". A quick look didn't seem to show
much initialization prior to being handed to the
setupLaunchConfiguration() method.