1

Let's say I'm working on File1 in eclipse, which is some java class. When I hit F11, File2 runs. I want a different file, let's call it File3, to run. How do I do this?

Edit:

Let me clarify my question. I don't want to have a shortcut key launch a specific file. I have two java files, both can be independently launched. One is a debug server and the other is a production server. I have a text file that is read by the debug server. When I'm working on something in that text file, I'll quickly hit Ctrl+F11 to run the debug server. However, the production server starts. Thus it would be nice to specifically associate launchable files with unlaunchable files. There are other files (like java classes), that when I hit Ctrl+F11 I want the production server to be run. I was hoping there would be something in the run configurations that would allow me to make this association for certain files or groups of files. From what I see, this isn't option.

1 Answer 1

2

F11 will always launch the previously launched file. If you are finding a some way to assign a particular shortcut key sequence to launch a particular file, there's no way to do that in e clipse. You can use F11 or Ctrl + F11 to launch the previously launched file. Or You can use Alt+Shift+X,J to manually launch the Java file. Alt+Shift+X provides multiple options.

But you can chengae the Launch Configurations using Preferences->Run/Debug->Launching: Under the Launch Operations, It provides you the options to select follwings.

1. Always lanch the previously launched application (or)
2. Launch the selected resource or activive editor. If not launchable :
   - Launch the associated project (or)
   - Launch the previously launched application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.