Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 18:53:29 -0400 (EDT)
From:      Mark Mayo <mark@quickweb.com>
To:        Hiroyuki Hanai <hanai@astec.co.jp>
Cc:        hackers@FreeBSD.ORG
Subject:   More.. Re: JDK 1.0.2 problem..
Message-ID:  <Pine.BSF.3.94.961020183713.29844B-100000@vinyl.quickweb.com>
In-Reply-To: <199610201217.VAA00277@astec.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Oct 1996, Hiroyuki Hanai wrote:

> Mark Mayo wrote:
> 
> The current directory must be in CLASSPATH environment variable if your
> compiled class file is in the current directory.
> The java byte code interpreter, `java', takes the class name in the command
> line argument, not the file name.

Ok. I put current directory in the CLASSPATH and now it works! Hoever, I'm
having another problem with Networking.. the reason I ask here is that I
think it's some sort of FreeBSD related problem because my code works on
everything else.. (Microsoft, Symantec, and JDK under Windows NT, and on
Linux JDK). The interpreter seems to be fine on everything else (java.awt,
java.util stuff) - just barfs on the socket code

The example I'm working on is pretty much straight from the O'Reilley Java
in a Nutshell book.

Here is the snippet that throws an Exception (when it shouldn't)

        // The body of the server thread. Loop forever, listening for and
        // accepting connections from clients. For each connection, create
        // a Connection object to handle communication through the new
Socket.
        public void run() {
                try {
                        while (true) {
                                Socket client_socket = listen_socket.accept();
                                Connection c = new Connection(client_socket);
                        }
                }
                catch (IOException e) {
                        fail(e, "Exception while listening for connections");
                }
        }


It produces the following output when it runs:

mark:{115}/home/mark/Code/java/Networking/Server % java Server
Server: listening on port 11000
Exception while listening for connections:java.net.SocketException:
Resource temporarily unavailable

I tried different ports, always the same thing. I'm Unix stupid, so maybe
I'm just not allowed to listen to ports.. I can't see why not though.. :-)

I guess I'm just curious if anyone else has succesfully used the
ServerSocket stuff on the FreeBSD JDK port.

BTW, I'm super happy with the port, and I know the author isn't supporting
the package, but if there are problems (I don't know if the above is my
fault, or a problem with the JDK) I'm just trying to help work the bugs
out.  Having a working Java package on FreeBSD is a REAL big plus. The
more I work with Java, the more I like it. It's a great language!

TIA,
-Mark

-------------------------------------------
| Mark Mayo		mark@quickweb.com |
| C-Soft  	        www.quickweb.com  |
-------------------------------------------
"To iterate is human, to recurse divine."
		- L. Peter Deutsch


> 
> -----H.Hanai
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.94.961020183713.29844B-100000>