Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.MalformedURLException;
- import java.rmi.Naming;
- import java.rmi.NotBoundException;
- import java.rmi.RemoteException;
- /**
- * Klient, toto budeme u zkousky vytvaret.
- */
- public class Client {
- private static final int SIZE = 10;
- public static void main(String[] args) throws NotBoundException, MalformedURLException, RemoteException {
- Reverter reverter = (Reverter) Naming.lookup("rmi://localhost:12345/Reverter");
- Object[] obj = new Object[SIZE];
- for (int i = 0; i < SIZE; i++) {
- obj[i] = (i + 1) + ".hodnota";
- }
- obj = reverter.revert(obj);
- for (Object o : obj) {
- System.out.println(o);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement