[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.jdt] headless new JavaProject from sources
|
- From: georgeganea@xxxxxxxxx (Ganea George)
- Date: Wed, 26 Aug 2009 16:16:58 +0000 (UTC)
- Newsgroups: eclipse.tools.jdt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I need to create programatically a java project from existing sources (in
a headless environment). Just like you would if you'd go to file - new
JavaProject - select "Create project form existing source" - enter the
folder name - click finish.
I've tried something like this :
NewJavaProjectWizardPageOne p = new NewJavaProjectWizardPageOne();
NewJavaProjectWizardPageTwo p2 = new NewJavaProjectWizardPageTwo(p);
p.setProjectLocationURI(new URI(string)); // path to project
p.setProjectName("myProject");
p2.performFinish(new NullProgressMonitor());
but I get a
java.lang.NoClassDefFoundError:
org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne
at rcp.Application.createProject(Application.java:46)
at rcp.Application.start(Application.java:33)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
..
even if I add the jface jar file to the classpath with the -cp option...
Thank you,
George