Have you installed gcj package for GCC.GCC is a generic front end to compiling High level languages.the core language support instllation should also be done.
do the following things.
1.Make sure that the gcj package is installed on your system. 2.Create a simple hello world code in java. 3.compile it using gcj -C filename.java
It will generate the class file with ame filename.class
4.Run it using gij filename ( note that do not give .class/.java extension while running from gij it will pick itself up)
should solve your problem
: how to compile java program using gcc(or any other command). : I tried gcc -x java filename : but it didn't work : please help me out. :
Comments
Have you installed gcj package for GCC.GCC is a generic front end to compiling High level languages.the core language support instllation should also be done.
do the following things.
1.Make sure that the gcj package is installed on your system.
2.Create a simple hello world code in java.
3.compile it using gcj -C filename.java
It will generate the class file with ame filename.class
4.Run it using gij filename ( note that do not give .class/.java extension while running from gij it will pick itself up)
should solve your problem
: how to compile java program using gcc(or any other command).
: I tried gcc -x java filename
: but it didn't work
: please help me out.
:
: I tried gcc -x java filename
: but it didn't work
: please help me out.
:
The same javac and java commands should work as used in jdk.