Solved

deprecated warning

Posted on 2001-06-18
9
469 Views
Last Modified: 2010-03-31
i have a deprecated warning. Which tells me that my applet uses a deprecated API and to recomplie with deprecation for details. Can someone tell me what i should do. I have a thread in my program that doesn't work. I am using jdk 1.1.8 and netscape 6. Any help would be much appreciated.

Thanks VENETA
0
Comment
Question by:Veneta
9 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 50 total points
ID: 6204364
The deprecation warning has nothing to do with your thread not working. It is merely alerting you to the fact that you are using methods that will work now, but may not exist in a future release of Java.
0
 
LVL 92

Expert Comment

by:objects
ID: 6204396
If you use the -deprecation option when compiling it'll tell you what the problem is, and if you the check the javadoc for the deprecated method it will explain the preferred replacement method.
0
 
LVL 3

Expert Comment

by:shyamkumarreddy
ID: 6204772
Hi Veneta


Deprecation means the a method in the current version of java is replaced with a good one. And it is no longer available from the current version. But still can be used to run the program. But in the next or future version may this method be removed. So better as said by object recompile with the -deprecation and it will tell where deprecated methods are there just go the javadoc and refer to the class which says deprecated and know more abt it
and change ur code :)

Regarding your thread if u can post your code we could help u to solve it


Cheers
shyam
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Expert Comment

by:theoyaung
ID: 6206694
Here's what Sun has to say about deprecated if you want to hear the authority =)

from http://java.sun.com/products/jdk/1.1/docs/guide/misc/deprecation/deprecation.html#what

===What "Deprecated" means===

You may have heard the term, "self-deprecating humor". That is humor that minimizes your importance. A deprecated class or method is like that. It is no longer important. It is so unimportant, in fact, that it should no longer be used at all, as it will probably cease to exist in the future.

The need for deprecation comes about because, as a class evolves, its API changes. Methods are renamed for consistency. New and better methods are added. Attributes change. But making such changes introduces a problem. You need to keep the old API around until people make the transition to the new one, but you don't want developers to continue programming to the old API.

The ability to mark a class or method as "deprecated" solves the problem. Existing classes that use the old API continue to work, but the compiler can issue a warning when it finds references to deprecated items. Meanwhile, the API comments can warn the user against using the deprecated item and tell the user how to avoid doing so. The @deprecated tag achieves these goals.

Note: "Deprecated" and "depreciated" are not same. "Depreciated" is a financial term that means "lowered value". Although the meanings are similar, classes and methods are deprecated, not depreciated.
0
 

Expert Comment

by:kaspak
ID: 6209394
hi

The deprecation warning has nothing to do with your thread not working. It is merely alerting you to
the fact that you are using methods that will work now, but may not exist in a future release of Java.

kaspak
0
 
LVL 92

Expert Comment

by:objects
ID: 6212471
Not necessarily, the methods in Thread are deprecated not only because they may not exist in the future, but also because they are 'unsafe'.
Though you're probably right that their thread problem is something separate.
0
 
LVL 3

Expert Comment

by:shyamkumarreddy
ID: 6213334
Hi Objects
U r correct. But this thread is one of the class which has unsafe methods. which needs to be replaced for safety.

I don't think anyother class has the same think like thread class


Shyam

0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9010004
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[split points between objects,shyamkumarreddy and imladris]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
simple java question 3 55
rhino JavaScript import, load 25 82
servlet requestdispatcher include and forward differences 1 30
pagenation logic how it is working in my code 1 28
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question