problems with class paths

Posted on 2006-05-20
Last Modified: 2013-11-23
I am trying to set up the claths paths on my windows xp machine. I go to environment variables and make new user variable.
I then write in the variable name:   classpath and in variable value:   .;C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar

I want to be able to compile files primarily off my a: drive but would like to compile them off any where on the machine.

Currently if I write:     a:\> javac   , I just get 'javac' not recognised as an internal batch command etc..

I have read other similar question on ee, but I think the answsers given where to older versions and they said that with java 1.3 some bits were not needed. It has confused me a little, so In would like to know an up-to-date answer..
Question by:jdav3579
    LVL 86

    Expert Comment

    You need to set the PATH variable, not the classpath. Add the in directory of the jdk to it
    LVL 86

    Expert Comment


    Author Comment

    I'm sorry, I dont quite understand what that means:

    Is like this:
    variable name:   PATH and in variable value:  

    I then have to add in=bin somewhere in this piece do I?:   .;C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar

    LVL 86

    Accepted Solution

    Add the following to PATH

    ;C:\Program Files\Java\jdk1.5.0_06\bin

    Author Comment

    Fantastic mate!!
    I think it must have been an old tutorial I was reading, the version it was using was 1.4....

    LVL 86

    Expert Comment


    Classpath is something you don't necessarily need but should come to understand:

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    canBalance challenge 34 57
    maxMirror challenge 10 70
    triangle challenge 4 41
    base64 decode encode 12 54
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now