Getting an error when trying to create a java project programmatically [message #645519] |
Fri, 17 December 2010 15:28 |
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03386 seconds