Discussion Locked

Java on Linux

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way that I can check to ensure that I have loaded Java on my Linux Server properly ???

3 replies

by jay eckles

I guess the obvious answer would be to write a simple class, say

import java.io.* ;
class HelloWorld{
public static void main( String argv[] ){
System.out.println( "Hello, World!" ) ;
}
}

Then try to compile it with javac:
$ javac /path/to/HelloWorld.java

If/when that works, then try to run the program:
$ java /path/to/HelloWorld

If javac and java are both working, I'd say you've installed Java correctly.

Good luck.

Jay Eckles
www.jayeckles.com

This discussion is closed to new replies.