how to run a java file using command prompt?

guys plz tell me the answer...

Replies

  • Anoop Kumar
    Anoop Kumar
    see this:
    #-Link-Snipped-#
  • nareshkumar6539
    nareshkumar6539
    First you need to compile the java program by using the following command
    javac filename
    for executing below command is used
    java classname
    if u r java file name Demo.java and classname is Demo
    for compiling javac Demo.java
    for executing java Demo
    Note: before that you need to set class path
  • kamba giri
    kamba giri
    first of all you need to set class path in environment variables
    1.goto my computer-> system properties -> advanced system settings -> environment variables.
    2. in the environment variables menu in the first box you need to set the path of the java i.e., jdk path
    ex:- .;C:\Program Files (x86)\Java\jdk1.6.0\bin;
    and then okk..
    3. now you can compile and execute the java program as mentioned by nareshkumar..

You are reading an archived discussion.

Related Posts

Kingdom tower is under construction at Jeddah, Saudi Arabia. The tower will be 1000 meters high, pushing Burj Khalifa to spot #2 (828 meters). The construction of the tower has...
Here is a new device that you can buy for your dog. It is called Go-Go Dog Pals. It is a remote controlled pet toy designed to be chased by...
Abeno Harukas is Japans' proposed tallest structure that will shoot 300 meters above the ground level. The structure is currently under construction and is expected to complete in March 2014....
Stumbled upon a blog that did an analysis of the prices offered on books by Flipkart vs.HomeShop18, it looks like Flipkart's now charing way more to the customers. Is it...
A twitter user has released the photos of Olympic edition of Samsung's mega phone - Galaxy Note. The phone features a union jack back cover and the phone looks a...