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.
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.
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.
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
where jdk is the directory name of your JDK installtion
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.
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.
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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL