Community
Participate
Working Groups
Many people tried to find out how to display the deprecated error messages in the task console. I also tried it and after 30 minutes of changing all possible properties i gave up. It seems that it is a bug in eclipse and not a configuration problem. Version: Integration Build 200020109
Could you explain precisely what you are trying to achieve, and what you obtain ? Reproduceable steps would be welcome. Deprecation warnings are issued by the Java builder when compiling, following the standard rules (issue warning for external references only).
Still waiting for a reproduceable test case...
@ http://www.silents.com/eclipsebugs/deprecated/ you find 3 screenshots which will show you my eclipse settings. Basically the problem is that even if i specify in the java compiler properties dialog that i want to see an error if a deprecated method is used, the compiler doesn't print approprirate deprecated error messages. The filter configuration is configured with default settings. I hope this helps you to get a more clear picture of about the problem i'm talkin about.
Thanks for the test case, but with build 20020125, and following test case (see below), I cannot reproduce your problem. [public class Y extends Thread { private Thread myThread; void foo(){ if (myThread != null){ myThread.stop(); } } }] I am getting a deprecation warning on the line 'myThread.stop()' (or a deprecation error if promoting these problems as errors). Can you check that method Thread.stop() is really deprecated in your rt.jar ? I am using 1.3.1 rt.jar as well, and it works fine. Accessorily, could you try to define another class with an explicitly deprecated method, and then call this method from your test case to see if this one would work ? If yes, then there must be something wrong with the rt.jar you are using (we have seen defects in some classfile attributes over time in them).
I just installed the 1.3.1_02 java vm, previously i had 1.3.1_00 installed. After reinstalling the java vm i copied the eclipse 20020125 stable release over the 20020109 intergration build. This was not a very good idea as the JRE_LIB env. variable is not rebuild automatically. So i installed the 20020125 integration build to a new directory and created a fresh new project. I then added the DeprecatedThread class and compiled and wondered why i still don't see the deprecated warning messages. Again you find the screenshots of my eclipse settings @http://www.silents.com/eclipsebugs/deprecated_jre131_02/ I don't have the time to test all possible java vm with all possible eclipse builds so i hope you can send me more informations about another possible cause of the problem.
I just tried to use a java 1.2.2 vm (1.2.2_001) and it WORKS!!! It seems that it might be a problem when using a jvm 1.3.1 on windows 2000. Did you also test the behaviour on Windows 2000? Maybe it works on Windows NT4? I would like to get to know more infos about the cause of the problem... Summary: Eclipse 20020109 (integration) and 20020125 (stable) releases doesn't work together with a JVM 1.3.1 on Windows 2000. With JVM 1.2.2 it works perfectly without chaning any settings in eclipse.
I couldn't believe that the jdk 1.3.1 doesn't display deprecated error messages in conjunction with eclipse, so i tried to start eclipse with different -vm parameters. If found out that D:\apps\eclipse\eclipse.exe -vm c:\jdk1.3.1_02\bin\javaw.exe - works D:\apps\eclipse\eclipse.exe -vm c:\jdk1.3.1_02\bin\java.exe - works D:\apps\eclipse\eclipse.exe -vm c:\jdk1.3.1_02\jre\bin\java.exe - works It seems that it has something to do with the PATH environment variable at least under Windows 2000. As i recognized the J2SE 1.3.1 installer modified the PATH variable and added c:\jdk1.3.1_02\jre\bin\hotspot to it. I hope this helps you...
Ok, we need to clarify things a little more. First, Eclipse does not run javac, we have our own compiler implementation. Now when you use the -vm command line argument, you specify which VM is being used to run Eclipse. If you never defined any JRE setting (see Workbench>Preferences>Java>Installed JREs), Eclipse will pick by default the one you are running the IDE on. The JRE setting is used to bind your project to a given Java runtime, and find the proper rt.jar. Thus when compiling your sources, we will diagnose deprecation warning based on the information encoded inside the target rt.jar. The fact that when switching JRE settings it starts working clearly identifies this issue as being a JRE bug. It seems that the default JRE you were using is bogus and is missing some of the classfile attributes which should be there. In brief, Eclipse hasn't a bug there, the JDK1.3 you are using is wrong. Note: you might want to force to run on a better 1.3.1 with the -vm option (remember that Eclipse requires a 1.3 or better JRE level). Then inside your Eclipse workspace, you probably want to define 'Installed JREs' so that you can better control which JRE is used to compile/run against. Ok to close ?
A detailed investigation showed that it isn't a eclipse bug, but a java 1.3.1 jre problem. The solution proposed works for me so the issue is closed.