Solved

deprecated warning

Posted on 2001-06-18
9
465 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Expert Comment

by:theoyaung
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Expert Comment

by:kaspak
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now