public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* 'java.lang.String' has no method
@ 2010-03-25 18:08 Keith
  2010-03-25 18:26 ` Andrew Haley
  2010-03-26 16:51 ` Keith
  0 siblings, 2 replies; 10+ messages in thread
From: Keith @ 2010-03-25 18:08 UTC (permalink / raw)
  To: java

 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 
under 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=c,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=/mingw 
--with-gmp=/mingw/src/gmp/root
--with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread model: win32
gcc version 4.4.0 (GCC)

with the command:
gcj 
--classpath="/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pps/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.osgi_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.common_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.performanceplanningsystem.site.SiteElement,com.performanceplanningsystem.site.SiteElement,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.performanceplanningsystem.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.performanceplanningsystem.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 = 0;
String nameString = "daily";
// resource is  {"report.filename.fmt", "report%1$d.txt"},
Line 829:
        String reportName = String.format(nameString + 
PPS.getPpsResources().getString("report.filename.fmt"), reportCount); 
//$NON-NLS-1$

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 'java.lang.String' has no method
  2010-03-25 18:08 'java.lang.String' has no method Keith
@ 2010-03-25 18:26 ` Andrew Haley
  2010-03-26 16:51 ` Keith
  1 sibling, 0 replies; 10+ messages in thread
From: Andrew Haley @ 2010-03-25 18:26 UTC (permalink / raw)
  To: Keith; +Cc: java

On 03/25/2010 06:08 PM, 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?

It's very hard to say.  Have a look in libgcj.jar:

 jcf-dump -classpath /home/aph/gcc/gcc-4_4-branch/install/share/java/libgcj-4.4.1.jar java.lang.String

You should see:

Method name:"format" public static varargs Descriptor: (java.lang.String,java.lang.Object[])java.lang.String

Make sure you're using the same libgcj.jar as the compiler.

Andrew.



> When I compile Reports.class (compiled with java 1.6.0_10) using gcj
> under 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=c,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=/mingw
> --with-gmp=/mingw/src/gmp/root
> --with-mpfr=/mingw/src/mpfr/root --build=mingw32
> Thread model: win32
> gcc version 4.4.0 (GCC)
> 
> with the command:
> gcj
> --classpath="/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pps/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.osgi_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.common_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.performanceplanningsystem.site.SiteElement,com.performanceplanningsystem.site.SiteElement,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.performanceplanningsystem.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.performanceplanningsystem.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 = 0;
> String nameString = "daily";
> // resource is  {"report.filename.fmt", "report%1$d.txt"},
> Line 829:
>        String reportName = String.format(nameString +
> PPS.getPpsResources().getString("report.filename.fmt"), reportCount);
> //$NON-NLS-1$
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 'java.lang.String' has no method
  2010-03-25 18:08 'java.lang.String' has no method Keith
  2010-03-25 18:26 ` Andrew Haley
@ 2010-03-26 16:51 ` Keith
  2010-03-26 16:55   ` Andrew John Hughes
  1 sibling, 1 reply; 10+ messages in thread
From: Keith @ 2010-03-26 16:51 UTC (permalink / raw)
  To: Keith; +Cc: java

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 
not, then never mind.
Eventually, I will try and suggest some patches for the the missing 
methods, but right now
I have code to get out so I am doing 1.5 work-a-rounds.

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 
> under 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=c,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=/mingw 
> --with-gmp=/mingw/src/gmp/root
> --with-mpfr=/mingw/src/mpfr/root --build=mingw32
> Thread model: win32
> gcc version 4.4.0 (GCC)
>
> with the command:
> gcj 
> --classpath="/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pps/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.osgi_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.common_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.performanceplanningsystem.site.SiteElement,com.performanceplanningsystem.site.SiteElement,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.performanceplanningsystem.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.performanceplanningsystem.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 = 0;
> String nameString = "daily";
> // resource is  {"report.filename.fmt", "report%1$d.txt"},
> Line 829:
>        String reportName = String.format(nameString + 
> PPS.getPpsResources().getString("report.filename.fmt"), reportCount); 
> //$NON-NLS-1$
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 'java.lang.String' has no method
  2010-03-26 16:51 ` Keith
@ 2010-03-26 16:55   ` Andrew John Hughes
  2010-03-30 18:27     ` link error: undefined reference Keith
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andrew John Hughes @ 2010-03-26 16:55 UTC (permalink / raw)
  To: Keith; +Cc: java

