how to export or copy java applet parameters on eclipse - 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.

Related

eclipse run/debug launch configs in ws/.../.launch do not show up in config dialog

regardless of importing them via file/import or just copy them from an old workspace to a new one (.metadata/.plugins/org.eclipse.debug.core/.launches) they didn't appear in the eclipse run/debug configurations dialog.
(however if i try to import them after i copied them already to that folder, i'm asked to override them - so that directory seems to be the correct one...)
my question is: how do i (re)import elder run/debug configurations to a new eclipse workspace?
update
this doesn't work out form me with versions 1903, 1909 and 1912
Do one of the following:
Export and import the launch configurations:
In the old workspace do File > Export...: Run/Debug > Launch Configurations
In the new workspace do File > Import...: Run/Debug > Launch Configurations
Share launch configurations:
In the old workspace in Run > Run Configurations... in the Common tab of all launch configurations to share select for Save as the option Shared file
Copy the <name>.launch file into a project of the new workspace
Please be aware that the files in .metadata are not intended to be edited or deleted.
thx #howlger for the approach - it was my fault and a silly mistake.
(i put this in here for the next luser like me XD)
the problem was, that the ones (the configs) I've missed did't show up, because the projects for this configs were not open in my new workspace. thats all.
when opening them, the configs will be listed in the overview.

Running ANT targets using .launch file

In one of my legacy project ant target is invoved from *.launch file. This file contains <launchConfiguration> tag and one of the attribute name "type" is ant class org.eclipse.ant.ANTLaunchConfigurationType, different parameter are set using this tag. When this launch file is executed in eclipse, one of the ANT target is executed specified in launchConfiguration tag.
I am not able to find any information around this functionality of ANT. Only relevant thread found is, which is unanswered
Running eclipse ant targets from an external command
I am not able to understand how launch files are created and how to set parameter to launchConfiguration tag.
The .launch files are created by Eclipse for every Run Configuration you want to be saved:
Open Eclipse.
Select a build.xml file.
Through the context menu, execute Run as/Ant build.... A dialog appears.
If you want to pass parameters to the Ant script, you have to fulfil the Arguments area (in the Main tab) like this:
-Darg1=value1
-Darg2=value2
...
Then, go to the Common Tab and focus on the Share file field: With the Browse button, select your project. This will create the .launch file into your project, and let it available for further executions. (You should rename it).
Execute Run.
You can edit the .launch configuration in menu Run>External tools>External tools configuration.
Note: Within the Run Configuration, you'd better spend some minutes reading all the parameters available in all the tabs. For example, in the Build tab, you can set if you want a project to be build before your script is executed (If not, unchecking the checkbox may save you a lot of time). Or in the Refresh tab, you can select which project directories you want to be refreshed after the script is executed, etc.
Launch configurations for Ant Builds are created and managed using the 'Run > External Tools > External Tools Configurations...' dialog.
You can import existing .launch files using 'File > Import... > Run/Debug > Launch Configurations'

Eclipse run configuration file exists in workspace

I copied a couple of launch configurations (created by the same eclipse version) from another workspace into my current workspace, but I can't get them to show up on the UI.
And I am sure it is at the right place because it's where the config created in this workspace is located as well (That is, it is at ./.metadata/.plugins/org.eclipse.debug.core/.launches )
How do I get the copied configuration files to show up on the UI?
Don't copy Eclipse configuration files like that. Use the "Export" function in the old workspace and "Import" in the new one.
Use 'File > Export > Run/Debug > Launch Configurations' to export one or more launch configurations.
Use 'File > Import > Run/Debug > Launch Configurations' to import one or more launch configurations.
.metadata isn't meant for human manipulation. You can specify that a launch configuration should live in a workspace as a regular workspace file from the Common tab in most launch configurations, then just copy them across as part of the containing project.

How can I have per project Debug Configuration in Eclipse?

I have configured some VM arguments inside the Debug Configuration. However, these settings are saved in .metadata\.plugins\org.eclipse.debug.core\.launches\Program.launch, which is outside the version control. Indeed, the whole .metadata folder is.
But this is something I wish to be shared amongst all the devs working on the project. In other words, I want per project Debug/Run Configuration.
Is it possible?
The launcher (.launch file) can be stored outside of .metadata: go to "Run → Run Configurations...", choose your launcher, and in its "Common" tab choose "Save as: Shared file". This will save the .launch file in the chosen folder, and then it can be committed to your version control system.

Adding eclipse jvm arguments to version control

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.