pessoal, estou começando a mexer com RMI entao consegui este codigo mas nao consigo compila-lo se alguem souber por que?!!

muito obrigada

()

Martha

 

public interface CountRMI extends java.rmi.Remote
{
  int sun() throws java.rmi.RemoteException;
  void sun(int _val) throws java.rmi.RemoteException;
  public int increment() throws java.rmi.RemoteException;
}

 

import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class CountRMIImpl extends UnicastRemoteObject implements CountRMI
{
  private int sun;
  public void CountRMIInpl(String nome) throws java.rmi.RemoteException
  {
    super();//aqui esta o erro
   
try{
      Naming.rebind(nome, this);
      sun = 0;
    }
    catch(Exception e){
      System.out.println("Excecao: "+e.getMessage());
      e.printStackTrace();
    }
  }
  public int sun() throws RemoteException
  {
    return sun;
  }
  public void sun(int val) throws RemoteException
  {
    sun = val;
  }
  public int increment() throws RemoteException
  {
    sun ++;
    return sun;
  }
}



Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Responder a