import java.io.* ;

class JavaToWin32 
{
	public static void main(String[] args) 
	{
		System.out.println("Hello World!");
		try {
			exec () ; 	
		}
		catch (IOException e) {
			System.out.println ("Failed to initiate process") ; 
			return ; 
		}
	}

	static private void exec () 
	throws IOException
	{
		Runtime rt = Runtime.getRuntime();
		Process pr = rt.exec("calc");	
		InputStream in = pr.getInputStream();

		int c;
		while ((c = in.read()) != -1)
		{
			System.out.print((char) c);
		}
	} 
}
