Find the answer to your Linux question:
Results 1 to 5 of 5
i m facing stranz problem. java programs are compiling but while i m trying to execute them no output is resulted every time. my jdk version is jdk1.6.0_11 on fedora ...
  1. #1
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    171

    [SOLVED] runnig java programs

    i m facing stranz problem.
    java programs are compiling but while i m trying to execute them no output is resulted every time.
    my jdk version is jdk1.6.0_11 on fedora 10.
    i m trying compiling and running by konsole/terminal.
    what is wrong with this?
    please help!!!
    Sorry, it was unintentional.
    You should have told me at least once and i could have fix it.
    thanks for reminding me.

  2. #2
    Just Joined!
    Join Date
    Apr 2006
    Location
    UK, Devon
    Posts
    40
    Can you please post what your typing in to the prompt.

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    96
    Maybe you have no output statements in your code? (;

  4. #4
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    171
    Quote Originally Posted by Luke_C View Post
    Can you please post what your typing in to the prompt.
    for example i wrote nw.java as:
    class nw{
    public static void main(String args[]){
    System.out.println("HI");
    }
    }

    then i compiled it as javac nw.java
    it gives no error.
    then i tried : java nw
    it gives nothing. neither error nor output.
    Sorry, it was unintentional.
    You should have told me at least once and i could have fix it.
    thanks for reminding me.

  5. #5
    Linux Newbie grishi_111's Avatar
    Join Date
    Oct 2007
    Location
    Jafarpur Sitharra(U.P.)/New Delhi, India
    Posts
    171
    Quote Originally Posted by grishi_111 View Post
    for example i wrote nw.java as:
    class nw{
    public static void main(String args[]){
    System.out.println("HI");
    }
    }

    then i compiled it as javac nw.java
    it gives no error.
    then i tried : java nw
    it gives nothing. neither error nor output.
    i fixed it by using full path to javac and java e.g.
    /usr/java/jdkxxx/javac nw.java
    and
    /usr/java/jdkxxx/java nw
    Sorry, it was unintentional.
    You should have told me at least once and i could have fix it.
    thanks for reminding me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...