1

I want to import an existing eclipse project from command line(Linux).

from GUI it can be done by following method File->Import->General->Existing Project into workspace

same can be done using command line option? if yes please let me know how it can be done.

I tried below method from command line: eclipse -nosplash -data /path/to/your/workspace/directory -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import /path/to/the/source/directory

but i m getting below error:

Unknown option: nosplash Unknown option: data Unknown option: import

Thanks and regards, Praveen

2 Answers2

2
eclipse -nosplash -data /path/to/your/workspace/directory -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import /path/to/the/source/directory

The bove command works fine now.

I had to give the absolute Eclipse path (complete path where Eclipse installed) to get it to work.

double-beep
  • 5,031
  • 17
  • 33
  • 41
0

This obviously only works (or worked) with Eclipse CDT (s. dependency).

For non-CDT Java projects, this is supposed to work since Eclipse 4.12 (for existing projects, it didn't work for me): Import project in Eclipse from command-line

The following plugin was written, to provide the functionality, but it hasn't been tested for newer Eclipse versions, needs manual compilation via Maven and it seems to be an abandoned project: Eclipse import-projects plugin

EDIT: I'll probably will try this fork: enter link description here

fozzybear
  • 91
  • 9