Run Java program in Linux


Hits: 1243  

This is the sample java file “Svnlabs.java” to be executed on linux command line…..

import java.lang.*;
import java.io.*;

public class Svnlabs
{

public static void main(String args[])
{
System.out.println(”svnlabs.com”);
}

}

Output:

[root@localhost ~]# javac Svnlabs.java
[root@localhost ~]# java Svnlabs
svnlabs.com
[root@localhost ~]#

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch