• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Procedure to Execute Programs in Fedora Linux

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The same way you execute a java program on every other platform:
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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: 9626
    16
    Mac OS X Linux Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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 ]
     
    Rancher
    Posts: 43081
    77
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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?
     
    Sheriff
    Posts: 14691
    16
    Eclipse IDE VI Editor Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    ranger
    Posts: 17347
    11
    Mac IntelliJ IDE Spring
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
     
    Java Cowboy
    Posts: 16084
    88
    Android Scala IntelliJ IDE Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
     
    What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic