Ask Your Question

packages for compiling java & c++ programs

asked 2012-11-14 10:05:23 -0500

Renu gravatar image

updated 2013-06-04 22:51:16 -0500

What packages should be installed on Fedora 17 to compile c++ & java programs?? Tried out vim,gcc but only "c" programs are getting compiled... explain about installing,compiling & executing also.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-11-14 10:35:56 -0500

hhlp gravatar image

updated 2013-03-28 06:05:40 -0500

All you need is the package "gcc and gcc-c++"

sudo yum install gcc gcc-c++

for C programs :

To compile C program first.c, and create an executable file called first, enter:

gcc first.c -o first


cc first.c -o first

To execute program first, enter:


for C++ programs :

And then compile using:

g++ [sourcefile.cpp] -o [progname]

execute :


P.D : more info man gcc and GCC, the GNU Compiler Collection

for JAVA program :

OpenJDK and project IcedTea

Fedora has shipped OpenJDK as default JRE implementation since Fedora release 9. It's based on Sun Microsystem's JavaOne open source release and complemented by Red Hat's IcedTea project that implements the missing third party components that Sun could not release under free License.

if you would like JAVA open just :

 sudo yum install java-1.7.0-openjdk-devel

if you would like ORACLE follow this post #2282

To confirm that the Java interpreter is installed, type the command in boldface below and check that the results match:

java -version

compiling :


man javac

execute :

java HelloWorld

NOTE : if you need a IDE GEANY is great but there are more please read this post #1545

edit flag offensive delete link more

answered 2012-11-19 14:56:48 -0500

wholevin gravatar image

sudo yum groupinstall "Development Tools"

That should get you everything you'll need to develop Java, C++, and whatever other language you pick.

edit flag offensive delete link more

answered 2012-12-12 08:41:44 -0500

its saying some other app is holding yum lock! ??? how can i solve this problem? or its normal? and how much time does it take normally?

edit flag offensive delete link more


this happen because you have another yum or PackageKit instances, close then an execute yum or packagekit again.

hhlp gravatar imagehhlp ( 2012-12-12 10:03:23 -0500 )edit

It must be a comment or a new question.

Jomoos gravatar imageJomoos ( 2012-12-12 10:09:48 -0500 )edit

Question Tools


Asked: 2012-11-14 10:05:23 -0500

Seen: 13,096 times

Last updated: Jun 04 '13