Hi All,

I now think that a socket interface between JDE and the debugger will
probably work even on an unconnected Win95 machine. I've verified on my own
Win95 machine that Emacs can connect to a java.net.ServerSocket, using the
inet address 127.0.0.1. (I had no luck with the various
hosts/lmhosts/rhosts file solutions previously suggested. In fact, I'm
beginning to think the hosts file solution is an urban legend.) If you're
interested in trying the inet address solution yourself, open a bsh command
window and execute the following statements:

import java.net.*;
import java.io.*;
server = new ServerSocket(2048);
socket = server.accept();

The bsh should appear to hang as the Java server (i.e., ultimately jdebug)
waits for a connection. Next, open a second window on the Emacs *scratch*
buffer and execute

(open-network-stream "jdebug" "*scratch*" "127.0.0.1" 2048)

You should see the bsh prompt reappear as Emacs connects to the server
socket on port 2048. Next, return to bsh and execute the following commands

input = socket.getInputStream();
reader = new InputStreamReader(reader);
reader = new BufferedReader(reader);
print(reader.readLine());

Again, the bsh should appear to hang as the server socket waits for input
from Emacs. So return to the *scratch* buffer and execute

(process-send-string "jdebug" "hello\n")

You should see "hello" appear in the bsh window.

If you try this solution, I'd appreciate hearing whether it works.

Regards,

Paul

Reply via email to