Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: how do I run a java program using javaw.exe?

  1. #11
    Join Date
    Jul 2004
    Posts
    264
    Rep Power
    0

    Default Re:how do I run a java program using javaw.exe?

    and another thing you need to know ... even if you were to compile that code correctly .... javaw.exe will not run it .... what you are writing is a console application ..... javaw was built only for GUI applications ..... java.exe is what you should be using in this case ..... javaw was put there to get wid of the console , while running a gui app ..... since in most cases the console is mainly used as a debugging feature .... or just to give screen dumps when checking the state of the program .... javaw.exe will just ignore the print statements you have there without giving any errors .... and for IDE 's i rate JCreator as the one to get

  2. #12
    Join Date
    Feb 2003
    Posts
    3,184
    Rep Power
    0

    Default Re:how do I run a java program using javaw.exe?

    thanx for your help guys. I'll get at it as soon I regain enough will power.

  3. #13
    Join Date
    Jul 2003
    Posts
    33
    Rep Power
    0

    Default Re:how do I run a java program using javaw.exe?

    Owen,

    U do NOT need to have ur program/code in the same dir as the java.exe/javaw.exe; ???

    After the Java SDK is setup what you should do is add the /bin directory of the setup to your PATH environment variable on your OS {Window/Linux} ...

    On Linux you can edit /etc/profile or ~/.bashrc to add the dir to the PATH variable;

    On windows you can {WinKey}+{Pause/Break}->Advance->Environment Variables and edit the PATH variable to include the bin dir of the SDK.

    eg. My setup is at c:\j2sdk_1_50\ so i add c:\j2sdk_1_50\ bin to my path;

    then from any dir you can just type
    >javac myfile.java // to compile
    >java myfile // to run .. don't add '.class' to the command

    Java can be difficult to setup but it is fun none the less // if you like serious OOP. ;D

Posting Permissions

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