The Artima Developer Community
Sponsored Link

Legacy Design Forum
Designing with Runtime Class Information

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

from java to command line

Posted by HariShankar on March 16, 2001 at 1:44 AM

for example
class Hello
{
public static void main ( String arg[] )
{
System.out.println ( "Hay" ) ;
}
}

Normally we run the above class by using the command line ,

java Hello

Consider , I have an another file called Temp.java

From Temp.java how can we execute the above command (ie)
Java Hello

I have to run Temp.java but the Java Hello must be print on the command prompt and the Hello class should be executed.Please guide me.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us