This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Class or interface `sun.io.CharToByteConverter' not found


Pardon the newbie question but it seems I need help to get started.

I'm trying to compile a working java program to binary with gcj. The 
application relies heavily on AWT and JCE (ABA provider). I hope to handle 
by replacing AWT with a MacOSX InterfaceBuilder frontend in the short run,
  and deal with any JCE issues by hand. But neither seems to be the problem 
here; the compile isn't getting even that far.

> gcj --version
> 2.96

Here's the Makefile I'm using. I'm stale on C style makefiles, so 
suggestions on how to set up Makefiles for gcj would be a big help.
> .SUFFIXES:
> .SUFFIXES: .java .o
>
> %.o: %.java
> 	gcj -c -O2 $< -o $@
>
> BIN= \
> 		edu/virtualschool/jwaa/Fault.o \
> 		edu/virtualschool/jwaa/ConnectionPool.o \
> 		edu/virtualschool/jwaa/PoolFault.o \
> 		dom/mybank/core/AbstractRequest.o \
> 		... snip ...
> all: $(BIN)

Here's the compile output; source and logfile is below. Apparently 
something (Serializable? ) is pulling in Sun's OutputStreamWriter (which 
does reference CharToByteConverter) instead of the libgcj version which 
doesn't. I thought libgcj would be included automatically.
> gcj -c -O2 dom/mybank/core/AbstractRequest.java -o 
> dom/mybank/core/AbstractRequest.o
> ./java/io/OutputStreamWriter.java:17: Class or interface 
> `sun.io.CharToByteConverter' not found in import.
> import sun.io.CharToByteConverter;
>        ^
> ./java/io/OutputStreamWriter.java:55: Type `CharToByteConverter' not 
> found in declaration of field `ctb'.
>     private CharToByteConverter ctb;
>             ^
> ./java/io/OutputStreamWriter.java:94: Type `CharToByteConverter' not 
> found in the declaration of the argument `ctb' of method `<init>'.
>     private OutputStreamWriter(OutputStream out, CharToByteConverter ctb)
>  {
>                                                  ^
> ./java/io/OutputStreamWriter.java:154: Type 
> `ConversionBufferFullException' not found in the declaration of the local 
> variable `x'.
> 		catch (ConversionBufferFullException x) {
>                        ^
> ./java/io/OutputStreamWriter.java:201: Type 
> `ConversionBufferFullException' not found in the declaration of the local 
> variable `x'.
> 		catch (ConversionBufferFullException x) {
>                        ^
> ./java/io/ObjectInputStream.java:21: Class or interface 
> `sun.io.ObjectInputStreamDelegate' not found in import.
> import sun.io.ObjectInputStreamDelegate; // RMI over IIOP hook.
>        ^
> ./java/io/ObjectStreamClass.java:17: Class or interface `sun.misc.Ref' 
> not found in import.
> import sun.misc.Ref;
>        ^
> dom/mybank/core/AbstractRequest.java:127: warning: Discouraged form of 
> returned type specification.
> <<file too short - unexpected EOF>>
>                                           ^
> ./java/io/ObjectOutputStream.java:19: Class or interface 
> `sun.io.ObjectOutputStreamDelegate' not found in import.
> import sun.io.ObjectOutputStreamDelegate; // RMI over IIOP hook.
>        ^
> dom/mybank/core/AbstractRequest.java:409: warning: Discouraged form of 
> returned type specification.
> <<file too short - unexpected EOF>>
>                                                        ^
> ./java/lang/ThreadGroup.java:18: Class or interface `sun.misc.VM' not 
> found in import.
> import sun.misc.VM;
>        ^
> ./java/io/ObjectStreamClass.java:853: Superclass `sun.misc.Ref' of class 
> `java.io.ObjectStreamClassEntry' not found.
> class ObjectStreamClassEntry extends sun.misc.Ref {
>                                      ^
> ./java/lang/String.java:19: Class or interface 
> `sun.io.ByteToCharConverter' not found in import.
> import sun.io.ByteToCharConverter;
>        ^
> ./java/lang/String.java:254: Type `ByteToCharConverter' not found in the 
> declaration of the argument `btc' of method `<init>'.
> 		   ByteToCharConverter btc)
>                    ^
> ./java/lang/String.java:487: Type `CharToByteConverter' not found in the 
> declaration of the argument `ctb' of method `getBytes'.
>     private byte[] getBytes(CharToByteConverter ctb) {
>                             ^
> dom/mybank/core/AbstractRequest.java:0: confused by earlier errors, 
> bailing out
> make: *** [dom/mybank/core/AbstractRequest.o] Error 1

In the unlikely event it matters, here's the file (one of many) that 
failed:
> package dom.mybank.core;
> import java.io.Serializable;
> import java.lang.Object;
> abstract class AbstractRequest implements java.io.Serializable
> {
> 	static final long serialVersionUID = -3204784377990580854L;
> 	AbstractRequest() { }
> }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]