<?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>BioGem.Org &#187; JAVA</title>
	<atom:link href="http://www.biogem.org/tag/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biogem.org</link>
	<description>Bioinformatics Blog Site..</description>
	<lastBuildDate>Sat, 03 Jul 2010 07:57:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running JAVA program in Linux Ubuntu</title>
		<link>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html</link>
		<comments>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:49:39 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[jre6]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=181</guid>
		<description><![CDATA[Steps to run JAVA program in Ubuntu:
1. Go to Applications &#62; Accessories &#62; Terminal, to open terminal window.
2. Type the following in command line
gedit Add.java
3. Enter the code bellow in the editor.
/* Addition of two numbers &#8211; Add.java */
import java.io.*;
class Add
{
public static void main(String args[])
{
InputStreamReader ISR = new InputStreamReader(System.in);
BufferedReader BR = new BufferedReader(ISR);
int a = [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="font-family: georgia,palatino;"><span style="color: #ff0000;"><strong>Steps to run JAVA program in Ubuntu:</strong></span></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">1. Go to <em>Applications</em> &gt; <em>Accessories</em> &gt;<em> Terminal</em>, to open terminal window.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">2. Type the following in command line</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">gedit Add.java<span id="more-181"></span></span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">3. Enter the code bellow in the editor.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">/* Addition of two numbers &#8211; Add.java */<br />
import java.io.*;<br />
class Add<br />
{<br />
public static void main(String args[])<br />
{<br />
InputStreamReader ISR = new InputStreamReader(System.in);<br />
BufferedReader BR = new BufferedReader(ISR);<br />
int a = 0, b = 0;<br />
try<br />
{<br />
System.out.print(&#8221;Enter the first number: &#8220;);<br />
a = Integer.parseInt(BR.readLine());<br />
System.out.print(&#8221;Enter the second number: &#8220;);<br />
b = Integer.parseInt(BR.readLine());<br />
}<br />
catch(Exception e)<br />
{<br />
System.out.println(&#8221;Check the program.&#8221;);<br />
}<br />
System.out.println(&#8221;Addition of &#8221; + a + &#8221; + &#8221; + b + &#8221; is&#8221; + (a+b));<br />
}<br />
}</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">4. Save the file and close to return to terminal window.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">5. Firstly compile the code using the following command</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">javac Add.java</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">That would produce an class file you may need to run the program.</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">7. Now run this executable using the following command</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #0000ff;">java Add</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;">8. Output should show as follows</span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><em><span style="color: #ff0000;">Enter the first number: 49<br />
Enter the second number: 2<br />
Addition of 49 + 2 is 51</span></em></span></span></p>
<p><span style="font-family: georgia,palatino;"><span style="font-size: small;"><strong>Note: </strong>If java is not present in the system, download it through terminal window using command <em><span style="color: #0000ff;">sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk</span></em></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/running-java-program-in-linux-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
