This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

After install: HelpWorld (HelloWorld!)



   Hello people,

   What is wrong? This describes my first attempt to compile using gcj after install:



HelloWorld.java

public class HelloWorld {
	public static void main(String[] args) 
	{
		if(args.length == 0 || args.length > 2) 
		{
			System.out.println("Hello World!\n"); 
		}
		else if(args.length == 1) 
		{
			System.out.println(args[0]); 
		}
		else if(args.length == 2) 
		{
			System.out.println(args[0] + " " + args[1]); 
		}
	}
}


  $ gcj --main=HelloWorld -o Hello HelloWorld.java

  
  Looks good, no error message...

  But when a try ./Hello... I receive a lot of strange things:

 $ ./Hello
 Hello World!
 file.encodingP@0 p`P@0
p`P@0missing default encoding gnu.gcj.convert.Output_(8 ( 8  ( 8  mark/reset
not supported` (88 ava.lang.ThreadGroup[name=(8konsolekonsolekonsolekonsolekonsoleko
nsolekonsole couldn't find 8859_1 encode0H`x 8Ph(@Xpr 0Hkonsole`x
8Ph(@Xp0H`x 8Ph(@Xp0H`x 8Ph (@Xp0P
                ( Hp @ذذ :p88/`ЀP@}{(\u@\X\\p\t\r\n# #=0
`konsoleko nsolekonsolekonsole, x[,]:  0@P`p 0@P`p
0@P`p  0@P`p 0@P`p 0@P`p 0@P`p 0@P`p 0
@P`p 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p

etc, etc.


  Why happens this? Thanks again!


  [],

  Ivan


  P.S.: Linux Red Hat 6.0 (Hedwig) 2.2.5-15 #1 on i586

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