Raw Socket support in Java

Status
Not open for further replies.

wb

Ars Legatus Legionis
25,208
Subscriptor
Well, I can remember back when 1.2 was first released I saw a comment by one of the lead developers that they would never include that functionality due to the security implications.

However, doing a search on java.sun.com turned up the following article on creating custom sockets:

http://java.sun.com/j2se/1.3/docs/guide/rmi/sockettype.doc.html
 

newton_meter

Ars Scholae Palatinae
1,424
Originally posted by langri:
Are any of you aware of Raw Socket support in Java, and if so, have you made use of it?

It was talked about as a feature of "Merlin" (the code name for 1.4), and was in Sun's hype before the first 1.4 beta came out (I remember reading about it within the last year, probably about 10 months ago). But, as you noticed :( it's not in 1.4.

The current story is that it's being "considered" for "Tiger" (the code name for 1.5). Since the 1.4 release candidate just came out, 1.5 is a ways off. If you've got access to the developer connection, you should read bug ID 4093850.

The best workaround I can think of is to implement your own RawSocketImpl (native) class. That should be generally useful, maybe I'll do it someday.

The problems (for Sun) are: a) not every OS has raw socket support, b) Unices require root priveleges to use raw sockets, which requires the JVM to run as root, which is a security problem since the JVM can execute native code.

The problems (for you) are: the workaround breaks "write once-run anywhere".

(kg*m*m)/(s*s)
 

langri

Ars Tribunus Militum
1,792
Originally posted by newton_meter:
Quote: "Originally posted by langri:
Are any of you aware of Raw Socket support in Java, and if so, have you made use of it?"

It was talked about as a feature of "Merlin" (the code name for 1.4), and was in Sun's hype before the first 1.4 beta came out (I remember reading about it within the last year, probably about 10 months ago). But, as you noticed :( it's not in 1.4.

The current story is that it's being "considered" for "Tiger" (the code name for 1.5). Since the 1.4 release candidate just came out, 1.5 is a ways off. If you've got access to the developer connection, you should read bug ID 4093850.

The best workaround I can think of is to implement your own RawSocketImpl (native) class. That should be generally useful, maybe I'll do it someday.

The problems (for Sun) are: a) not every OS has raw socket support, b) Unices require root priveleges to use raw sockets, which requires the JVM to run as root, which is a security problem since the JVM can execute native code.

The problems (for you) are: the workaround breaks "write once-run anywhere".

(kg*m*m)/(s*s)

Well I'll be darned, it appears that you were the one that told me about it.
 
Status
Not open for further replies.