Contents
See also
Powered by
|
Hello JavaParty
- Source code
-
/* ***************************************************************************
* JavaParty
*
* Copyright (C) 1996-2002 The JavaParty Team, University of Karlsruhe
*
* Permission is hereby granted to modify and use this software for research
* and teaching purposes. Modification for commercial purposes requires
* prior written permission by the author.
*
* The software, or modifications thereof, may be redistributed only
* if this copyright notice stays attached.
*****************************************************************************/
package examples;
/** Distributed Hello World in JavaParty
*
* $Revision: 3190 $
* $Date: 2007-03-27 21:49:37 +0200 (Tue, 27 Mar 2007) $
*
* @author Bernhard Haumacher
*/
public remote class HelloJP {
public void hello() {
// Print on the console of the virtual machine where the
// object lives
System.out.println("Hello JavaParty!");
}
public static void main(String[] args) {
for (int n = 0; n < 10; n++) {
// Create a remote object on some node
HelloJP world = new HelloJP();
// Remotely invoke a method
world.hello();
}
}
}
|