On Jan 28, 2007, at 1:13 PM, Alexander Gromnizki wrote:
Hi,
Prologue: I'm very new to Java.
After compiling and installing on FreeBSD 6.0 Classpath 0.93
(--with-jikes --disable-gtk-peer --disable-gconf-peer --disable-plugin
--enable-local-sockets --enable-xmlj --prefix=/opt/java) and JamVM
1.4.4
(--prefix=/opt/java --with-classpath-install-dir=/opt/java
--disable-zip) I did:
# pwd
/opt/java/share/classpath
# unzip glibj.zip
# unzip tools.zip
# rm glibj.zip tools.zip
And my HelloWorld test runs fine. But when I'm trying to execute any
Classpath tool (for example, gjar) I'm getting:
% jamvm gnu.classpath.tools.jar.Main
[...]
Caused by: java.io.IOException: Inappropriate ioctl for device
at gnu.java.nio.VMChannel.available(Native Method)
That method does this in Classpath:
jint avail = 0;
if (ioctl (fd, FIONREAD, &avail) == -1)
JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
return avail;
I'm not a FreeBSD expert, but I would have thought that it would
support the FIONREAD ioctl. The FD may not be a file in this case,
but I can't imagine what it would be otherwise, given the rest of the
stack:
at gnu.java.nio.VMChannel.available(VMChannel.java:144)
at gnu.java.nio.FileChannelImpl.available(FileChannelImpl.java:188)
at java.io.FileInputStream.available(FileInputStream.java:179)
at java.io.FilterInputStream.available(FilterInputStream.java:129)
at java.io.BufferedInputStream.read(BufferedInputStream.java:276)
at java.io.FilterInputStream.read(FilterInputStream.java:173)
at java.io.InputStreamReader.read(InputStreamReader.java:459)
at java.io.BufferedReader.fill(BufferedReader.java:373)
at java.io.BufferedReader.readLine(BufferedReader.java:475)
at java.util.Properties.load(Properties.java:201)
at java.util.PropertyResourceBundle.<init>
(PropertyResourceBundle.java:109)
at java.util.ResourceBundle.tryBundle(ResourceBundle.java:483)
...11 more
So, can we use Classpath Tools when JamVM was compiled with
--disable-zip option?
As far as I know this should work. The gotcha here is likely the
properties files, which the code was trying to read when it threw
this exception.
Do you have the file gnu/classpath/tools/common/Messages.properties
in your share/classpath directory?