Problem with gcj and gij

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with gcj and gij

Alireza Ghasemi-2
Hello,
I tried to compile a simple Hello,world program with gcj. The code was :
public class Welcome {
 public static void main( String args[] )
     {
     System.out.println( "Welcome to Java Programming!" );
     }
 }
I created Welcome.class with "gcj -C Welcome.java" .then I tried to execute
it with "gij Welcome.class" but I got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Welcome.class
   <<No stacktrace available>>

Can anyone help me run my program?
Thanks.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: Problem with gcj and gij

Gerrit P. Haase-3
Alireza wrote:

> Hello,
> I tried to compile a simple Hello,world program with gcj. The code was :
> public class Welcome {
>  public static void main( String args[] )
>      {
>      System.out.println( "Welcome to Java Programming!" );
>      }
>  }
> I created Welcome.class with "gcj -C Welcome.java" .then I tried to execute
> it with "gij Welcome.class" but I got the following error:
> Exception in thread "main" java.lang.NoClassDefFoundError: Welcome.class
>    <<No stacktrace available>>

> Can anyone help me run my program?
> Thanks.


gij is broken.  You can use java to run the gcj compiled classfiles.


Gerrit
--
=^..^=                                     http://nyckelpiga.de/donate.html



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply | Threaded
Open this post in threaded view
|

Re: Problem with gcj and gij

René Berber-2
In reply to this post by Alireza Ghasemi-2
Alireza Ghasemi wrote:

> I tried to compile a simple Hello,world program with gcj. The code was :
> public class Welcome {
>  public static void main( String args[] )
>      {
>      System.out.println( "Welcome to Java Programming!" );
>      }
>  }
> I created Welcome.class with "gcj -C Welcome.java" .then I tried to execute
> it with "gij Welcome.class" but I got the following error:
----------------------^^^^^^

That's not the way to use gij (or java), do:

gij Welcome

or

java Welcome

(i.e. the class extension is not used)

> Exception in thread "main" java.lang.NoClassDefFoundError: Welcome.class
>    <<No stacktrace available>>
>
> Can anyone help me run my program?

And gij 3.4.4 is broken as Gerrit said, but you probably have another version
because yours seems to be working, otherwise you would have seen:

Segmentation fault (core dumped)

and a "gij.exe.stackdump" file produced.
--
René Berber



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/