RMIC is not working in java Showing The major.minor version '61.0' is too recent for this tool to understand

Viewed 102

This is my first time using java rmic so I was trying to run a sample program but faced an error this is the code I copied it from :http://learnersdashboard.blogspot.com/2015/07/rmi-addition-of-2-numbers-example.html now it is showing the following error :- error: Invalid class file format in ./AdderRemote.class. The major.minor version '61.0' is too recent for this tool to understand. error: Class AdderRemote not found. 2 errors //Remote Interface import java.rmi.*;

public interface Adder extends Remote{  
public int add(int x,int y)throws RemoteException;  
}  
//Implementation of remote interface
import java.rmi.*;  
import java.rmi.server.*;  
public class AdderRemote extends UnicastRemoteObject implements Adder{  
AdderRemote()throws RemoteException{  
super();  
}  
public int add(int x,int y){return x+y;}  
}  
//Server
import java.rmi.*;  
import java.rmi.registry.*;  
public class MyServer{  
public static void main(String args[]){  
try{  
Adder stub=new AdderRemote();  
Naming.rebind("rmi://localhost:5000/sonoo",stub);  
}catch(Exception e){System.out.println(e);}  
}  
}  
//Client Application
import java.rmi.*;  
public class MyClient{  
public static void main(String args[]){  
try{  
Adder stub=(Adder)Naming.lookup("rmi://localhost:5000/sonoo");  
System.out.println(stub.add(34,4));  
}catch(Exception e){}  
}  
}   

[error image][1]
0 Answers
Related