{"id":146,"date":"2007-01-05T11:23:17","date_gmt":"2007-01-05T16:23:17","guid":{"rendered":"http:\/\/www.graphics-muse.org\/wp\/?page_id=146"},"modified":"2009-07-07T08:44:51","modified_gmt":"2009-07-07T15:44:51","slug":"java-jni","status":"publish","type":"page","link":"https:\/\/www.graphics-muse.org\/wp\/?page_id=146","title":{"rendered":"Java \/ JNI"},"content":{"rendered":"<p>My day job has me working on, among a variety of things, a <a href=\"http:\/\/java.sun.com\/\">Java<\/a>\/<a href=\"http:\/\/labs.jboss.com\/portal\/\">JBOSS<\/a> based grid system that includes remote clients that use <a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/guide\/jni\/\">JNI<\/a> for platform specific features.\u00a0 Three years ago that first sentence would have been complete greek to me.\u00a0 But I got hired as a Software Engineer and they trusted me to learn it.\u00a0 So I did.\u00a0 They&#8217;re good guys at <a href=\"http:\/\/www.coloradoengineeringinc.com\/\">Colorado Engineering, Inc.<\/a> Even if they are making me do OO programming.\u00a0 Eventually I&#8217;ll get to return to good ol&#8217; C and basic Linux fun.<\/p>\n<p>Anyway, I&#8217;ve learned a bunch since I was hired in June 2006.\u00a0 A lot of it came from searching the net for information, reviewing problems other people had already solved.\u00a0 It wasn&#8217;t always easy to find what I needed, but it was out there if you just interpreted what you found correctly.\u00a0 I decided that I should collect this information and post it for others to find.\u00a0 Our corporate web site isn&#8217;t appropriate for this so I decided to create a place under my personal web site for this information.<\/p>\n<p>If you work with any of these technologies, feel free to <a href=\"https:\/\/www.graphics-muse.org\/wp\/?page_id=87\">drop me a line<\/a>.\u00a0 I&#8217;m far from an expert.\u00a0 In fact, I don&#8217;t (and won&#8217;t) even put any of this stuff on my resume.\u00a0 It&#8217;s not where I want to go &#8211; I&#8217;d rather get back to building kernels and custom distributions for embedded systems.\u00a0 But I&#8217;d be happy to share what I have learned, and don&#8217;t mind learning a few new things to make my grid project work better.<\/p>\n<p><span style=\"color: #003366;\"><strong>Update 2009-07-05<\/strong><\/span><\/p>\n<p>The grid is now at V2 and delivered to the client.\u00a0 It&#8217;s quite stable on both the client and server sides.\u00a0 However, stability on the client side took quit a bit of work.\u00a0 It turns out that JNI is not happy when signal handlers in C code make callbacks to Java code.\u00a0 This causes the JVM great hardship, which in turn responds with crashes and thread lockups.\u00a0 While Java, the language, is quite nice, the JVM is one of the dumbest things ever invented.\u00a0 Native compilers would have been better.<\/p>\n<p>Since the project is released I&#8217;m finally ready to write up what I&#8217;ve learned over three years.\u00a0 Of course, I&#8217;m already working on V2.5 and have plenty of plans for V3, if we can find some non-VC funding to work on the stuff.<\/p>\n<hr size=\"2\" \/>I&#8217;m a C programmer by trade and desire.\u00a0 These discussions are based on a C developers view of the Java world.<\/p>\n<h3>Topics<\/h3>\n<ul>\n<li>JBoss &#8211; in development<\/li>\n<li><a href=\"https:\/\/www.graphics-muse.org\/wp\/?page_id=147\">Building JNI-based Java Applications under Linux and Cygwin <\/a><\/li>\n<li>JNI links &#8211; coming soon<\/li>\n<li>JNI and signal handlers &#8211; coming soon<\/li>\n<li>Java widgets:\u00a0 SWT &#8211; coming soon<\/li>\n<li>Java debugging &#8211; coming soon<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>My day job has me working on, among a variety of things, a Java\/JBOSS based grid system that includes remote clients that use JNI for platform specific features.\u00a0 Three years ago that first sentence would have been complete greek to me.\u00a0 But I got hired as a Software Engineer and they trusted me to learn [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-146","page","type-page","status-publish","czr-hentry"],"aioseo_notices":[],"jetpack_shortlink":"https:\/\/wp.me\/Pe9t8-2m","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/pages\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=146"}],"version-history":[{"count":3,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/pages\/146\/revisions"}],"predecessor-version":[{"id":520,"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=\/wp\/v2\/pages\/146\/revisions\/520"}],"wp:attachment":[{"href":"https:\/\/www.graphics-muse.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}