This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tests with rmic


Hi everyone,

I found what might be a bug in gnu classpath and I would like to commit a testlet in mauve. The thing is, my test involves compiling with rmic and launching two gnu classpath jvms. I never commited in mauve, but seeing other testlets, i didn't found ways to commit such a test.

I attached the files. This is how you launch the test:

gcj -C Main.java
gcj -C ReceiveObject.java
gcj -C ReceiveObjectImpl.java
rmic ReceiveObjectImpl

rmiregistry &
jamvm ReceiveObjectImpl &
jamvm Main


Any suggestions?


Thanks,
Nicolas
import java.rmi.Naming;

public class Main{

  class Foo implements java.io.Serializable{}

  class Bar implements java.io.Serializable{
    Foo f = new Foo();
  }
    
  public static void main(String[]args){

    try{
      Bar b = new Bar();
      ReceiveObject ref = (ReceiveObject) Naming.lookup("rmi://localhost/ReceiveObject");
      ref.receiveObject(b);
    }catch(Exception e){
      System.out.println("Error : " + e );
    }
  }
}
import java.rmi.Remote;
import java.rmi.RemoteException;

public interface ReceiveObject extends Remote{
  public Object receiveObject(Object unknown)
		throws RemoteException;
}
import java.rmi.*;
import java.rmi.server.*;


public class ReceiveObjectImpl extends UnicastRemoteObject implements ReceiveObject{

  public ReceiveObjectImpl() throws RemoteException{
  }

  public Object receiveObject(Object unknown)
    throws RemoteException{
      System.out.println(unknown);
      return null;
    }

  public static void main(String[] args){
    try{
      ReceiveObject ref = new ReceiveObjectImpl();
      Naming.rebind("ReceiveObject", ref);
    }catch(Exception e){
      e.printStackTrace();
    }
  }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]