Turn on thread page Beta

i want to compile java programs from the dos box?? watch

Announcements
    • Thread Starter
    Offline

    3
    ReputationRep:
    how can i do this? im completely lost with java, SDK, EE, JRE, its all really annoying me right now. i just want to be able to compile my .java files from the command line like you can in the labs.

    thanks,
    Offline

    14
    ReputationRep:
    Install the Java SDK from the Sun site. Make sure your PATH environment variable includes where java.exe and javac.exe are installed to. Then you should be able to compile from the command line.
    • Thread Starter
    Offline

    3
    ReputationRep:
    (Original post by Psyk)
    Install the Java SDK from the Sun site. Make sure your PATH environment variable includes where java.exe and javac.exe are installed to. Then you should be able to compile from the command line.
    i have installed SDK EE. whats the environment variable and where can i find it?
    Offline

    1
    ReputationRep:
    What OS are you using?
    • Thread Starter
    Offline

    3
    ReputationRep:
    XP.

    when i type 'java -version' it says

    (Original post by CMD)
    D:\Documents and Settings\Dean.4E75BD9346DF4E5>ja va -version
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
    however when i use the 'javac' command it says;
    (Original post by javac)
    S:\APP Practical B\t1>javac SimpleThread.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    Offline

    1
    ReputationRep:
    You need to right click My Computer and go to Properties. Click on the Advanced tab and click Environment Variables. In the bottom half there will be System Variables. Scroll to the one called "Path" and click edit on that. Go to the value textbox and add the path to the bin folder in your JDK installation folder. For example, mine is this:

    C:\Program Files\Java\jdk1.6.0_12\bin;

    Don't forget the semi-colon on the end, and don't delete anything that's already there. Click OK and you should be able to use the javac command etc.
    • Thread Starter
    Offline

    3
    ReputationRep:
    (Original post by AugustWestie)
    You need to right click My Computer and go to Properties. Click on the Advanced tab and click Environment Variables. In the bottom half there will be System Variables. Scroll to the one called "Path" and click edit on that. Go to the value textbox and add the path to the bin folder in your JDK installation folder. For example, mine is this:

    C:\Program Files\Java\jdk1.6.0_12\bin;

    Don't forget the semi-colon on the end, and don't delete anything that's already there. Click OK and you should be able to use the javac command etc.
    are are a legend mate i would never have figured that out! much appreciated its all working now
    Offline

    1
    ReputationRep:
    No prob.
 
 
 
Poll
Were you ever put in isolation at school?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.