Adding eclipse jvm arguments to version control - eclipse

In our eclipse project we have some jvm arguments that are required for the project to work. The project is connected to clearcase for version control.
How can we add the jvm arguments to version control so new developers will have them set up when they join the project (or have the rest of the team updated when someone makes a change)?
Thanks,
Alex

Where are theses JVM arguments needed? At the launch of Eclipse? For the compilation of your project?
If you need JVM arguments at the launch of Eclipse, you have to edit the "eclipse.ini file", at the root of your Eclipse installation folder.
If you need JVM arguments at compile time, you can customize them in Eclipse preferences.

You can add them to a launcher that you will:
export within your current version-control workspace
version
See where are the external tools launch configurations in Eclipse.
See also blog post "Tip: Creating and Sharing Launch Configurations"
Select the 'Shared file' option. Select the project to which this launch configuration belongs. I suggest the launch configurations to be saved at the root of the project directory.

have you tried adding it to your build.xml?

I would create lunch configuration that can be imported later on. First create a run/debug configuration, for successful run on your local pc. If it is team project this run configuration will be fine on others machines. Then export it: file->export-> run/debug->launch configuration and select correct one that you have created. Then you will get that exported to the file that can be kept under version control. To import it do file-> import -> run/debug -> launch configuration and select the file.

Related

Include Run Configurations in SVN project in MyEclipse

How can I configure MyEclipse and the SVN plugin (Subclipse 4.3.3) so that my Run Configurations are included in the source code control. Every time a new developer checks out the project, he doesn't have the Run Configurations needed to test the application properly or to do the Maven packaging correctly.
Is there a way?
To share your run/launch configuration, go to the launch configuration (Run > Run Configurations...) tab Common for Save as choose Shared file (instead of Local file).
In addition, you can choose to Display in favorites menu to add it to the drop-down of the corresponding button in the main toolbar.

How to remove launch configuration histories in eclipse?

Right click an arbitrary existing project in Package Explore, choose "export..." - "Java" - "Runnable JAR file", I find all the old projects in the "launch configuration" list. Those projects have already been removed from the disk, and are not visible in the Package Explore. How can I remove them from that list? I'm using eclipse indigo.
This question seems to be well answered here, however, to make changes I have simply deleted every undesirable launch configuration from the below path.
${WORKSPACE}/.metadata/.plugins/org.eclipse.debug.core/.launches/Delete all the .class LAUNCH Files
After deleting the files, it is necessary to restart Eclipse for the changes to take effect.
Under Window...Preferences...Run/Debug...Launching...Launch Configurations, you can activate and deactivate some filters that restrict what is shown in Run...Run Configurations. I think it is what you are looking for.
Eclipse menu -> Run -> Run Configurations... pops up the list of all viable run configurations, grouped by type. You are looking for those under Java Application. Any of these are deletable. Delete them and they will no longer show up in Run/Launch configuration lists.
Go to Run->Run configuration. Delete the existing saved projects under the Java Application.
Run the class, having main method from eclipse. It will be automatically set.
create runnable Jar.
Go to Run->Run configuration. Delete the existing saved projects under the Java Application.
Then run the class, having main method from eclipse. It will be automatically set.
Now create runnable Jar.

How do I save the run and debug configurations in the eclipse IDE

How do I save the run and debug configurations in the eclipse IDE?
Basically a lot of what I do in my job requires me to configure applications that I run often, but I forget these configurations, and it would be nice to have a backup of them if I have to reinstall eclipse. Any help appreciated.
This is the version I have:
Eclipse IDE for Java Developers
Version: Indigo Service Release 1
Build id: 20110916-0149
Run the app once
Go to Run -> Run Configurations
Select the existing launch config for the app
Hit the Common tab
Configure Save As -> Shared file
If you store them somewhere outside the workspace (e.g. on a shared drive) you may later import them into a different workspace: File -> Import -> Run/Debug -> Launch Configurations.
You may also select a config as a favorite if you like:
Click the green Run icon in the toolbar
Select Organize Favorites
Add the desired launch configs

how to export or copy java applet parameters on eclipse

I set a bunch of applet parameters on run/debug configurations on eclipse.
I would like to share these parameters with my co-workers, but I cannot find an easy way to copy these parameters. I looked through the plugin and project files to figure out where these parameters are stored, but I couldn't find them. Does anyone happen to know where these configurations are stored?
thanks in advance...
Launch configurations in Eclipse can be saved in the workspace in one of the projects and committed under source control. When the project is imported in Eclipse, the launch configuration will be found and automatically added in Eclipse.
To store the launch configuration in the workspace:
Run > Run Configurations... > Select the launch configuration > Common tab > Shared file
In the text field, you specify the location, where the configuration to be stored.

Launching run configuration outside Eclipse IDE

I have a run configuration defined for my Eclipse RCP application which is saved to a .launch file. Is there a way to use this launch configuration outside the Eclipse IDE? i.e, it would be nice to be able to launch the application from the command line for continuous integration purposes.
You can get the command line Eclipse uses:
Run your program in Eclipse
Go to the "Debug" view
Right-click on the process (probably the second item in the tree) and select "Properties"
Copy shell command and delete the agentlib flag to run in bash. Unfortunately, you need to do this whenever you change the configuration.
Yes, you could create and export a product configuration based on your launch-configuration:
Create new Product Configuration (File -> New -> Other)
Name the file (e.g. myrcp.product)
Select "Use a launch configuration" on the first page of the wizard
The product editor should open automatically. In the Exporting section you should be able to export your product using the "Eclipse Product export wizard".
Resource: Eclipse FAQ - How can I deploy my RCP app
Have a look at this PDE Build tutorial. It explains how to build and test (or run) your product using Ant.
It is possible to do that with a little workaround. You can find your configuration at workspace\.metadata\.plugins\org.eclipse.debug.core\.launches. So, open it in text editor and find an attribute containing goals, e.g. clean install -DskipTests=true.Then, go to the root of your project and execute that by the CMD:
mvn clean install -DskipTests=true
This should be similar for other goals.