On 26 March 2010 16:51, Keith <keith@rhsdplanning.com> 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 not,
> then never mind.
> Eventually, I will try and suggest some patches for the the missing methods,
> 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 under
>> 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=c,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=/mingw
>> --with-gmp=/mingw/src/gmp/root
>> --with-mpfr=/mingw/src/mpfr/root --build=mingw32
>> Thread model: win32
>> gcc version 4.4.0 (GCC)
>>
>> with the command:
>> gcj
>> --classpath="/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pps/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.osgi_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.common_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.performanceplanningsystem.site.SiteElement,com.performanceplanningsystem.site.SiteElement,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.performanceplanningsystem.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.performanceplanningsystem.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 = 0;
>> String nameString = "daily";
>> // resource is  {"report.filename.fmt", "report%1$d.txt"},
>> Line 829:
>>       String reportName = String.format(nameString +
>> PPS.getPpsResources().getString("report.filename.fmt"), reportCount);
>> //$NON-NLS-1$
>>
>
>



-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* link error: undefined reference
  2010-03-26 16:55   ` Andrew John Hughes
@ 2010-03-30 18:27     ` Keith
  2010-03-31  7:46       ` Andrew Haley
       [not found]     ` <4BB23C24.3030103@rhsdplanning.com>
  2010-03-30 18:41     ` Keith
  2 siblings, 1 reply; 10+ messages in thread
From: Keith @ 2010-03-30 18:27 UTC (permalink / raw)
  To: java

Environment is Windows XP, gcj 4.4.0, compiling under MSYS
The final error I have is:

C:\DOCUME~1\Keith\LOCALS~1\Temp\ccXVrvPx.o:cc8hZGFd.i:(.text+0x29): 
undefined reference to `com::performanceplanningsystem::ui::PPS::class$'
collect2: ld returned 1 exit status

The compile line is

gcj -fjni --main=com.performanceplanningsystem.ui.PPS 
--classpath=/Croot/jprojects/pps/dist/lib/pps.jar:/Croot/jprojects/pps/dist/lib/pentium.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar:/Croot/jprojects/pps/dist/lib/org.eclipse.osgi_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.common_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:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.equinox.registry_3.4.100.v20090520-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.expressions_3.4.100.v20090429-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.jobs_3.4.100.v20090429-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.equinox.preferences_3.2.300.v20090520-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/com.ibm.icu_4.0.1.v20090415.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.databinding.property_1.2.0.I20090526-2000.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.help_3.4.0.v20090526.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.jface.databinding_1.3.0.I20090525-2000.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.databinding.observable_1.2.0.I20090604-2000.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.contenttype_3.4.0.v20090429-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20090413.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.equinox.app_1.2.0.v20090520-1800.jar:/Croot/eclipse-SDK-3.5-win32/eclipse/plugins/org.eclipse.core.databinding_1.2.0.I20090604-2000.jar 
-o PPS.exe -L./lib -llibpps -lunikey -ldwg  -llibactivation 
-llibjRegistryKey -llibmail -llibpentium 
-lliborg.eclipse.jface_3.5.0.I20090525-2000 -llibswtimageloader 
-lliborg.eclipse.swt.win32.win32.x86_3.5.0.v3550b 
-lliborg.eclipse.ui.workbench_3.5.0.I20090603-2000 
-lliborg.eclipse.osgi_3.5.0.v20090520 
-lliborg.eclipse.core.commands_3.5.0.I20090525-2000-lliborg.eclipse.core.databinding.property_1.2.0.I20090526-2000 
-lliborg.eclipse.core.runtime_3.5.0.v20090525 
-lliborg.eclipse.equinox.common_3.5.0.v20090520-1800-lliborg.eclipse.equinox.registry_3.4.100
.v20090520-1800 -lliborg.eclipse.core.expressions_3.4.100.v20090429-1800 
-lliborg.eclipse.core.jobs_3.4.100.v20090429-1800 
-lliborg.eclipse.equinox.preferences_3.2.300.v20090520-1800 
-llibcom.ibm.icu_4.0.1.v20090415-lliborg.eclipse.core.databinding.property_1.2.0.I20090526-2000 
-lliborg.eclipse.help_3.4.0.v20090526 
-lliborg.eclipse.jface.databinding_1.3.0.I20090525-2000 
-lliborg.eclipse.core.databinding.observable_1.2.0.I20090604-2000 
-lliborg.eclipse.core.contenttype_3.4.0.v20090429-1800 
-lliborg.eclipse.core.runtime.compatibility.auth_3.2.100.v20090413 
-lliborg.eclipse.equinox.app_1.2.0.v20090520-1800 
-lliborg.eclipse.core.databinding_1.2.0.I20090604-2000 -mwindows 
-Wl,--enable-auto-import

