copile java 1.5 code

Tim Oliver Wagner lists@wagner-www.de
Wed Jan 26 14:13:00 GMT 2005


Hello,
I need to compile a java program. This one is written with java 1.5. It does 
not work to compile the program correct.
I wrote a little program to solve my compile problems, but it still doesn't 
work. I hope someone can help me. Or is it just at the moment not possible to 
compile java 1.5 code?
The little senseless program is append to this mail.
tia
Oli
ps:
I used the comands:
tow@linux:~/benny> javac *.java
tow@linux:~/benny> gcj -g --main=Test -o Test Test.class Test2.class
Test2.java: In class `Test2':
Test2.java: In method `Test2.toString()':
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: cannot find file for class java.lang.StringBuilder
Test2.java:10: error: class 'java.lang.StringBuilder' has no method named 
'<init>' matching signature '()V'
Test2.java:10: confused by earlier errors, bailing out
tow@linux:~/benny> ls -lh
insgesamt 16K
-rw-r--r-- 1 tow users 543 2005年01月26日 15:01 Test2.class
-rw------- 1 tow users 166 2005年01月26日 15:00 Test2.java
-rw-r--r-- 1 tow users 558 2005年01月26日 15:01 Test.class
-rw------- 1 tow users 341 2005年01月26日 15:00 Test.java
tow@linux:~/benny>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test2.java
Type: text/x-java
Size: 166 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20050126/f44116a9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.java
Type: text/x-java
Size: 613 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20050126/f44116a9/attachment-0001.bin>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /