<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Basics &#8211; Tech-Freaks.com</title>
	<atom:link href="https://www.tech-freaks.com/java/java-basics/feed" rel="self" type="application/rss+xml" />
	<link>https://www.tech-freaks.com</link>
	<description></description>
	<lastBuildDate>Sun, 24 Aug 2008 01:48:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://www.tech-freaks.com/wp-content/uploads/2025/07/cropped-tech-freaks-site-icon-512x512-1-32x32.png</url>
	<title>Java Basics &#8211; Tech-Freaks.com</title>
	<link>https://www.tech-freaks.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Java Hello World using Eclipse IDE</title>
		<link>https://www.tech-freaks.com/java/java-basics/java-hello-world-eclipse.html</link>
					<comments>https://www.tech-freaks.com/java/java-basics/java-hello-world-eclipse.html#respond</comments>
		
		<dc:creator><![CDATA[Tech Programmer]]></dc:creator>
		<pubDate>Sun, 24 Aug 2008 01:48:55 +0000</pubDate>
				<category><![CDATA[Java Basics]]></category>
		<guid isPermaLink="false">http://localhost/tfcom_wp/2008/08/24/java-hello-world-eclipse/</guid>

					<description><![CDATA[This workshop is for you, if you think You are spending too much time in office writing getter setter methods [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_restricted"><button type="button"
					aria-label="Like Button"
					data-ulike-id="76"
					data-ulike-nonce="79f5ff5b56"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_76"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p style="text-align: left;"><strong>This workshop is for you, if you think</strong></p>
<ul style="text-align: left;">
<li>You are spending too much time in office writing getter setter methods</li>
<li>You are bored of seeing command prompts with hundreds of compilation errors even after writing a wonderful java code</li>
</ul>
<p style="text-align: left;"><strong>This workshop is not for you, if</strong></p>
<ul style="text-align: left;">
<li>You are well versed with eclipse</li>
</ul>
<p style="text-align: left;"><strong>What is this workshop all about?</strong></p>
<p style="text-align: left;">We were successful in creating Hello World application with the help of textpad or notepad and got it compiled and run from command prompt.</p>
<p style="text-align: left;">But, hey isn&#8217;t this a time consuming process, project dead lines doesn&#8217;t give me such a leisure time.</p>
<p style="text-align: left;">We have IDE to the rescue!</p>
<p style="text-align: left;">This workshop will explain</p>
<ul style="text-align: left;">
<li>Installation and set up of Eclipse</li>
<li>Execution of simple Hello World Application using Eclipse IDE</li>
</ul>
<p style="text-align: left;"><strong>Prerequisite</strong></p>
<ul style="text-align: left;">
<li>JDK installed on system</li>
</ul>
<p style="text-align: left;">For more information on how to install JDK you can refer to <a style="color: #1b57b1; text-decoration: initial; font-weight: normal;" href="../java-basics/java-hello-world.html" target="_blank" rel="nofollow noopener noreferrer"><span style="text-decoration: underline;"><span style="color: #800080;">Java Hello World Article.</span></span></a></p>
<p style="text-align: left;"><strong>Installation and set up of Eclipse</strong></p>
<p style="text-align: left;">Steps for eclipse installation are as below</p>
<ul style="text-align: left;">
<li>To download eclipse click<a style="color: #1b57b1; text-decoration: initial; font-weight: normal;" href="http://www.eclipse.org/downloads/" target="_blank" rel="nofollow noopener noreferrer"><span style="text-decoration: underline;"><span style="color: #800080;">Eclipse 3.4</span></span></a></li>
<li>Start eclipse</li>
<li>Select the location for workspace</li>
</ul>
<dl>
<dt class="error"></dt>
<dd class="message message fade">
<ul>
<li>Eclipse installation doesn&#8217;t come up with setup.exe file. To run eclipse simply execute eclipse.exe from extracted folder</li>
</ul>
<p> </p>
</dd>
</dl>
<p style="text-align: left;"> </p>
<p style="text-align: left;"><img fetchpriority="high" decoding="async" title="Eclipse IDE Workspace Launcher " src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_workspace.JPG" alt="Image showing the Eclipse Workspace Launcher" width="596" height="263" border="0"></p>
<p style="text-align: left;"> </p>
<ul style="text-align: left;">
<li>You will see the following eclipse welcome screen on successful start of eclipse application.</li>
</ul>
<p style="text-align: left;"><img decoding="async" title="Eclipse welcome screen" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_home.JPG" alt="Image showing eclipse home page after successful installation" width="676" height="440" border="0"></p>
<p style="text-align: left;"> </p>
<p style="text-align: left;"> </p>
<hr title="Create New Project" class="system-pagebreak">
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><strong>Execution of simple Hello World Application</strong></p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Navigate to &#8220;File/New/Java Project&#8221; as shown below for creating the new Java Project naming &#8220;Hello World With IDE&#8221;.</li>
</ul>
<p style="text-align: left;"><img decoding="async" title="New Java Project navigation in eclipse IDE" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_navigate_javaproject.JPG" alt="Image showing navigation for creating new Java Project in Eclipse IDE" border="0"></p>
<ul style="text-align: left;">
<li>Provide with following information in the given field.</li>
</ul>
<blockquote style="color: #333333; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.796875px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<p>Project Name: Hello World With IDE</p>
</blockquote>
<ul style="text-align: left;">
<li>Here you have the option to either Create new project in workspace or you can create project from existing source.</li>
<li>You can also use the previously created HelloWorld application as the existing source.<br />But here we preferred to create a new project for better understanding.</li>
</ul>
<p style="text-align: left;"> </p>
<p style="text-align: left;"><img decoding="async" title="Create new Java Project in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_new_java_project.JPG" alt="Image showing the enteries for defining new Java Project" width="500" height="718" border="0"></p>
<ul style="text-align: left;">
<li>Click &#8220;Next&#8221; button, you see the following screen.</li>
</ul>
<p style="text-align: left;"><img loading="lazy" decoding="async" style="border: 0px;" title="Java Setting for creating new Java Project in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_new_java_project1.JPG" alt="Image showing the Java setting for creating new Java Project" width="500" height="718" border="0"></p>
<p style="text-align: left;"> </p>
<ul style="text-align: left;">
<li>Check the &#8220;Allow output folders for source folder&#8221; option if you wish to have the class file for the HelloWorld.java</li>
</ul>
<p style="text-align: left;"> </p>
<hr title="Java Build Settings" class="system-pagebreak">
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Navigate to &#8220;Libraries&#8221; tab. For this application we have used JRE 6, you select any other version of JRE if you wish.</li>
</ul>
<p style="text-align: left;"> </p>
<p style="text-align: left;"><img loading="lazy" decoding="async" style="border: 0px;" title="List of Java libraries defined while creating new Java Project in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_java_setting.JPG" alt="Image showing selected Libraries while creating new Java Project" width="500" height="718" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<ul style="text-align: left;">
<li>Click &#8220;Finish&#8221; button, you see the following screen.</li>
</ul>
<p style="text-align: left;"><img loading="lazy" decoding="async" style="border: 0px;" title="Eclipse image after newly created project" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_project_set.JPG" alt="Eclipse image after the successful creation of New Java Project" width="609" height="626" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<hr title="Create HelloWorld java File " class="system-pagebreak">
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Next step will be to create HelloWorld.java file. Navigate to File/New/Class.</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="Eclipse image for creating new Java Class file" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_select_class.JPG" alt="Image showing the creation of new Java Class file under Java Project" width="704" height="558" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>On selecting class option you see New Java Class pop-up. Here we will create the HelloWorld.java file with the default package.</li>
<li>One of the advantage of using IDE as the development tool is it helps you create code skeleton and comments, so you can spend your precious time doing other important things in life like fishing, long drives, dating ,etc. <img decoding="async" style="border: 0px;" title="Wink" src="plugins/editors/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-wink.gif" alt="Wink" border="0"></li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="New Java Class declaration in Eclipse IDE" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_new_java_class.JPG" alt="Eclipse image showing the declaration of New Java Class inside HelloWorld Project" width="500" height="610" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Name (Name of the Java File): HelloWorld</li>
<li>Which method stubs would you like to create: Check &#8220;public static void main(String[] args)&#8221; option.</li>
<li>Do you want to add comments?: Check &#8220;Generate comments&#8221; option.</li>
<li>Click Finish to create the HelloWorld.java</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="HelloWorld.java file in Eclipse IDE" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_helloworld.JPG" alt="Image showing the HelloWorld.java file" width="786" height="624" border="0"></p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Now you have the stub of main method created. You are ready to edit the method as per your needs.<br />Edit the main method to print &#8220;HelloWorld&#8221; as shown below.</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="Edited HelloWorld.java file in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_helloworld1.JPG" alt="Image showing the edited HelloWold.java file in Eclipse" width="786" height="624" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<hr title="Execute HelloWorld java Application" class="system-pagebreak">
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>Now to run the application right click on HelloWorld.java and select &#8220;Run As/Java Application&#8221; option.</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="Running of HelloWorld.java file in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_run.JPG" alt="Eclipse image showing the way to run HelloWorld.java file" width="739" height="669" border="0"></p>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> </p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>On successful run you will see output as &#8220;Hello World&#8221; in console as shown below</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><img loading="lazy" decoding="async" style="border: 0px;" title="HelloWorld.java output in Eclipse" src="https://www.tech-freaks.com/wp-content/uploads/2008/08/eclipse_result.JPG" alt="Image showing the final result of HelloWorld.java " width="742" height="623" border="0"></p>
<ul style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<li>
<div>Wow! That&#8217;s a magic. I got the output even without a class file.</div>
</li>
<li>
<div>No! This is not a magic. Behind the scenes eclipse compile the source java file and creates a class file in bin directory of your project workspace . Don&#8217;t you believe? Check &#8220;C:\Documents and Settings\HelloWorld\workspace1\bin\&#8221;</div>
</li>
</ul>
<p style="color: rgb(51, 51, 51); font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.7969px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; text-size-adjust: auto; -webkit-text-stroke-width: 0px;">So here is your entry to IDE world!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.tech-freaks.com/java/java-basics/java-hello-world-eclipse.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Java Hello World</title>
		<link>https://www.tech-freaks.com/java/java-basics/java-hello-world.html</link>
					<comments>https://www.tech-freaks.com/java/java-basics/java-hello-world.html#respond</comments>
		
		<dc:creator><![CDATA[Tech Programmer]]></dc:creator>
		<pubDate>Mon, 07 Jul 2008 01:03:46 +0000</pubDate>
				<category><![CDATA[Java Basics]]></category>
		<guid isPermaLink="false">http://localhost/tfcom_wp/2008/07/07/java-hello-world/</guid>

					<description><![CDATA[This workshop is for you, if you think: I read a lot about bytecode I never got my hands dirty [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_restricted"><button type="button"
					aria-label="Like Button"
					data-ulike-id="62"
					data-ulike-nonce="b176ae6351"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_62"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p style="text-align: left;"><strong>This workshop is for you, if you think:</strong></p>
<ul style="text-align: left;">
<li>I read a lot about bytecode</li>
<li>I never got my hands dirty with code yet</li>
<li>I never got past ClassCastException</li>
</ul>
<p style="text-align: left;"><strong>This workshop is not for you, if you are:</strong></p>
<ul style="text-align: left;">
<li>A Java guru having experience since donkey&#8217;s age so you should be here to provide others with some useful articles</li>
<li>Looking for basics and fundamentals of Java</li>
</ul>
<p style="text-align: left;"><strong>&#8220;Hello World&#8221; Heck</strong>!</p>
<p style="text-align: left;">We need JDK for compiling our source Java file to class file (bytecode). So, we do not have JDK installed in our system, we need to install it first. The below steps provide details regarding installing JDK and setting up Java Path Environment variable:</p>
<ul style="text-align: left;">
<li>Download JDK from <a href="http://java.sun.com/javase/downloads/index.jsp" target="_blank" rel="nofollow noopener noreferrer">Sun Java website</a> and install it, say, at &#8220;C:\Program Files\Java\jdk1.6.0_10&#8221;</li>
<li>Navigate to your Environment Variables by right clicking &#8220;My Computer&#8221; selecting &#8220;Properties/Advanced/Environment Variables&#8221;</li>
<li>Create a new User Variable name &#8220;Path&#8221;, if it does not already exist, and set the variable value as the complete path of the bin directory of JDK i.e.&#8221;C:\Program Files\Java\jdk1.6.0_10\bin&#8221; in this case</li>
<li>If the variable name &#8220;PATH&#8221; already exist in the system variable, then make sure it points to the right directory where the JDK is installed.</li>
<li>Note that more than one value can be set to Path variable with semicolon (;) as value separator.</li>
<li>Another way you can set the Path in User variable is through the DOS command prompt.</li>
<li>Go to Start menu choose Run and then enter cmd hit enter, you will see the Command Prompt.</li>
<li>Execute the following command &#8220;set Path=&#8221;C:\Program Files\Java\jdk1.6.0_10\bin&#8221;</li>
<li>This can be verified by executing &#8220;echo %Path%&#8221;. This should return the &#8220;C:\Program Files\Java\jdk1.6.0_10\bin&#8221; value.</li>
</ul>
<p style="text-align: left;">     <img loading="lazy" decoding="async" src="https://www.tech-freaks.com/wp-content/uploads/2008/07/HelloWorld_Path.JPG" alt="" width="669" height="334" border="0"></p>
<ul style="text-align: left;">
<li>It should be noted that the scope of the Path variable set from the command line is limited to the life time of the DOS Command Prompt session and is applicable only to that specific session of DOS Command Prompt.</li>
<li>So, we highly recommend that setting of Path User variable is to be done from &#8220;My Computer&#8221;.</li>
</ul>
<p style="text-align: left;"><strong>My Hello World Java code</strong></p>
<ul style="text-align: left;">
<li>Take some simple editor to start with like notepad or textpad.</li>
<li>Create a HelloWorld.java application as below</li>
</ul>
<pre class="language-java"><code>    public class HelloWorld {  
          public static void main(String[] args) { 
              System.out.println("Hello World"); 
          }
    }  </code></pre>
<ul style="text-align: left;">
<li>Save the file as HelloWorld.java somewhere on your local system, say, at the following location &#8220;D:\Hello World Workshop&#8221;.</li>
<li>Open Command Prompt as explained in previous steps and navigate to Hello World Workshop directory with the help of following 2 commands<br />&#8220;D:&#8221; and &#8220;cd &#8220;Hello World Workshop&#8221;.</li>
<li>Compile the HelloWorld.java file as &#8220;javac HelloWorld.java&#8221;. This will create the HelloWorld.class file in the same directory.</li>
<li>Next step is to order Java Virtual Machine to run the HelloWorld application for you. Execute the following command &#8220;java HelloWorld&#8221;</li>
</ul>
<p style="text-align: left;">     <img loading="lazy" decoding="async" src="https://www.tech-freaks.com/wp-content/uploads/2008/07/HellowWorld_Execution.JPG" alt="Hello World Execution" width="668" height="334" border="0"></p>
<ul style="text-align: left;">
<li>On successful run, you will get the output &#8220;Hello World&#8221;.</li>
</ul>
<p style="text-align: left;"><strong>Welcome to Java Land!</strong></p>
<p style="text-align: left;"> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.tech-freaks.com/java/java-basics/java-hello-world.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