com/performanceplanningsystem/ui/PPS.class is compiled into 
com_performanceplanningsystem_ui_PPS.o
and archived in lib/libPPS.lib

The compile flags for PPS.class are  -O0 -m32 -fjni -findirect-dispatch

Do you have any suggestions about what I should change or look for to 
find my error?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 'java.lang.String' has no method
       [not found]     ` <4BB23C24.3030103@rhsdplanning.com>
@ 2010-03-30 18:31       ` Andrew John Hughes
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew John Hughes @ 2010-03-30 18:31 UTC (permalink / raw)
  To: Keith; +Cc: java

On 13:00 Tue 30 Mar     , Keith wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
>   <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
>   <title></title>
> </head>
> <body bgcolor="#ffffff" text="#000000">
> I was using java.net.NetworkInterface.getHardwareAddress() to get the
> MAC address. Work around is a JNI call (currently Windows only).<br>
> <br>

Ok, we'll need to look at a more general solution for that.

> I was using ResourceBundle.keySet() and ResourceBundle.containsKey()<br>

Ok, thanks.  I'll try and look at adding these, but can't promise when.

Thanks for the information.  BTW, can you please send mails in plain text format.  This one was pretty hard to read.

> <br>
> HTH,<br>
> <br>
> Keith<br>
> <br>
> Andrew John Hughes wrote:
> <blockquote
>  cite="mid:17c6771e1003260954q21babf04v1f4f22139c692d94@mail.gmail.com"
>  type="cite">
>   <pre wrap="">On 26 March 2010 16:51, Keith <a
>  class="moz-txt-link-rfc2396E" href="mailto:keith@rhsdplanning.com">&lt;keith@rhsdplanning.com&gt;</a> wrote:
>   </pre>
>   <blockquote type="cite">
>     <pre wrap="">Does libgcj-4.4.0.jar support Java 1.6?</pre>
>   </blockquote>
>   <pre wrap=""><!---->
> It supports bits of it:
> 
> <a class="moz-txt-link-freetext"
>  href="http://builder.classpath.org/japi/openjdk6-libgcj.html">http://builder.classpath.org/japi/openjdk6-libgcj.html</a>
> 
> 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!</pre>
> </blockquote>
> </body>
> </html>
> 

Cheers,
-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 'java.lang.String' has no method
  2010-03-26 16:55   ` Andrew John Hughes
  2010-03-30 18:27     ` link error: undefined reference Keith
       [not found]     ` <4BB23C24.3030103@rhsdplanning.com>
@ 2010-03-30 18:41     ` Keith
  2 siblings, 0 replies; 10+ messages in thread
From: Keith @ 2010-03-30 18:41 UTC (permalink / raw)
  To: ahughes; +Cc: java

Resending in plain text:

I was using java.net.NetworkInterface.getHardwareAddress() to get the 
MAC address. Work around is a JNI call (currently Windows only).

I was using ResourceBundle.keySet() and ResourceBundle.containsKey()

HTH,

Keith

Andrew John Hughes wrote:
> On 26 March 2010 16:51, Keith <keith@rhsdplanning.com> wrote:
>   
>> Does libgcj-4.4.0.jar support Java 1.6?
>
> 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!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: link error: undefined reference
  2010-03-30 18:27     ` link error: undefined reference Keith
@ 2010-03-31  7:46       ` Andrew Haley
  2010-04-01 20:08         ` Keith
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Haley @ 2010-03-31  7:46 UTC (permalink / raw)
  To: Keith; +Cc: java

On 30/03/10 19:27, Keith wrote:
> Environment is Windows XP, gcj 4.4.0, compiling under MSYS
> The final error I have is:
> 
> C:\DOCUME~1\Keith\LOCALS~1\Temp\ccXVrvPx.o:cc8hZGFd.i:(.text+0x29):
> undefined reference to `com::performanceplanningsystem::ui::PPS::class$'
> collect2: ld returned 1 exit status

This is because you're mixing -findirect-dispatch and
-fno-indirect-dispatch, which doesn't work.  Compile the executable
with -findirect-dispatch too.

