One reason why RMI programs run on Windows and report errors on Linux

Source: Internet
Author: User
RMI programs can run on Windows. One reason for an error in Linux is Linux general technology-Linux programming and kernel information. For more information, see the following. A rmi program was written last week because of work needs. The program runs properly on my own computer (Windows Platform), but unexpected problems occur after the program is submitted to the company's Linux server.

After starting rmiregistry in the command line, start the program's server. Then the JVM prompts:

Java. rmi. UnmarshalException: Error unmarshaling return header: java. io. EOFException

From the stack output result of the method call, a problem occurs when the program runs to the Naming. rebind () method. After that, I copied the same program to other Windows machines for local compilation. All Linux servers (installed RedHat EL 4 and Java SE 5.0) of the company have the same problem. Finally, I continued to search for materials using Google and found this post on SUN Technology Forum: "Basic RMI program works in windows but not Linux ". It turns out that gcc installed on Linux also has the implementation of rmiregistry and rmic, and the corresponding environment variables are not configured for this. So that the two commands can be directly entered in the command line. In fact, the corresponding program of Java 5 is called, but the gcc version.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.