[6017] in java-interest

home help back first fref pref prev next nref lref last post

Re: implementing a server in Java...

daemon@ATHENA.MIT.EDU (Anselm Baird-Smith)
Thu Mar 14 18:58:44 1996

Date:         Thu, 14 Mar 1996 18:39:44 +0500
Reply-To: Anselm Baird-Smith <abaird@w3.org>
From: Anselm Baird-Smith <abaird@w3.org>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>
In-Reply-To:  <199603142117.AA10316@kodakr.kodak.com>

Jay Allen writes:

 > There are, as you suspected, other ancillary concerns. E.g., only superuser
 > can use port numbers below a certain integer (I believe it's 124, but I
 > could certainly be wrong).

Its 1024, and it is definitely a problem to be solved. I have think of
various ways to deal with this, none of them are nice:

a) write some native method to allow Java objects to access the
   appropriate system calls (eg setuid, setgid, etc)

This is obviously against Java philosophy (?)

b) fork the interpreter through a C written wrapper, that would
allocate the socket port, and pass it (across fork) to the Java
interpreter.

This could do it, if the java interpreter or the socket class was nice
enough to be able to socketify its standard input stream.

c) Run the java interpreter as root.

No comments

If I am missing any nicer way of doing this, let me know !

Anselm.

home help back first fref pref prev next nref lref last post