Andrew.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: link error: undefined reference
  2010-03-31  7:46       ` Andrew Haley
@ 2010-04-01 20:08         ` Keith
  2010-04-02  8:47           ` Andrew Haley
  0 siblings, 1 reply; 10+ messages in thread
From: Keith @ 2010-04-01 20:08 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Thank you very much. I feel like an idiot. Obviously I've been away from 
gcc too long and forgot to keep my compile flags consistent.

Just FYI, compiling under Windows XP, SP3, using gcj 4.4.0, mingw, and msys

When I compile with -O0 -m32 -fjni -findirect-dispatch
using gcj 4.4.0, I get
gcj: unrecognized option '-s-bc-abi'
for some files. It seems to do no harm.

$ cat Test.java
class Test {
    public static void main(String[] args)
    {
        System.out.println("Sample message");
    }
}

$ sh -x make-test.sh
+ C_FLAGS='-O0 -m32 -findirect-dispatch'
+ gcj -O0 -m32 -findirect-dispatch -C Test.java
gcj.exe: unrecognized option '-s-bc-abi'
+ gcj -O0 -m32 -findirect-dispatch -o Test.exe Test.class --main=Test 
-Wl,--enable-auto-import

$ ./Test.exe
Simple message


$ sh -x make-test.sh
+ C_FLAGS='-O0 -m32'
+ gcj -O0 -m32 -C Test.java
+ gcj -O0 -m32 -o Test.exe Test.class --main=Test -Wl,--enable-auto-import

$ ./Test.exe

This application has requested the Runtime to terminate it in an unusual 
way.
Please contact the application's support team for more information.


Andrew Haley wrote:
> On 30/03/10 19:27, Keith wrote:
>   
>> Environment is Windows XP, gcj 4.4.0, compiling under MSYS
>> The final error I have is:
>>
>> C:\DOCUME~1\Keith\LOCALS~1\Temp\ccXVrvPx.o:cc8hZGFd.i:(.text+0x29):
>> undefined reference to `com::performanceplanningsystem::ui::PPS::class$'
>> collect2: ld returned 1 exit status
>>     
>
> This is because you're mixing -findirect-dispatch and
> -fno-indirect-dispatch, which doesn't work.  Compile the executable
> with -findirect-dispatch too.
>
> Andrew.
>
>
>   

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: link error: undefined reference
  2010-04-01 20:08         ` Keith
@ 2010-04-02  8:47           ` Andrew Haley
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Haley @ 2010-04-02  8:47 UTC (permalink / raw)
  To: java

On 01/04/10 21:07, Keith wrote:
> Thank you very much. I feel like an idiot. Obviously I've been away from
> gcc too long and forgot to keep my compile flags consistent.
> 
> Just FYI, compiling under Windows XP, SP3, using gcj 4.4.0, mingw, and msys
> 
> When I compile with -O0 -m32 -fjni -findirect-dispatch
> using gcj 4.4.0, I get
> gcj: unrecognized option '-s-bc-abi'
> for some files. It seems to do no harm.

It's just complaining that indirect-dispatch makes no sense when
compiling .java to .class.  It doesn't matter.

> $ cat Test.java
> class Test {
>    public static void main(String[] args)
>    {
>        System.out.println("Sample message");
>    }
> }
> 
> $ sh -x make-test.sh
> + C_FLAGS='-O0 -m32 -findirect-dispatch'
> + gcj -O0 -m32 -findirect-dispatch -C Test.java
> gcj.exe: unrecognized option '-s-bc-abi'
> + gcj -O0 -m32 -findirect-dispatch -o Test.exe Test.class --main=Test
> -Wl,--enable-auto-import
> 
> $ ./Test.exe
> Simple message
> 
> 
> $ sh -x make-test.sh
> + C_FLAGS='-O0 -m32'
> + gcj -O0 -m32 -C Test.java
> + gcj -O0 -m32 -o Test.exe Test.class --main=Test -Wl,--enable-auto-import
> 
> $ ./Test.exe
> 
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.

Sorry, dunno.  It should work, but I don't have a Windows system.

Did you run the gcj test suite?

Andrew.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-04-02  8:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-25 18:08 'java.lang.String' has no method Keith
2010-03-25 18:26 ` Andrew Haley
2010-03-26 16:51 ` Keith
2010-03-26 16:55   ` Andrew John Hughes
2010-03-30 18:27     ` link error: undefined reference Keith
2010-03-31  7:46       ` Andrew Haley
2010-04-01 20:08         ` Keith
2010-04-02  8:47           ` Andrew Haley
     [not found]     ` <4BB23C24.3030103@rhsdplanning.com>
2010-03-30 18:31       ` 'java.lang.String' has no method Andrew John Hughes
2010-03-30 18:41     ` Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).