{"id":5079,"date":"2014-03-30T18:40:18","date_gmt":"2014-03-30T18:40:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/enumerating-usb-devices-on-windows-with-java-collection-of-common-programming-errors\/"},"modified":"2014-03-30T18:40:18","modified_gmt":"2014-03-30T18:40:18","slug":"enumerating-usb-devices-on-windows-with-java-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/enumerating-usb-devices-on-windows-with-java-collection-of-common-programming-errors\/","title":{"rendered":"Enumerating USB Devices on Windows with Java-Collection of common programming errors"},"content":{"rendered":"<p>You can&#8217;t bundle the Java &#8220;&#8230;runtime without physically installing it on the machine&#8230;&#8221; either.<\/p>\n<p>Enumerating the device after it is mounting should be straightforward. Actually mounting the device should NOT be straightforward since Java (and .NET) are both designed to abstract away the hardware.<\/p>\n<p>I recommend that you pick a more appropriate tool for this. Either choose to simply invoke another process to run the mount command (knowing that it won&#8217;t be portable), or choose a tool that does not abstract away the hardware, or at least less so (perhaps Python?).<\/p>\n<p>EDIT: Clarification on JVM install&#8230;<\/p>\n<p>Excellent point&#8211;a JVM installation can be much less invasive than a .NET installation since the latter MUST integrate with the OS while the former merely CAN integrate with the OS. So, yes, including a private JVM install is viable and perhaps desirable.<\/p>\n<p>NOTE: The question includes the mount command for the USB device, which tends to emphasize that aspect as a primary requirement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can&#8217;t bundle the Java &#8220;&#8230;runtime without physically installing it on the machine&#8230;&#8221; either. Enumerating the device after it is mounting should be straightforward. Actually mounting the device should NOT be straightforward since Java (and .NET) are both designed to abstract away the hardware. I recommend that you pick a more appropriate tool for this. [&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-5079","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5079","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=5079"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5079\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}