Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Getting an error when trying to create a java project programmatically
icon3.gif  Getting an error when trying to create a java project programmatically [message #645519] Fri, 17 December 2010 15:28 Go to next message
Leslie Aguilera is currently offline Leslie AguileraFriend
Messages: 11
Registered: November 2010
Junior Member
Hello everybody~

I developed a plugin (well, I'm still at that. It's a very huge project xD) which is going to call a method and create a java project programmatically. I followed some tutorials I found, but I'm getting an error when I try to create it.

First, I create an eclipse project (IProject), open it and set its description. Then, I set the Java nature to my project and proceed to create a java project. And here is where I have my problem, with this evil sentence:

IJavaProject javaProject = JavaCore.create(project);

(After that I set the classpath and the output location for that java project, but it doesn't matter right now because my program will stop at the previous sentence).

When I run my plugin and it calls the method, I receive this message in my console:

!ENTRY org.eclipse.ui 4 0 2010-12-17 12:18:31.399
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ExceptionInInitializerError
at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1428)
at altagracia.codegen.CreateDataBase.createJavaProject(CreateDa taBase.java:81) --> and here is pointing to the line in my method where I *TRY* to create the Java Project (the line I wrote earlier).

I don't understand the exception, and I couldn't find info about the meaning either. If someone can help me with this and explain me why I'm getting that ExceptionInInitializerError or any way to fix it, I'll be very, *VERY* grateful.

Thanks in advance,
Leslie.
Re: Getting an error when trying to create a java project programmatically [message #645528 is a reply to message #645519] Fri, 17 December 2010 16:31 Go to previous message
Leslie Aguilera is currently offline Leslie AguileraFriend
Messages: 11
Registered: November 2010
Junior Member
Yay~ I resolved it.

I forgot to add the line " org.eclipse.jdt.core" inside my MANIFEST.MF file below the Require-Bundle option.
Previous Topic:Annotation insert location
Next Topic:How to get the project name in workspace in eclipse?
Goto Forum:
  


Current Time: Thu Apr 25 09:36:05 GMT 2024

Powered by FUDForum. Page generated in 0.03386 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top