[BSD] Java érdekesség...
Auth Gábor
auth.gabor at enaplo.hu
2006. Nov. 6., H, 22:41:23 CET
Halihó!
$ cat Printer.java
import javax.print.*;
public class Printer {
public static void main( String args[] ) {
PrintService printer =
PrintServiceLookup.lookupDefaultPrintService();
System.out.println( printer.getName() );
}
}
$ which java
/usr/local/bin/java
$ java -version
java version "1.5.0-p3"
$ java Printer
Exception in thread "main" java.lang.NullPointerException
at Printer.main(Printer.java:6)
$ /usr/local/jdk1.5.0/bin/java Printer
Exception in thread "main" java.lang.NullPointerException
at Printer.main(Printer.java:6)
/usr/local/linux-sun-jdk1.4.2/bin/java Printer
Java HotSpot(TM) Client VM warning: Can't detect initial thread stack
location
IR2200
$ cat /etc/printcap
# This file was automatically generated by cupsd(8) from the
# /usr/local/etc/cups/printers.conf file. All changes to this file
# will be lost.
IR2200|IR2200:rm=simonyi.sulinet.hu:rp=IR2200:
lp|IR2200:rm=simonyi.sulinet.hu:rp=lp:
$ which lpq
/usr/bin/lpq
$ /usr/bin/lpq
IR2200 is ready
no entries
$ /usr/local/bin/lpq
IR2200 is ready
no entries
===
Összefoglalva: az 1.5.0-s JDK-val nem tudok nyomtatni, az 1.4.2-es
Linux-os JDK-val igen. Mi okozhatja ezt a helyzetet? Valakinek van-e
ötlete?
--
http://www.enaplo.hu -=- http://www.javaforum.hu
Auth Gábor -=- FreeBSD 5.4 -=- http://bsd.lap.hu
+36-70/9400-341 -=- ICQ: 49179141 -=- Skype: authgabor
További információk a(z) BSD levelezőlistáról