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]
Other format: [Raw text]

args[0] problem


Hello,

I have just compiled and installed succesfully gcc/gcj 3.2
on a solaris 2.8 box.
gcj works fine but 
the first argument of command line arguments in java-main functions
is prefixed a '?',

so 
public class HelloWorld {
     public static void main(String [] args) {
       System.out.println("Hello");   
       System.out.println(args[0]);
       System.out.println(args[1]);
     }
}

compiled with gcj -Wmain --main=HelloWorld -o HelloWorld HelloWorld.java
and launched
  HelloWorld aaa bbb
writes
  Hello
  ?aaa
  bbb
onto the console

Any idea why this is so? (with javac and java it works as expected
thanks a lot
Johannes






-- 
Johannes Heinecke
France Télécom R&D, DMI/GRI/Langues Naturelles
Email: johannes(dot)heinecke(at)francetelecom(dot)com


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