{"id":1992,"date":"2018-07-01T01:09:05","date_gmt":"2018-07-01T01:09:05","guid":{"rendered":"http:\/\/www.talkcrypto.org\/blog\/?p=1992"},"modified":"2018-07-07T01:29:10","modified_gmt":"2018-07-07T01:29:10","slug":"hashgraph-hello-world-on-eclipse","status":"publish","type":"post","link":"https:\/\/www.talkcrypto.org\/blog\/2018\/07\/01\/hashgraph-hello-world-on-eclipse\/","title":{"rendered":"Hashgraph Hello World on Eclipse"},"content":{"rendered":"<p>Running the Hashgraph hello world sdk using command line is quite simple and fast but if you want to start building your own applications, using and IDE like Eclipse is the way to go.<\/p>\n<h3>Step 1: Download the Swirlds SDK.<\/h3>\n<p>Download the Swirls SDK at <a href=\"https:\/\/www.swirlds.com\/download\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.swirlds.com\/download\/<\/a>\u00a0and extract it.<\/p>\n<h3>Step 2: Download &amp; Install Eclipse<\/h3>\n<p>Download the latest version of Eclipse at:\u00a0<a href=\"http:\/\/www.eclipse.org\/downloads\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.eclipse.org\/downloads\/<\/a>. The Hashgraph docs mention Eclipse 4.7 (Oxygen) but 4.8 (Photon) has just been released. We&#8217;ll be using Photon here but either will be fine even including older versions.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-1994\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-9.42.48-AM-300x300.png\" alt=\"\" width=\"218\" height=\"218\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-9.42.48-AM-300x300.png 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-9.42.48-AM-150x150.png 150w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-9.42.48-AM.png 438w\" sizes=\"(max-width: 218px) 100vw, 218px\" \/><\/p>\n<p>Note: If you get this error: &#8220;<em>The JVM shared library \u201c\/Library\/Internet Plug-Ins\/JavaAppletPlugin.plugin\/Contents\/Home\/bin\/..\/lib\/server\/libjvm.dylib\u201d does not contain the JNI_CreateJavaVM symbol<\/em>&#8220;, then check out how to resolve it <a href=\"https:\/\/www.anintegratedworld.com\/osx-eclipse-installer-does-not-contain-the-jni_createjavavm-symbol-error\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>Once the install completes, select Eclipse IDE for Java Developers. The Enterprise Edition (EE) version will work as well.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium wp-image-1996\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.01.08-PM-290x300.png\" alt=\"\" width=\"290\" height=\"300\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.01.08-PM-290x300.png 290w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.01.08-PM.png 545w\" sizes=\"(max-width: 290px) 100vw, 290px\" \/><\/p>\n<p>Then select an installation folder and accept the T&amp;Cs and open up the application.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-medium wp-image-1997\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.16.30-PM-300x202.jpg\" alt=\"\" width=\"300\" height=\"202\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.16.30-PM-300x202.jpg 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.16.30-PM-768x517.jpg 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.16.30-PM.jpg 892w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3>Step 3: Import Hashgraph SDK Project<\/h3>\n<p>Ignore the welcome start up page and click &#8216;Workbench&#8217; in the top right hand corner. If you can see the package explorer pane on the left hand side navigate to Window &gt; Show View &gt; Project Explorer.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1998\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.22.41-PM-296x300.png\" alt=\"\" width=\"296\" height=\"300\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.22.41-PM-296x300.png 296w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.22.41-PM-768x778.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.22.41-PM-1011x1024.png 1011w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.22.41-PM.png 1082w\" sizes=\"(max-width: 296px) 100vw, 296px\" \/><\/p>\n<p>Then select File &gt; Import &gt; Maven &gt; Existing Maven Projects<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1999\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.25.11-PM-286x300.png\" alt=\"\" width=\"352\" height=\"369\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.25.11-PM-286x300.png 286w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.25.11-PM-768x805.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.25.11-PM-976x1024.png 976w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.25.11-PM.png 1150w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/p>\n<p>Then browse to the sdk folder and select all the projects and click finish.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2000\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.27.28-PM-300x282.png\" alt=\"\" width=\"300\" height=\"282\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.27.28-PM-300x282.png 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.27.28-PM-768x722.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.27.28-PM-1024x963.png 1024w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.27.28-PM.png 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3>Step 4: Build the project with Maven Install<\/h3>\n<p>Expand StatsDemo and right click on pom.xml. Then choose Run As &gt; Maven Install.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2001\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-258x300.png\" alt=\"\" width=\"314\" height=\"365\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-258x300.png 258w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-768x894.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-880x1024.png 880w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM.png 1268w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><br \/>\n<code>[INFO] ------------------------------------------------------------------------<br \/>\n[INFO] BUILD SUCCESS<br \/>\n[INFO] ------------------------------------------------------------------------<br \/>\n[INFO] Total time: 4.850 s<br \/>\n[INFO] Finished at: 2018-07-07T12:48:23+12:00<br \/>\n[INFO] ------------------------------------------------------------------------<br \/>\n<\/code><\/p>\n<p>This builds the project.<\/p>\n<h3>Step 4: Running Hello World in Eclipse<\/h3>\n<p>Next you want to run it and set the configurations. The easiest method is to run it as a Java application which sets up most of the default configurations. To do this, right click on the src folder and click on the green arrow on the top bar.<\/p>\n<p>It may seem like nothing is happening but configurations are being set in the background. You&#8217;ll have to modify these slightly by right clicking on the src folder &gt; Run As &gt; Run Configuration<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2001\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-258x300.png\" alt=\"\" width=\"338\" height=\"393\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-258x300.png 258w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-768x894.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM-880x1024.png 880w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.39.42-PM.png 1268w\" sizes=\"(max-width: 338px) 100vw, 338px\" \/><\/p>\n<p>Then select the Argument tab &gt; Working Directory &gt; Other and click File System and navigate to the location of the SDK. Then click Apply &gt; Close.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2002\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.58.49-PM-300x270.png\" alt=\"\" width=\"300\" height=\"270\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.58.49-PM-300x270.png 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/Screen-Shot-2018-07-07-at-12.58.49-PM.png 702w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Now click the green run button and the application should kick into life. If you want to make any modifications, you can do so and then rebuild and run.<\/p>\n<p>&nbsp;<br \/>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1992-1\" width=\"640\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hash-eclipse.mp4?_=1\" \/><a href=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hash-eclipse.mp4\">https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hash-eclipse.mp4<\/a><\/video><\/div>\n<p>Note: You can edit the config.txt file to run a specific demo of your choice otherwise it will run the default of StatsDemo.<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running the Hashgraph hello world sdk using command line is<\/p>\n","protected":false},"author":1,"featured_media":2005,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1992","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain"],"featured_image_urls":{"full":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"thumbnail":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse-150x150.jpg",150,150,true],"medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse-300x247.jpg",300,247,true],"medium_large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"1536x1536":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"2048x2048":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"chromenews-featured":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"chromenews-large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false],"chromenews-medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/07\/hheclipse.jpg",300,247,false]},"author_info":{"info":["seandotau"]},"category_info":"<a href=\"https:\/\/www.talkcrypto.org\/blog\/category\/blockchain\/\" rel=\"category tag\">Blockchain<\/a>","tag_info":"Blockchain","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/comments?post=1992"}],"version-history":[{"count":7,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions"}],"predecessor-version":[{"id":2012,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions\/2012"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media\/2005"}],"wp:attachment":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media?parent=1992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/categories?post=1992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/tags?post=1992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}