This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: go the native way
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
While checking my favourite blogs, i stumbled across a product called jniwrapper. Since i am developing some J2SE GUI apps these days, i checked the feautures of this beast and they were quite impressive. It tries to shield you from the fact that you are throwing away the cross-platform advantage of java and ease the usage of JNI and the windows API (you can also access linux APIs of course).
I still dont know if i should like it or not. We all know that the Win32 API is quite powerfull and that you can do a lot of things with it. Eugene from Jetbrains included the Internet Explorer into a Java Panel and i like the idea, but there is also the dark side of this power. (Will we see some Win32 API calls in IDEA in the future? Are they allready there ?)
One of their examples is to make sure you can only start your app one time by creating a MUTEX and querying on startup the existance of this thing. I really dont know what a mutex is, but some MFC guy will tell me sometime. At the end, i dont know why it should not be enough to just create a lock file when you first start your application and query the existance of the lock file when you start a second instance of the same app. They call it more "bulletproof", but they compared it with the socket-binding method when trying to avoid 2 app instances.
I will end this blog with the summary: Powerfull but somehow evil.