Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make eclipse launch a program in the eclipse workbench from the command line?

Tags:

eclipse

How do I make eclipse launch a program in the eclipse workbench from the command line?

Specifically, I would like to run a command from the shell that causes my eclipse instance (which is already open) to run a particular program. If there is no program to do this from the shell, is there some RPC API that eclipse provides to make such a program?

I do not want to make a plugin. It must be a separate process that controls eclipse.

like image 252
lalala666 Avatar asked Aug 23 '11 13:08

lalala666


People also ask

How do I run Eclipse from command line?

If you need to launch Eclipse from the command line, you can use the symbolic link "eclipse" in the top-level eclipse folder. It refers to the eclipse executable inside the application bundle and takes the same arguments as "eclipse.exe" on other platforms.

How do I open an Eclipse project in Terminal?

Open the workspace and then the project folder. Then run the Terminal application, type “cd” into the terminal window. “cd” is the command to change directory (or folder). You can then type the pathname to your “src” directory or you can drag the “src” folder from the Finder window and drop it on the Terminal window.

How do I open a Workbench in Eclipse?

To use Workbench, click on the Window menu in Eclipse and select Perspective. Next, select Open Perspective -> Other. Finally, select Remote System Explore (RSE ) and hit OK. The IDE look will change to something like this.

How do I start Eclipse from command line Linux?

To run Eclipse from anywhere in the Terminal, add the eclipse install directory to PATH environment variable. Append eclipse directory to the PATH. Save the file. Now we can launch Eclipse IDE on Ubuntu Linux from anywhere in the Terminal windows.


3 Answers

Eclipse Remote Control seems that it might do the trick https://github.com/marook/eclipse-remote-control from the Read me file.

Introduction

Eclipse plug-in project which adds remote control features to eclipse. Commands can be sent via the eclipse remote control client to a running eclipse instance.

I have not tried it myslef but I ran into it trying to figure out how to write an ant task that triggers .launch file

like image 126
ams Avatar answered Sep 24 '22 03:09

ams



First create a batch file and save it in a location.
For example if I want to invoke notepad , I will write in the batch as follows
start notepad
In eclipse, you can configure external tools.
Goto Run -> External Tools -> External Tools Configurations.
You will be presented with a Dialog box.
Now Click on the New Configuration Icon.
In the right pane of Window you can assign a configuration Name.
In the Location Text Box, Click on the "Browse File System" Button, and select the batch file you have created earlier.

In the Common Tab, uncheck "Launch In Background".
You can set this configuration in Favourites menu, by clicking the checkbox "External Tools" under Common Tab.
Click on Apply.

Now you can Run your required application.
This is for Windows only.
I don't have any idea of this for Linux Machines.

like image 23
Harshavardhan Konakanchi Avatar answered Sep 20 '22 03:09

Harshavardhan Konakanchi


Take a look at Product Configuration

1º Create a new Product Configuration (Ctrl+N), and select "Use a launch configuration" (or another option, if it's more convenient) on the first page of the wizard.
2º In the Exporting section you should be able to export your product using the "Eclipse Product export wizard".
3º To run the product, follow this instructions

Hope it helps.

like image 41
elias Avatar answered Sep 23 '22 03:09

elias