From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12523 invoked by alias); 26 Mar 2010 16:55:07 -0000 Received: (qmail 12484 invoked by uid 22791); 26 Mar 2010 16:55:05 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-fx0-f228.google.com (HELO mail-fx0-f228.google.com) (209.85.220.228) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Mar 2010 16:55:00 +0000 Received: by fxm28 with SMTP id 28so43161fxm.16 for ; Fri, 26 Mar 2010 09:54:57 -0700 (PDT) MIME-Version: 1.0 Reply-To: ahughes@redhat.com Received: by 10.239.150.4 with HTTP; Fri, 26 Mar 2010 09:54:56 -0700 (PDT) In-Reply-To: <4BACE60D.9080103@rhsdplanning.com> References: <4BABA6A1.4020404@rhsdplanning.com> <4BACE60D.9080103@rhsdplanning.com> Date: Fri, 26 Mar 2010 16:55:00 -0000 Received: by 10.239.158.66 with SMTP id t2mr106350hbc.184.1269622497147; Fri, 26 Mar 2010 09:54:57 -0700 (PDT) Message-ID: <17c6771e1003260954q21babf04v1f4f22139c692d94@mail.gmail.com> Subject: Re: 'java.lang.String' has no method From: Andrew John Hughes To: Keith Cc: java@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00023.txt.bz2 On 26 March 2010 16:51, Keith wrote: > Thanks. That was it.I was using libgcj-4.3.0.jar rather than > libgcj-4.4.0.jar > > Does libgcj-4.4.0.jar support Java 1.6? If so there are some 1.6 methods > missing for java.util.ResourceBundle and java.net.NetworkInterface. If no= t, > then never mind. > Eventually, I will try and suggest some patches for the the missing metho= ds, > but right now > I have code to get out so I am doing 1.5 work-a-rounds. > It supports bits of it: http://builder.classpath.org/japi/openjdk6-libgcj.html And yes, there are known holes in java.net and ResourceBundle. I've looked at implementing them a couple of times, but not yet got round to it. Knowing which methods should be prioritised for implementation (i.e. because people actually use them in real-world code) would be very useful. And patches even more so! > Thanks, > > Keith > > > Keith wrote: >> >> From what I understand based on gcj e-mail and bug archives, I should not >> be seeing this error in 4.4.0, >> so what am I doing wrong? >> >> Keith >> >> When I compile Reports.class (compiled with java 1.6.0_10) using gcj und= er >> MinGW >> $ gcj -v >> Using built-in specs. >> Reading specs from c:/mingw/bin/../lib/gcc/mingw32/4.4.0/libgcj.spec >> rename spec startfile to startfileorig >> rename spec lib to liborig >> Target: mingw32 >> Configured with: ../gcc-4.4.0/configure >> --enable-languages=3Dc,ada,c++,fortran,jav >> a,objc,obj-c++ --disable-sjlj-exceptions --enable-shared --enable-libgcj >> --enabl >> e-libgomp --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug >> --enab >> le-version-specific-runtime-libs --prefix=3D/mingw >> --with-gmp=3D/mingw/src/gmp/root >> --with-mpfr=3D/mingw/src/mpfr/root --build=3Dmingw32 >> Thread model: win32 >> gcc version 4.4.0 (GCC) >> >> with the command: >> gcj >> --classpath=3D"/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pp= s/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workben= ch_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.w= in32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.o= sgi_3.5.0.v20090520.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.jface_3.5= .0.I20090525-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.equinox.com= mon_3.5.0.v20090520-1800.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.core= .runtime_3.5.0.v20090525.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.core= .commands_3.5.0.I20090525-2000.jar:/Croot/jprojects/pps/dist/lib/mail.jar:/= Croot/jprojects/pps/dist/lib/jRegistryKey.jar:/Croot/jprojects/pps/dist/lib= /ArciMathEval.jar:/Croot/jprojects/pps/dist/lib/activation.jar" >> -Os -c -o obj/com_performanceplanningsystem_site_Reports.o >> com/performanceplanningsystem/site/Reports.class >> >> I get: >> >> com/performanceplanningsystem/site/Reports.java:892: error: class >> 'java.lang.String' has no method named 'format' matching signature >> '(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;' >> com/performanceplanningsystem/site/Reports.java: In method >> 'com.performanceplanningsystem.site.Reports.startPoint(com.performancepl= anningsystem.site.SiteElement,com.performanceplanningsystem.site.SiteElemen= t,java.util.ArrayList)': >> com/performanceplanningsystem/site/Reports.java:1329: error: class >> 'java.lang.String' has no method named 'format' matching signature >> '(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;' >> com/performanceplanningsystem/site/Reports.java: In method >> 'com.performanceplanningsystem.site.Reports.findShape(com.performancepla= nningsystem.ui.PPS,java.util.Map)': >> com/performanceplanningsystem/site/Reports.java:2129: error: class >> 'java.lang.String' has no method named 'format' matching signature >> '(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;' >> com/performanceplanningsystem/site/Reports.java: In method >> 'com.performanceplanningsystem.site.Reports.greenReport(com.performancep= lanningsystem.ui.PPS,java.util.Map)': >> com/performanceplanningsystem/site/Reports.java:2519: error: class >> 'java.lang.String' has no method named 'format' matching signature >> '(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;' >> >> Code: >> int reportCount =3D 0; >> String nameString =3D "daily"; >> // resource is =C2=A0{"report.filename.fmt", "report%1$d.txt"}, >> Line 829: >> =C2=A0 =C2=A0 =C2=A0 String reportName =3D String.format(nameString + >> PPS.getPpsResources().getString("report.filename.fmt"), reportCount); >> //$NON-NLS-1$ >> > > --=20 Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8