Results 1 to 5 of 5
  1. #1
    O.Ali is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default Cannot Run my ready to program java code on Ubuntu 10.10 i386 desktop

    import java.awt.*;
    import hsa.Console;

    public class test
    {

    static Console c;

    public static void main (String[] args)
    {
    c = new Console ();

    c.print ("YEAH!!! it works");
    }
    }


    this is what i have ... but when i press the run button it says execution finished..

    its suppose to make a console pop up displaying "YEAH!!! it works"

    but it doesn't ... so can anyone help out here .....(ps. i am running Ubuntu 10.10 desktop i386 and i also downloaded Wine too....)

  2. #2
    milovan is offline Senior Member
    Join Date
    Jan 2011
    Location
    Belgrade, Serbia
    Posts
    299
    Rep Power
    4

    Default

    I am not sure for ubuntu, how did you run this code? with open console or from jdk or?

  3. #3
    O.Ali is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default

    yeah .... i ran this code with the hsa Console

    it worked fine back at school (windows xp)

  4. #4
    milovan is offline Senior Member
    Join Date
    Jan 2011
    Location
    Belgrade, Serbia
    Posts
    299
    Rep Power
    4

    Default

    Try to add some Thread.sleep(5000) that pauses execution of your code and gives your code enough time to display a message
    Last edited by milovan; 03-09-2011 at 11:14 PM.

  5. #5
    O.Ali is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default

    Trust me i have tried this and it doesn't work......

    the console doesn't even pop-up for me to see that message

    it does its execution and ends it without the message being displayed

    my code doesn't even contain any errors too.... so it should work..!!!!!!!!!

Similar Threads

  1. Replies: 1
    Last Post: 03-29-2010, 01:07 AM
  2. Replies: 1
    Last Post: 01-13-2010, 05:58 AM
  3. [SOLVED] Ready to Program Java IDE
    By Starr29 in forum New To Java
    Replies: 9
    Last Post: 07-24-2009, 05:21 PM
  4. Ready to Program Java IDE Problem #4
    By Starr29 in forum New To Java
    Replies: 5
    Last Post: 01-06-2009, 03:38 PM
  5. [SOLVED] Ready to Program Java IDE Problem #2
    By Starr29 in forum New To Java
    Replies: 2
    Last Post: 01-03-2009, 01:02 AM

Posting Permissions

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