Eclipse creates multiple launch configurations each time the same Scala program runs

Eclipse creates a new “Run Configuration” every time I run the Scala program. The problem is that I need to configure the default startup configuration (I need to change the working path). Therefore, when creating and configuring Run Configuration for the first time, everything works fine, but any subsequent attempts to launch the Scala file using "Run As" → "Scala Application" will fail, as my user settings will be lost and Scala will be run with the new default execution configuration .

The following figure shows what the Run Configuration dialog box looks like after running my Scala application three times. Only the first launch configuration has the necessary settings:

enter image description here

How to configure Eclipse to always use the same startup configuration when running the same Scala file? (I mean, without having to open the "Run Configuration ..." dialog every time).

+4
source share
3 answers

Set in the settings Eclipse Run/Debug > Launching -> Launch Operation - Always launch the previously launched application.

+2
source

You should not use the "Run as" parameter every time. Just click the start button (green circle with arrow) and select the correct configuration to start.

It should work.

0
source

Go to the Scala perspective on OSX Eclipse. Click the triangle next to the Run Toolbar button to open the Run button’s drop-down menu. Select "Organize Favorites ..." and select one or more launch configurations as favorites.

When one or more favorites are selected, clicking the Run button executes the last privileged launch configuration, which was performed instead of creating a new launch configuration.

0
source

Source: https://habr.com/ru/post/1443236/


All Articles