• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with javac and appletviewer  RSS feed

Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I had the JDK 1.3.1_01 installed on Win 98 laptop. I, uninstalled, the JDK 1.3.1_01 (along with the same JRE) through control panel-> add/remove programs.
I, then, upgraded Win98 to Windows 2000 Professional and installed the Java 2 SDK 1.4.1_01 from http://java.sun.com/j2se. I, also, installed the Java Runtime Environment (1.4.1_01) onto my Windows 2000 Professional operating system. I, then, went, into Control Panel, System/Advanced/Environment Variables, and created a JAVA_HOME user environmental variable pointing to:
and a PATH user environmental variable, in which, I put:
Now it works for "java" command from the command line, but "appletviewer" and "javac" give the following error:
C:\Java Programs>javac
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
I fixed it by creating a "SET PATH=c:\j2sdk1.4.1_01\bin" in my autoexec.bat, but I am forced to run autoexec.bat, everytime I invoke the command prompt (which is very annoying).
If anyone can help me with this, I would be very grateful.
Sincerely yours,
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Windows Registry is confused.
You can go into Start/Run/Regedit.exe, then go to HKEY_LOCAL_MACHINE/SOFTWARE/Javasoft and there is a JDK and JRE setting in there that can be manipulated. If your JRE has both a 1.3 folder and a 1.4 folder, Look at the JRE level folder and see what the setting is for CurrentVersion. Just edit it to an acceptable version.
PS: If you are using a bat file to set the path on the fly (which I do quite often instead of messing with the windows registry) put the thing in a file other than autoexec.bat. I have a p13.bat file that sets my path and classpath to 1.3, and a p14.bat that sets it to 1.4. Open a Dos session and execute the appropriate one on the fly.
Did you just should on me? You should read this tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!