Hi,
> needed. It works like a charm but, the typical but word my classes when
> used by the JVM either through security exceptions or are unreadable. To
> transfer the class file we are using the following:
[snip]
> DataInputStream di = new DataInputStream(new
> FileInputStream(new File(loc)));
> int avail = di.available();
> System.out.println("Available: " + avail);
> byte[] data = new byte[avail];
> di.readFully(data);
I'm afraid it's an RTFM. available() tells you how many bytes can be read
without blocking. This is NOT necessarily the size of the file. You're
probably sending the first 1k of each file to your clients. The class
file will then of course fail during loading.
Just a guess,
dstn.
PS - I wrote an app that does something like this (transferring file via
RMI), and I would suggest that you be extremely careful about path
separator characters.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]