{"id":5029,"date":"2014-03-30T18:07:41","date_gmt":"2014-03-30T18:07:41","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/could-not-find-or-load-main-class-error-in-windows-7-with-compiled-ubuntu-jar-collection-of-common-programming-errors\/"},"modified":"2014-03-30T18:07:41","modified_gmt":"2014-03-30T18:07:41","slug":"could-not-find-or-load-main-class-error-in-windows-7-with-compiled-ubuntu-jar-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/could-not-find-or-load-main-class-error-in-windows-7-with-compiled-ubuntu-jar-collection-of-common-programming-errors\/","title":{"rendered":"&ldquo;could not find or load main class&rdquo; error in windows 7 with compiled ubuntu jar-Collection of common programming errors"},"content":{"rendered":"<p>This error usually shows up when you don&#8217;t include the current directory (<code>.<\/code>) in the classpath.<\/p>\n<p>If there are any external libraries that you specify when starting the program, then you probably do something like <code>java -jar -classpath dir\/library.jar program.jar<\/code>. Instead, add <code>.<\/code> to the classpath: <code>java -jar -classpath .;dir\/library.jar program.jar<\/code><\/p>\n<p>Other possibilities are:<\/p>\n<ul>\n<li>you didn&#8217;t include a Manifest in the JAR<\/li>\n<li>in the Manifest that you did include, you didn&#8217;t specify which is the main class, or you did it wrong.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This error usually shows up when you don&#8217;t include the current directory (.) in the classpath. If there are any external libraries that you specify when starting the program, then you probably do something like java -jar -classpath dir\/library.jar program.jar. Instead, add . to the classpath: java -jar -classpath .;dir\/library.jar program.jar Other possibilities are: you [&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-5029","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5029","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=5029"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5029\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}