I was wondering if it is possible to make an NPAPI plugin from a Java project (Since java can be compiled straight to a dll with the help of gcj)? I already looked at the mozilla page describing NPAPI plugins but I could not find anything related to Java. All the tools over seem to focus on C++ projects.
Thanks in advance.
The tools and examples focus on C/C++ because NPAPI is a C API. There's no way to make an NPAPI plugin purely in Java.
If you really wanted to, you could probably write a bridge layer in C using JNI, but that means you'd need to have your plugin start a JVM. If your plugin were running in a browser that doesn't run plugins out-of-process though, you'd potentially be running two JVMs in the same process, which might not end well. And getting the drawing right across the bridge will be a nightmare, at least on the Mac.
Before trying to go down that route, you should ask yourself why, if your goal is to run Java code in a browser, you aren't just using the Java plugin.