DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: can'tm compile

  1. #1
    Join Date
    Oct 2002

    can'tm compile

    i can't compile the HelloWorldApp.java code from the java sun site. the path for javac on my win 2k prof system is c:\j2sdk1.4.4_01\bin. i try this path in the user as well as the system environment variables but javac is not recognized when i enter java>javac HelloworldApp.java. need your help.

  2. #2
    Join Date
    Sep 2002
    Hi, isup

    Have you tried navigating there manually ? By this I mean open up a command prompt / DOS prompt.. whatever the equivalent in 2K is. Once there, change directories to the c:\j2sdk1.4.4_01\bin location and then javac HelloWorldApp.java

    Let us know how this goes.

    Joyous Monkey

  3. #3
    Join Date
    Oct 2002

    can't compile

    that step gives the same error - 'javac' is not recognized as an internal or external command, operable program or batch file - . i used the javac path name sucessfully once when i chose new and wrote it in the systems environment path. however i lost the previous path information which was rather long. i think i should have chosen edit. subsequently my isp icon and all associated isp data disappeared from my machine. i was unable to connect to the internet. used Roxio Goback to recover the system environment path name and isp data. simply adding the javac path to the systems environment path doesn't work either.

  4. #4
    Join Date
    Aug 2002
    the problem could be due to two reasons:

    1) javac is not in your class path - edit autoexec.bat (in Win95/98) and make sure that the location of javac directory is there in one of the lines. If this is done then by typing "javac" on command prompt (from any directory) you will get help for using this command. If this works then move on.

    2) jdk is unable to find the files of the code you have written even when you type "javac" from the same directory (how is jdk supposed to know that files are in the same directory). So in your class path add a "." and ";" before theclass path.

    In short the line in autoexe.bat file will lool something like this
    CLASSPATH= .;c:\jdk\lib\tools.jar

    where jdk is the directory name of your JDK installtion


  5. #5
    Join Date
    Oct 2002

    using windows 2000 pro

    thanks for your help. i am using windows 2000 professional which does not have autoexec.bat. there is an AUTOEXEC.NT file. can i modify AUTOEXEC.NT and what program should i use to open it, eg. microsoft word, excel, internet explorer etc.? a list of programs appear after i search for the file and click open.

  6. #6
    Join Date
    Sep 2002
    Hi, again

    You should be able to open the autoexec file using a plain text utility. Humble old NOTEPAD is the best bet. Obviously, before editing it, make a backup.

    What happens if you type

    java -version (enter)

    at the root ( C: prompt ) ?

    If you still have no joy after all this, you may want to consider uninstalling the JDK and then reinstalling it.

    Joyous Monkey

  7. #7
    Join Date
    Oct 2002

    Talking can compile and run!

    sorry for my long absence but i was having problems installing a printer to my pc. however that has been fixed. i can now compile and run. .;c:\j2sdk1.4.1_01\bin was added to the system environment variable path. thanks for you help and interest.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.