Trying to help Michelle with a bug that popped up out of nowhere. JDK1.3 was up and running, had compiled a number of times. All of a sudden, with no changes to anything that we know of, compiler won't even compile "HelloWorld". Error returned is:
It appears the compiler can't find some basic classes. I went over PATH and CLASSPATH environment variables with a fine-toothed comb. Obviously, the compiler is running, since it gives an error. I uninstalled the JDK and the JVM and reinstalled them twice. I did notice that while uninstalled, there are still a lot of keys in the registry with the word 'java' in them. Finally, I tried doing 'cd c:\jdk1.3\lib' from the DOS prompt, and running javac from within the 'lib' folder. It worked! But even adding c:\jdk1.3\lib to the PATH and CLASSPATH statements won't help. You actually have to run javac from within the 'lib' folder. If I had to guess, I'd say it might be some leftover hoodoo in the registry, but what? Tried to find a Sun page that might shed some light, but this appears to be too fundamental for their forum. Any ideas? System is Pentium III with 128MB ram, W98.
hopefully it is -- public static void main( String args ) and not -- public static void Main( String args ) like you wrote.
I would think so since you said it worked when you cd'd to the lib subdirectory. Does the same symptom happen with every java application compiled on that computer? What about running them?
As far as the java references left over, I think some of these are remnants of when MS was still including java stuff in their programs. I have some folders under C:\windows\java\ named classes, packages, packages\data, and trustlib
And you restarted the computer each time you changed the autoexec.bat PATH and CLASSPATH settings, right?
[This message has been edited by Marilyn deQueiroz (edited December 20, 2000).]
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Sorry for the "main vs. Main" typo. The file was fine, and did compile on another set. Other files all behave the same way -- will compile from the ...\lib folder, otherwise will not compile. The workstation is over at my office, so I'll look for those Windows folders tomorrow. And yes, I did restart between loads and unloads. I'm pretty sure it's a registry key or some other startup parameter, but I have no idea how to determine which one or where.
OK, here's an update. I went through the most detailed un-/re-install I could think of:
Uninstalled JDK 1.3
Turned off all Java in IE (since remaining registry entries were all for MS)
Turned off all Java in Netscape Communicator
Held down shift key during reboot to minimize the number of startup dlls that might load
Result: no change. Will compile from within c:\jdk1.3\lib, but will not compile from anywhere else. I'm out of ideas. Marilyn, is there a chance you could (please!) copy these messages to any/all forum strings where you think I might get some help. (None of them looks right to me for this problem.) Here's a little more info: Actual source is Verbose compiler response is Suggestions warmly welcomed.
JC's second rule: It's hard to see things under our noses. You were close enough, Jim. She had save a snippet of code in the source folder saved as String.java. Many thanks for taking the time to respond. PS. If anyone needs help installing the JDK, I've gotten pretty good at it.