Description of problem: I have the following test program: import javax.print.attribute.standard.PrinterIsAcceptingJobs; import javax.print.PrintService; import javax.print.PrintServiceLookup; class listprinters { public static void main(String[] argv) { PrintService ss[] = PrintServiceLookup.lookupPrintServices(null,null); System.out.println("found " + ss.length + " services"); for(int i = 0; i < ss.length; i++) { javax.print.attribute.Attribute att[] = ss[i].getAttributes().toArray(); System.out.println("found " + att.length + " attributes for " + ss[i].getName()); for(int j = 0; j < att.length; j++) System.out.println(ss[i].getName() + "/" + att[j].getName() + (att[j].equals(PrinterIsAcceptingJobs.ACCEPTING_JOBS) ? "" : "not") + " accepting jobs" ); } } } When I build a binary and run it, I get the following error: Exception in thread "main" java.lang.IllegalArgumentException: lowerBound may not be less than 1 at javax.print.attribute.standard.JobKOctetsSupported.<init>(libgcj.so.13) at gnu.javax.print.ipp.IppResponse$ResponseReader.parseAttributes(libgcj.so.13) at gnu.javax.print.ipp.IppResponse$ResponseReader.parseResponse(libgcj.so.13) at gnu.javax.print.ipp.IppResponse.setResponseData(libgcj.so.13) at gnu.javax.print.ipp.IppRequest.send(libgcj.so.13) at gnu.javax.print.ipp.IppPrintService.getPrinterAttributes(libgcj.so.13) at gnu.javax.print.ipp.IppPrintService.<init>(libgcj.so.13) at gnu.javax.print.ipp.IppMultiDocPrintService.<init>(libgcj.so.13) at gnu.javax.print.CupsPrintService.<init>(libgcj.so.13) at gnu.javax.print.CupsServer.getAllPrinters(libgcj.so.13) at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13) at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13) at javax.print.PrintServiceLookup.lookupPrintServices(libgcj.so.13) at listprintersOne.main(listprintersOne) This happens only on rhel7, it did not occure on rhel6 neither rhel5. Is this intended or is it a bug? Version-Release number of selected component (if applicable): gcc-java-4.7.2-8.el7.x86_64 cups-1.5.4-22.el7.x86_64 cups-libs-1.5.4-22.el7.x86_64 libgcj-devel-4.7.2-8.el7.x86_64 libgcj-4.7.2-8.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. service cups start 2. create a listprinters.java file with the simple test code 3. build a binary gcj -o listprinters --main=listprinters ./listprinters.java 4. run the binary Actual results: should not throw an exception Expected results: an exception is thrown Additional info:
I could not find gcc-java-4.8 (at least not in brew). Can you give me a hint what package do I need instead to build java file. Or am I just looking for it at a wrong place?
Ah right, forgot that, %if 0%{?rhel} >= 7 then we don't build gcj at all. Thus nothing to test for RHEL7 then... Though if it doesn't work with gcc 4.8.0, perhaps something to investigate for F19+ which still enables gcj.
Not a bug in RHEL7 then.