| | |
problem with compiling
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2009
Posts: 16
Reputation:
Solved Threads: 0
hi friends
when i am running my programe on cmd in C:\Programe File\jdk1.6.0_14\bin I got the message that file name.java uses or overrides a deprecated API . Recompile with -Xlint: deprecation for details . what it meant how it will solved . please help me
thanks in advance for reply
shashikant
when i am running my programe on cmd in C:\Programe File\jdk1.6.0_14\bin I got the message that file name.java uses or overrides a deprecated API . Recompile with -Xlint: deprecation for details . what it meant how it will solved . please help me
thanks in advance for reply
shashikant
shashikant
0
#2 Nov 5th, 2009
by, instead of calling
javac <filename> calling javac -Xlint:deprecation <filename> and letting the compiler tell you exactly what it doesn't like. The message, however, is only a warning. Last edited by masijade; Nov 5th, 2009 at 4:59 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Sep 2009
Posts: 26
Reputation:
Solved Threads: 2
0
#3 Nov 5th, 2009
Deprecation warnings are telling you that the API you're calling has been marked as unsuitable for long-term use. Generally, the documentation for that class will tell you what should be used instead--consult the Javadoc for the object you're using in your program and it should shed some light on the matter.
•
•
Join Date: Sep 2009
Posts: 18
Reputation:
Solved Threads: 0
0
#4 Nov 6th, 2009
It is just a warning !
http://www.j2ee.me/j2se/1.5.0/docs/a...eprecated.html
use "javac filename.java Xlint:deprecation"
It will tell you which method is deprecated
Search the Java Docs for the better equivalent
http://www.j2ee.me/j2se/1.5.0/docs/a...eprecated.html
use "javac filename.java Xlint:deprecation"
It will tell you which method is deprecated
Search the Java Docs for the better equivalent
1
#6 Nov 9th, 2009
•
•
•
•
it is a common problem when dealing with applet so you need to create an applet to view the output or if not an applet program look at the compillation options given to you after compilling
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Sep 2009
Posts: 16
Reputation:
Solved Threads: 0
0
#7 Nov 16th, 2009
•
•
•
•
It is just a warning !
http://www.j2ee.me/j2se/1.5.0/docs/a...eprecated.html
use "javac filename.java Xlint:deprecation"
It will tell you which method is deprecated
Search the Java Docs for the better equivalent
I am beginer in java and I am working on a project so that i am unable to solve the deprecation warning. so pls help how that warning will be solved.
pls help me.
thanks for ur reply
shashikant
0
#9 Nov 16th, 2009
And have you used that option to javac, yet? Using an option on a command line is not a Java issue, and if you do not know how to provide options and arguments to a command on the command line then you need to learn that, first. And, as said, that is not a Java issue.
If it is that you are using an IDE and don't know how to set the options in the IDE, well, read the user documentation for your IDE and find out how.
Once you have the respective issue corrected, then do that. If you still don't understand what's wrong, then post here what that compilation attempt gave you and we will help you further.
P.S. PM's asking for help are summarily ignored.
Edit: If you simply want the warning to "go away" then use the "@Deprecated" annotation (Google that) or use the "-nowarn" or "-Xlint:none" options to javac.
If it is that you are using an IDE and don't know how to set the options in the IDE, well, read the user documentation for your IDE and find out how.
Once you have the respective issue corrected, then do that. If you still don't understand what's wrong, then post here what that compilation attempt gave you and we will help you further.
P.S. PM's asking for help are summarily ignored.
Edit: If you simply want the warning to "go away" then use the "@Deprecated" annotation (Google that) or use the "-nowarn" or "-Xlint:none" options to javac.
Last edited by masijade; Nov 16th, 2009 at 6:49 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Sep 2009
Posts: 16
Reputation:
Solved Threads: 0
•
•
•
•
It is just a warning !
http://www.j2ee.me/j2se/1.5.0/docs/a...eprecated.html
use "javac filename.java Xlint:deprecation"
It will tell you which method is deprecated
Search the Java Docs for the better equivalent
i have gone through ur given reply but as a beginer in java i cant able to solve the problem of deprecation. so pls help me how the problem will be solved.
thanks
shashikant
shashikant
![]() |
Similar Threads
- Generics problem when compiling code (C#)
- Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Serv (C++)
- Problem in compiling simple program!!! (C++)
- Beginner problem compiling with javac (Java)
- Problem compiling with Dev-C++ (C++)
- C++ linking problem (C++)
- Problem Compiling Program (Java)
- Another "cannot find symbol" compiling error (Java)
Other Threads in the Java Forum
- Previous Thread: java.exe doesn't work
- Next Thread: Dam..average
Views: 802 | Replies: 26
| Thread Tools | Search this Thread |
Tag cloud for Java
android api apple applet application arguments array arrays automation bidirectional binary birt bluetooth calculator chat class classes client code columns component database designadrawingapplicationusingjavajslider draw eclipse editor error errors event exception expand file fractal game givemetehcodez graphics gui guidancer helpwithhomework html ide image inetaddress input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jme jmf jni jpanel julia link linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie number object oracle plazmic print problem program programming project recursion scanner screen server set signing size smart sms smsspam socket sort sql string subclass support swing test threads time transfer tree webservices windows






