Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6999833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:35:34+00:00 2026-05-27T20:35:34+00:00

I wrote a simple implementation class: public interface MyRemote extends Remote { public String

  • 0

I wrote a simple implementation class:

public interface MyRemote extends Remote {
    public String sayHello() throws RemoteException;
}

Then a remote server class

public class MyRemoteImpl extends UnicastRemoteObject implements MyRemote{

    protected MyRemoteImpl() throws RemoteException {

    }

    public String sayHello() throws RemoteException {
        return "Server says 'Hello World!'";
    }

    public static void main(String args[]) {
        try {
            MyRemote service = new MyRemoteImpl();
            Naming.rebind("RemoteHello", service);
        } catch (RemoteException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (MalformedURLException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
    }
}

Now I read the rmiregistry needs to be started in the same path where the original classes are (and their stubs) so I just compiled using intllij IDEA and auto generated the Stub classes, then copied all the classes to my java path that has the rmiregistry.exe file and then ran the rmiregistry (I know this must be a pretty dumb method but I was just trying to get it to work as a test). I still get an error as listed at the bottom of this post whenever I try and compile the server file.

The book I am working from says to use java’s rmic command to generate the stubs and skeletons but I can’t find this file (maybe it’s from an older version of JAVA?) so I’m just using Intellij IDEA to generate the stub file instead…but no skeleton file is generated.

I’m sure there are several things about RMI I don’t understand but I looked up some tutorials online and can’t figure out what it is, thought maybe someone on stackoverflow could point me in the right direction. Any help would be much appreciated.

java.rmi.ServerError: Error occurred in server thread; nested
exception is: java.lang.UnsupportedClassVersionError: MyRemote :
Unsupported major.minor version 51.0 at
sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source) at
sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at
sun.rmi.transport.Transport$1.run(Unknown Source) at
java.security.AccessController.doPrivileged(Native Method) at
sun.rmi.transport.Transport.serviceCall(Unknown Source) at
sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source) at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377) at
sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) at
java.rmi.Naming.rebind(Naming.java:177) at
MyRemoteImpl.main(MyRemoteImpl.java:27) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601) at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:35:34+00:00Added an answer on May 27, 2026 at 8:35 pm

    The error basically means you have compiled the classes in a higher version of Java than you are running them on. Make sure you are running the same JRE version or make sure you compile them against the version you want to run them on (using -target option of javac)

    Read this article for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a simple webpage as follows: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
For a simple repository public interface ISimpleRepository<T> { IApplicationState AppState { get; set; }
I wrote a UnitOfWork implementation that does not expose a public Commit() method. Instead
I wrote simple load testing tool for testing performance of Java modules. One problem
I wrote a simple batch file as a PowerShell script, and I am getting
I wrote a simple tool to generate a DBUnit XML dataset using queries that
I wrote a simple Windows Forms program in C#. I want to be able
I wrote a simple web service in C# using SharpDevelop (which I just got
I wrote a simple javascript image rotator which picks a random image on each
I wrote a simple javascript function to display a progressbar with the help of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.