{"id":3759,"date":"2012-01-25T14:57:26","date_gmt":"2012-01-25T09:27:26","guid":{"rendered":"http:\/\/windowsvj.com\/wpblog\/?p=3759"},"modified":"2012-01-25T14:57:26","modified_gmt":"2012-01-25T09:27:26","slug":"windows-7-for-java-programmers","status":"publish","type":"post","link":"http:\/\/windowsvj.com\/wpblog\/2012\/01\/windows-7-for-java-programmers\/","title":{"rendered":"Windows 7 for Java Programmers"},"content":{"rendered":"<p>Specifically if you are a new Java programmer or a new Java programmer on Windows 7, you will probably need to set up an environment first for Java.   <\/p>\n<p align=\"center\"><a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2012\/01\/image3.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2012\/01\/image_thumb3.png\" width=\"201\" height=\"112\" \/><\/a><\/p>\n<p align=\"left\">Alternatively though you may need tools like Eclipse, but to go in hard code Geek way, here is what you need to do\u2026<\/p>\n<ol>\n<li>Right click Computer from the Start menu <\/li>\n<li>Choose System Properties from the context menu <\/li>\n<li>Click Advanced system settings &gt; Advanced tab <\/li>\n<li>Click on Environment Variables, under System Variables, find <b>PATH<\/b>, and click on it. <\/li>\n<li>\n<div align=\"left\">In the Edit windows, modify <b>PATH<\/b> by adding the location of the class to the value for <b>PATH<\/b>. If you do not have the item <b>PATH<\/b>, you may select to add a new variable and add <b>PATH<\/b> as the name and the location of the class as the value.         <\/p>\n<p><a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2012\/01\/image4.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2012\/01\/image_thumb4.png\" width=\"481\" height=\"651\" \/><\/a>        <\/div>\n<\/li>\n<li>PATH probably will be <strong>C:\\Program Files\\Java\\jdk1.7.0\\bin\\<\/strong><\/li>\n<li>Reopen Command prompt window, and run your java code.<\/li>\n<\/ol>\n<p>Also To Compile &amp; Execute code as always have these commands : <\/p>\n<pre><strong>Compilation<em>  javac ExampleProgram.java<\/em><\/strong><\/pre>\n<pre><strong>Execution    <\/strong><strong><em>java ExampleProgram<\/em><\/strong><\/pre>\n<p>Sometimes in the initial startup you may face an Error or might have trouble compiling and running Java code. An error like <strong>&quot;Error: Could not find or load main class &lt;classname&gt;\u201d<\/strong> is quiet common. <\/p>\n<p>To solve which You must ensure that you add the location of your <code>.class<\/code> file to your classpath. So, if its in the current folder then add <code>.<\/code> to your classpath.<\/p>\n<p>Example : <strong><em>javac -classpath .; *.java<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Specifically if you are a new Java programmer or a new Java programmer on Windows 7, you will probably need to set up an environment first for Java. Alternatively though you may need tools like Eclipse, but to go in hard code Geek way, here is what you need to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[258],"tags":[],"class_list":["post-3759","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/comments?post=3759"}],"version-history":[{"count":1,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3759\/revisions"}],"predecessor-version":[{"id":3760,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3759\/revisions\/3760"}],"wp:attachment":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/media?parent=3759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/categories?post=3759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/tags?post=3759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}