Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2008
    Thanked 0 Times in 0 Posts

    Help with Virtual Directories and the like (Home Premium)

    Can somebody explain to me just what Vista (Home Premium) is doing to screw up my life so thoroughly, and what I can do to work round it?

    Let me explain.

    I have installed the Java Development Kit (the jdk) on both my Desktop machine (VHP) and also (because I was running into problems with the previous, and in spite of the Laptop's being rather tight for space) on my Laptop, which runs XP Pro.

    The jdk is a command-line application suite, the first component of which you come into contact with, after you have written your first Java program using a text editor, is its compiler javac.exe. You invoke this by by adding the directory it is in to your PATH statement, then typing at the command prompt:


    the parameter being the name of your saved Java program.

    This works perfectly under XP Pro, but with Vista it returns the error message "javac is not recognised as a command, an executable file, or a batch file". When I saw this, I checked at the command prompt that my edited PATH statement was still working. It was.

    So I moved the command window to javac's directory and tried again there. Now it was recognised as an executable file. So I copied my file to that directory and tried to compile it there. The compilation appeared to work (i.e. no error messages were generated) but the expected output file - helloworld.class - failed to appear there as it should.

    I searched my hard disk and found it lurking somewhere quite different. javac.exe was in a subfolder of C:Program FilesJava, but the .class output file had been written to a subfolder of C:UsersAlanAppDataLocalVirtualStoreProgram FilesJava.

    Why is this happening?

    What can I do to make Vista accept from a general directory on my machine (C:JavaCode, for example) that javac.exe is an executable file, and to write its output back to C:JavaCode, which is what happens with XP Pro and - as far as I can tell - all other operating systems around the world?

  2. #2
    Join Date
    Mar 2001
    St Louis, Missouri, USA
    Thanked 1,031 Times in 904 Posts

    Re: Help with Virtual Directories and the like (Home Premium)

    Which version of the JDK do you have installed? Are your environment variables setup like those in the post by ESS at this thread How do i set the java classpath(environment variable) in vista. help - (adjusting the paths for your version of java)?


Posting Permissions

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