I have created an IntelliJ project which is mapped from an identical Eclipse project. (this was not an import)
I use ServiceLoader and Netbeans Lookup to load/lookup a number services I have created.
Both forms of lookup work in my Eclipse project, however only ServiceLoader works in IntelliJ.
I also have an equavalent Netbeans project and both forms of lookup work in my Netbeans project.
When I attemp to use Netbeans Lookup I get.
Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/Lookup
Caused by: java.lang.ClassNotFoundException: org.openide.util.Lookup
at java.security.AccessController.doPrivileged(Native Method)
... 1 more
So the code compiles but does not run.
I have added the META-INF directory to the project and is configured correclty with a services directory and files defining the services.
I have also added the META-INF directory to the out directory.
Just a side note Netbeans Lookup sits on top of ServiceLoader, so since service loader works I would expect Netbeans lookup to work.
I have a libs directory populated with the required jar files.
I have also added the jar file dependencies to the module definition of the project.
Any help in getting this to work would be appriciated.
Another note the source from these project comes from another larger map project created in Netbens RCP so not to maintain two different code threads
I would like to use Netbeans Lookup. Which actually works rather well, and is bit simpler to use then ServiceLoader.