I tried to make a little source code example employing the ServiceLoader-Class http://download.oracle.com/javase/6/docs/api/index.html?java/util/ServiceLoader.html included in JDK 1.6 (find sources attached) which uses the file /META-INF/sources/example.IHelloWorld runnable in IntelliJ".
Interestingly, compiling worked but the required file in /META-INF/services/example.IHelloWorld wasn't copied into the /out folder even though everything is located within in /src-folder.
After packaging it within a single jar-artifact and explicitly including the file mentioned above, the example worked, starting from the command line (outputting "hello world"). Sadly, I did not find a way to start the example using IntelliJ (I tried "Run/Application/".
Could you please answer whether:
1) it is necessary to use an artifact for that?
2) is it possible to start the compiled code right off the IDE?
Thanks in advance,