Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Procedure to Execute Programs in Fedora Linux

 
Badri Prasad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I have installed fedora linux version 6, but i donno how to execute the Java programs in Fedora Linux. If anyone has the procedure for the same pls give me the link or some useful details regarding the same.

Thnx
Badri
SCJP - 1.5 preparation
[ September 30, 2007: Message edited by: Badri Prasad ]
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same way you execute a java program on every other platform:
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11944
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Badri,

We would love to help you, but you need to show some effort, and tell the details.

Right now:
  • we can't tell if you have been given an executable jar file to run, a compiled class file, or whether you are working with the source code.
  • we can't tell if you are comfortable with working from a shell (and if so, are you using the bash shell) or are you looking at the X Windows System (probably running the Gnome window manager since that is default on Fedora Core 6) and trying to work out what to do next
  • we can't work out whether you are using the JDK that comes with Fedora Core 6 (GCJ - roughly equal to Sun's JDK version 1.4) or whether you have installed a later version (hopefully from Sun's site).
  • we can't tell whether you are familiar with editing files on Linux systems - are you happy to use vim or emacs (or their X11 equivalents) or kedit or kate or ....?

  • Do you see why it is so hard to even start helping you?

    As an aside, some people look at these sorts of issues and try and claim that Linux is a failure. Not so. The first point would still have to be established before we could begin. The 2nd and last points become slightly easier under Microsoft Windows since they do not give you options - you will use cmd.exe, and notepad.exe is the only consistent editor we can talk about. And since Microsoft do not distribute anything like a Java compiler, you will have had to have downloaded from Sun - whereas Linux tries to give you a Java compiler from the moment you complete your installation, even if it is not the official release.

    Regards, Andrew
     
    Badri Prasad
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Andrew, Thank you very much for your reply,

    First of all for your first question, I m trying to execute compiled class file and i m working in vim and i know very little about linux file system cos i m very new to that OS, do i have to install JDK in Linux cos when i gave command Javac HelloWolrd.java it could not compile the same. I think this post is clear to help me, if this is not clear pls tel me i will try to give you more details on the same.

    Thnx
    Badri
     
    Joe Ess
    Bartender
    Posts: 9319
    10
    Linux Mac OS X Windows
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Badri Prasad:
    when i gave command Javac HelloWolrd.java it could not compile the same.


    It sounds like you need to install Java. Have a look at the Fedora Java FAQ.
    [ October 03, 2007: Message edited by: Joe Ess ]
     
    Ulf Dittmer
    Rancher
    Posts: 42968
    73
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Badri Prasad:
    when i gave command Javac HelloWolrd.java it could not compile the same.


    What does this mean? Were there any error messages? If so, which ones?
     
    Christophe Verré
    Sheriff
    Posts: 14691
    16
    Eclipse IDE Ubuntu VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yes, we need the error messages first. And I'm not sure that there's a java compiler starting with a capital letter.
     
    Mark Spritzler
    ranger
    Sheriff
    Posts: 17278
    6
    IntelliJ IDE Mac Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Christophe Verre:
    Yes, we need the error messages first. And I'm not sure that there's a java compiler starting with a capital letter.


    Well that works on Windows.

    Badri, unfortunately it won't work on Linux. In Linux everything is case-sensitive. So it does need to be exact, and in Java that Java compiler is all lower case. Actually in most cases, probably all, all commands will be all lower case on Linux, it is kind of the standard there.

    Good Luck, I admire your courage to jump into using a new OS.

    Mark
     
    Jesper de Jong
    Java Cowboy
    Saloon Keeper
    Posts: 15485
    43
    Android IntelliJ IDE Java Scala Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Assuming you have the JDK installed on your machine, have a look at this:

    The Java Tutorial - "Hello World!" for Solaris OS and Linux

    Follow the tutorial step by step and be careful to do it exactly as shown there (i.e. don't type "Javac" when it should be "javac", for example).
     
    Badri Prasad
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you very much all you people for helping me to learn java on Linux.
    Please give me more details which will help me to learn early.
    It is very interesting to work in Linux cos its new to me and i m very
    eager to learn new things. I did not know that i have to install JDK in
    Linux, now i will install and try to execute small programs in it.

    Thank you once again all of you
    Badri
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic