Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » VM arguments in RCP Product?
VM arguments in RCP Product? [message #461546] Thu, 11 January 2007 21:10 Go to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Where can I find documentation on passing VM arguments to an RCP product?

Are arguments in the launch configuration preserved during export?

Are variables (for example workspace_loc) preserved during export?

Thanks

Charlie
Re: VM arguments in RCP Product? [message #461548 is a reply to message #461546] Thu, 11 January 2007 22:17 Go to previous messageGo to next message
Scott Hathaway is currently offline Scott HathawayFriend
Messages: 5
Registered: July 2009
Junior Member
I can help answer you first question. Passing arguments to an rcp is
just like passing them to a full SDK. In windows, I create a shortcut to
the .exe and add the arguments to the end of the target. To find a list
of valid arguments look in the eclipse 3.2.1 help under the topic
"Workbench User Guide->Task->Running Eclipse". Java VM args are passed
by using the argument -vmargs. You can then put whatever Java VM args
you want after the vmargs argument. Hope this helps.

Charle Kelly wrote:
> Where can I find documentation on passing VM arguments to an RCP product?
>
> Are arguments in the launch configuration preserved during export?
>
> Are variables (for example workspace_loc) preserved during export?
>
> Thanks
>
> Charlie
Re: VM arguments in RCP Product? [message #461549 is a reply to message #461548] Thu, 11 January 2007 23:55 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Scott,

Thanks for the information.

I'm trying to avoid writing batch files and shell scripts.

I'm hoping to find a method to include the VM arguments within the
artifacts (Eclipse application, startup.jar, configuration files)
created by Eclipse when it exports a product for an RCP.

Thanks

Charlie


Scott Hathaway wrote:
> I can help answer you first question. Passing arguments to an rcp is
> just like passing them to a full SDK. In windows, I create a shortcut to
> the .exe and add the arguments to the end of the target. To find a list
> of valid arguments look in the eclipse 3.2.1 help under the topic
> "Workbench User Guide->Task->Running Eclipse". Java VM args are passed
> by using the argument -vmargs. You can then put whatever Java VM args
> you want after the vmargs argument. Hope this helps.
>
> Charle Kelly wrote:
>
>> Where can I find documentation on passing VM arguments to an RCP product?
>>
>> Are arguments in the launch configuration preserved during export?
>>
>> Are variables (for example workspace_loc) preserved during export?
>>
>> Thanks
>>
>> Charlie
Re: VM arguments in RCP Product? [message #461559 is a reply to message #461549] Fri, 12 January 2007 06:29 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
You can also edit the file 'eclipse.ini', or, if your code is called by a different name, 'product.ini'. There is one-line-per-argument, and often looks like:

-vmargs
-Xmx1024m

etc. -- just see your 'eclipse.ini' for examples.

NB the VM args need to come *after* the -vmargs line -- anything before that is treated as arguments to the Java process e.g.

-a
-b
-vmargs
-c
-d

would be effectively

java -c -d TheClass -a -b

Alex.
Re: VM arguments in RCP Product? [message #461603 is a reply to message #461549] Sat, 13 January 2007 08:26 Go to previous messageGo to next message
Diego Tognola is currently offline Diego TognolaFriend
Messages: 3
Registered: July 2009
Junior Member
Hi Charlie,

if you're using a *.product file, then open it in the Product
Configuration Editor, change to the "Launcher" tab and on the right hand
side there is a "Launching Arguments" section where you can specify "VM
Arguments".

hope that's what you're after ;-)
Diego

Charle Kelly wrote:
> Hi Scott,
>
> Thanks for the information.
>
> I'm trying to avoid writing batch files and shell scripts.
>
> I'm hoping to find a method to include the VM arguments within the
> artifacts (Eclipse application, startup.jar, configuration files)
> created by Eclipse when it exports a product for an RCP.
>
> Thanks
>
> Charlie
>
>
> Scott Hathaway wrote:
>> I can help answer you first question. Passing arguments to an rcp is
>> just like passing them to a full SDK. In windows, I create a shortcut
>> to the .exe and add the arguments to the end of the target. To find a
>> list of valid arguments look in the eclipse 3.2.1 help under the topic
>> "Workbench User Guide->Task->Running Eclipse". Java VM args are passed
>> by using the argument -vmargs. You can then put whatever Java VM args
>> you want after the vmargs argument. Hope this helps.
>>
>> Charle Kelly wrote:
>>
>>> Where can I find documentation on passing VM arguments to an RCP
>>> product?
>>>
>>> Are arguments in the launch configuration preserved during export?
>>>
>>> Are variables (for example workspace_loc) preserved during export?
>>>
>>> Thanks
>>>
>>> Charlie
Re: VM arguments in RCP Product? [message #461651 is a reply to message #461559] Mon, 15 January 2007 16:50 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Alex,

Thanks, this worked perfectly.

Also, when I added the arguments to the product editor, an "eclipse.ini"
file which contains the VM arguments was created automatically.

Charlie


Alex Blewitt wrote:
> You can also edit the file 'eclipse.ini', or, if your code is called by a different name, 'product.ini'. There is one-line-per-argument, and often looks like:
>
> -vmargs
> -Xmx1024m
>
> etc. -- just see your 'eclipse.ini' for examples.
>
> NB the VM args need to come *after* the -vmargs line -- anything before that is treated as arguments to the Java process e.g.
>
> -a
> -b
> -vmargs
> -c
> -d
>
> would be effectively
>
> java -c -d TheClass -a -b
>
> Alex.
Re: VM arguments in RCP Product? [message #461665 is a reply to message #461651] Tue, 16 January 2007 04:52 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
Sounds reasonable. Eclipse reads eclipse.ini and configuration/config.ini when starting up to determine command line arguments/properties respectively. (If you've called your product something other than 'eclipse', like 'myapp', then it will read myapp.ini (defaulting to eclipse.ini if it can't be found), then configuration/config.ini).

The .product mechanism is an easier way of encapsulating product properties in one place; it's then used to generate things like the eclipse.ini and other key features. So if you're doing .product development, edit the .product file and let it generate the eclipse.ini for you -- if you're not, then just edit the eclipse.ini.

Glad it worked out,

Alex.
Previous Topic:Eclipse Buddy Concept - Property File
Next Topic:my feature can't be disable
Goto Forum:
  


Current Time: Mon Sep 23 22:11:40 GMT 2024

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

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

Back to the top