Results 1 to 5 of 5

Thread: Running simple java program.....

  1. #1
    Join Date
    Jan 2009
    Posts
    67

    Running simple java program.....

    Hi friends, I want to learn something about Java Programming. I have installed jdk 1.3 in my computer and need help to run a simple java program. Can anyone help me to run this program. I want to learn how to compile java program and how to run it, that's enough. Someone please help me. I am waiting for your reply.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Running simple java program.....

    Hi dude, its very easy and not needed to have much more help. You can do it simply by going to your directory where your java has been installed.Then copy your path of the bin directory and the go to the properties of my computer and select advanced tabbed pane. Click on Environment Variables and in user variables part type "new" and provide variable name as Path which you have copied now. Simply open your computers command prompt and type
    javac <filename.java>
    This will compile you program. Then to run simply type
    java <filename>

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Running simple java program.....

    It is a simple thing. You want to run a simple java program and also you have installed jdk 1.3 . First go to the bin directory of the jdk. Then simply type javac filename.java for compiling it and then run it by typing java filename. This will executes your java program. It will give you output. You can use any book for getting more knowledge. Which book you are currently using? Check that book also, I think in that also you will get these steps.

  4. #4
    Join Date
    Dec 2007
    Posts
    1,599

    Re: Running simple java program.....

    Hi, First save that file with .java extension. Then to compile that program just open your command prompt. type

    "cd\"

    and press enter. Then simply type

    "path=<path of bin directory of jdk 1.3>"

    and press enter. Then go to the the path of your program and go into that directory. Then type

    "javac <filename.java>"

    and press enter. Then again type

    "java <filename>"

    to run you program. Here basically your javac will check whether there is any error in your program code or not. If you have error in program then it will show that error. If you find error simply solve it and then try to run that code.

  5. #5
    Join Date
    Feb 2009
    Posts
    96

    Re: Running simple java program.....

    you should download something like jgrasp to help you since you are starting JAVA.

Similar Threads

  1. How to calculate simple interest in java ?
    By xanix in forum Software Development
    Replies: 7
    Last Post: 08-12-2011, 11:47 PM
  2. Simple Prime Factors Program
    By programgirl in forum Software Development
    Replies: 1
    Last Post: 13-11-2011, 07:46 AM
  3. Implement Simple Database using BST in Java
    By maxmidg412 in forum Software Development
    Replies: 2
    Last Post: 31-07-2011, 03:22 AM
  4. How to develop simple program in ASP.NET 4.0
    By Daniela007 in forum Software Development
    Replies: 5
    Last Post: 20-02-2010, 11:57 PM
  5. Replies: 3
    Last Post: 18-05-2009, 05:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,419,765.77348 seconds with 17 queries