{"id":6929,"date":"2014-05-11T17:47:05","date_gmt":"2014-05-11T17:47:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/cant-start-a-libgdx-desktop-project-collection-of-common-programming-errors\/"},"modified":"2014-05-11T17:47:05","modified_gmt":"2014-05-11T17:47:05","slug":"cant-start-a-libgdx-desktop-project-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/11\/cant-start-a-libgdx-desktop-project-collection-of-common-programming-errors\/","title":{"rendered":"Can&#39;t start a libgdx desktop project-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m developing an Android application with Libgdx. Everything has gone good so far (I&#8217;ve been debugging in the emulator), but I came to a point where I needed to set up a desktop project, so I could test the app faster (so instead of running it on an emulator, I could test it on a desktop app).<\/p>\n<p>I made the setup just as the wiki says, adding the desktop version, and everything has gone good so far, no compiler errors. But when I try to launch the desktop app, I get the following error, without even opening a window:<\/p>\n<pre><code>Exception in thread \"main\" java.lang.NoClassDefFoundError: com\/badlogic\/gdx\/Net\n    at DesktopGame.main(DesktopGame.java:12)\nCaused by: java.lang.ClassNotFoundException: com.badlogic.gdx.Net\n    at java.net.URLClassLoader$1.run(Unknown Source)\n    at java.security.AccessController.doPrivileged(Native Method)\n    at java.net.URLClassLoader.findClass(Unknown Source)\n    at java.lang.ClassLoader.loadClass(Unknown Source)\n    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\n    at java.lang.ClassLoader.loadClass(Unknown Source)\n<\/code><\/pre>\n<p>The line 12 of the DesktopGame.java says:<\/p>\n<pre><code>new LwjglApplication(new UserStart(userID, appDefinitions), \"Game\", 1024, 600, false);\n<\/code><\/pre>\n<p>Where UserStart is the ApplicationListener (with a custom constructor as I needed a couple of parameters, this setup works well on Android). I don&#8217;t know why com.badlogic.gdx.Net is not found (and I don&#8217;t know why it is looking for it as I&#8217;m not using network features).<\/p>\n<p>Does anyone know what could it be? Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m developing an Android application with Libgdx. Everything has gone good so far (I&#8217;ve been debugging in the emulator), but I came to a point where I needed to set up a desktop project, so I could test the app faster (so instead of running it on an emulator, I could test it on a [&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-6929","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6929","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=6929"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6929\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}