LINUX programming

Moderators: ITA
Number of threads: 1331
Number of posts: 2912

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
compiling java on linux system Posted by ravishankarr on 23 Jan 2006 at 2:47 AM
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.
Report
Re: compiling java on linux system Posted by akalexi312 on 2 Feb 2006 at 3:12 AM
Hello Dear,

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.
:



Report
Re: compiling java on linux system Posted by human on 14 Feb 2006 at 12:14 AM
: 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.
:

The same javac and java commands should work as used in jdk.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.