Operating System - OpenVMS
1752369 Members
6003 Online
108787 Solutions
New Discussion юеВ

TCPIP Service that runs a java class

 
Kyle Bolin
Occasional Contributor

TCPIP Service that runs a java class

I have set up a tcpip service that listens on a port and execute a .COM file when the request is answered. The DCL file then runs a java class. In the java class I want to read the data from the socket. do I use a java socket or try to read from the BG device
3 REPLIES 3
ptrskg
Frequent Advisor

Re: TCPIP Service that runs a java class

Hi Kyle,

Have you tried to open an input/output stream with SYS$NET as the file descriptor?
I haven't tested this with java but I think it should work.

Peter
Kyle Bolin
Occasional Contributor

Re: TCPIP Service that runs a java class

No I have not
What I am trying to do is to have the port spin up the application and the app read from the port. What I get is a bind exception that the port is in use

In a idea world , The service would run up a server.com file and the server.com file would do a $java server.class
somewhat like a on-demand web server
Jim_McKinney
Honored Contributor

Re: TCPIP Service that runs a java class

I second Peter's advice of just opening SYS$NET (or the device it equates to) and doing all IO to the channel assigned to it. Though I haven't done this with Java I have been successful with this strategy using pure DCL or DCL that invokes programs (which open the channel) written in C or Macro.