Java

Java 1.6 location:

 

/usr/local/bin/

 

 

Java 1.7 location:

 

/usr/local/openjdk7

 

 

 

Example :

 

class NewThread implements Runnable {
   Thread t;
   NewThread() {
      // Create a new, second thread
      t = new Thread(this, "Test Thread in Java");
      System.out.println("Kid thread: " + t);
      t.start(); // Start the thread
   }

   public void run() {
      try {
         for(int i = 2; i > 0; i--) {
            System.out.println("Child Thread: " + i);
            // Let the thread sleep for a while.
            Thread.sleep(50);
         }
     } catch (InterruptedException e) {
         System.out.println("Kid interrupted.");
     }
     System.out.println("Exiting kid thread.");
   }
}

public class unixsshth {
   public static void main(String args[]) {
      new NewThread();
      try {
         for(int i = 2; i > 0; i--) {
           System.out.println("UnixSSH Thread: " + i);
           Thread.sleep(100);
         }
      } catch (InterruptedException e) {
         System.out.println("UnixSSHthread interrupted.");
      }
      System.out.println("UnixSSH thread exiting.");
   }
}

 

Compile : javac unixsshth.java

 

Run     : java unixsshth

 

 

 

 

Live Free Or Die!