java.rmi.server.ExportException: Listen failed on port: 1099;
843793Oct 7 2009 — edited Oct 7 2009Hi All,
I am trying to run RMI tutorial from sun's java tutorial. It has 8 parts. The last two parts are "Compiling the Example Programs" and "Running the Example Programs".
Until "Compiling the Example Programs", I am okay.
But I am stuck in the last part, "Running the Example Programs". When I use the command "rmiregistry", it gives me a list of exceptions as follows.
c:\home\ann\src>rmiregistry
java.rmi.server.ExportException: Listen failed on port: 1099; nested exception is:
java.net.SocketException: Permission denied: listen failed
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:312)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:322)
Caused by: java.net.SocketException: Permission denied: listen failed
at java.net.PlainSocketImpl.socketListen(Native Method)
at java.net.PlainSocketImpl.listen(PlainSocketImpl.java:380)
at java.net.ServerSocket.bind(ServerSocket.java:320)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:27)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:333)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
... 7 more
c:\home\ann\src>
Then, I try to use "start rmiregistry" command. At that time, a command window stating the above exception popup just for a while and closed automatically.
Now, I use jdk1.6.0_16 on Windows Vista.
Previously, I used j2sdk1.4.2_19. That time, I could run "start rmiregistry" properly and could try testing another RMI example application.
But if I use j2sdk1.4.2_19, compiling some statements in the sun's RMI tutorial gives me error. So, I change to use jdk1.6.0_16 for this tutorial. "jdk1.6.0_16" compiles all programs in the tutorial with no error. But I can't run the statement "start rmiregistry".
I use the command prompt from Vista's default Administrator account and already disable User Account Control too.
Any help, please!
Thanks a lot,
atzm111