{"id":6960,"date":"2014-05-16T01:14:05","date_gmt":"2014-05-16T01:14:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/16\/execute-native-code-via-jni-dll-or-exe-collection-of-common-programming-errors\/"},"modified":"2014-05-16T01:14:05","modified_gmt":"2014-05-16T01:14:05","slug":"execute-native-code-via-jni-dll-or-exe-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/16\/execute-native-code-via-jni-dll-or-exe-collection-of-common-programming-errors\/","title":{"rendered":"Execute native code via JNI\/DLL or EXE?-Collection of common programming errors"},"content":{"rendered":"<p>I would strongly recommend the .exe approach.<\/p>\n<ol>\n<li>if it crashes you can respawn the .exe<\/li>\n<li>you won&#8217;t suffer from memory leaks \/ corruptions etc.<\/li>\n<\/ol>\n<p>The downside is that you may have to parse the .exe output to determine results\/status etc., and if it&#8217;s not designed for this, then this might be impractical (or impossible, even).<\/p>\n<p>But as a first approach, spawning the .exe is the way to go. Don&#8217;t forget to consume the stdout\/err concurrently to avoid any .exe hanging problems (a common problem, if SO questions are to be believed).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I would strongly recommend the .exe approach. if it crashes you can respawn the .exe you won&#8217;t suffer from memory leaks \/ corruptions etc. The downside is that you may have to parse the .exe output to determine results\/status etc., and if it&#8217;s not designed for this, then this might be impractical (or impossible, even). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6960","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6960"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6960\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}