Java newbie

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
I'm writing my first app in Eclipse and get the following debug spew. How do I fix this?

Activation.main: warning: sun.rmi.activation.execPolicy system
property unspecified and no ExecPermissions/ExecOptionPermissions
granted; subsequent activation attempts may fail due to unsuccessful
ExecPermission/ExecOptionPermission permission checks. For
documentation on how to configure rmid security, refer to:

http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html
http://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html

Activation.main: an exception occurred: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
at sun.rmi.server.Activation.main(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
... 9 more
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
My code is hello world type code. I don't think my code ever starts running; for some reason the Java engine wants to phone home is what it looks like to me.

I have no networking code in my code.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Okay, the engine seems to be calling rmid on my behalf.

I know nothing of rmid, what it is or what it does nor why the port would already be in use. I get the same debug spew running rmid manually from the command line.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
What type of project did you set up? It's trying to bind to port 1098, which is in use, but I don't know why a command line app would initiate an RMI server.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Project type? Uh... (remember, newbie here)... lemme se...

The project properties in Eclipse simply say Type: Project.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Ah. I think I found it.

When running the app, Eclipse does "searching for main types..." and then prompts me for Debug Type.

I just clicked OK. Activation is the highlighted Debug Type. I select Main and don't get this error.

But my app still isn't working.

How do I set my Debug Type permanently, what should I choose, and what does it mean?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I'm not sure I understand the question, but when you have the class with the main menu in context you should be looking for a "Run As..." menu (maybe click drop down from the run button) and choose the plain java application option. You might want to go to the console and make sure all the previous copies you've started are terminated because you probably have the first instance of your program hanging around bound to port 1098.