943,965 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1575
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Nov 5th, 2009
0

problem with compiling

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shashikant.v is offline Offline
16 posts
since Sep 2009
Nov 5th, 2009
0
Re: problem with compiling
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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 5th, 2009
0
Re: problem with compiling
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.
Reputation Points: 14
Solved Threads: 2
Light Poster
Cronless is offline Offline
29 posts
since Sep 2009
Nov 6th, 2009
0
Re: problem with compiling
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
topest1 is offline Offline
19 posts
since Sep 2009
Nov 9th, 2009
1
Re: problem with compiling
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
Reputation Points: 11
Solved Threads: 0
Newbie Poster
josephkn is offline Offline
5 posts
since Feb 2009
Nov 9th, 2009
1
Re: problem with compiling
Click to Expand / Collapse  Quote originally posted by josephkn ...
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
Huh? This is purely a compilation issue. What does applet, or not applet, have anything to do with it?
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 16th, 2009
0
Re: problem with compiling
Click to Expand / Collapse  Quote originally posted by topest1 ...
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
dear sir,

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shashikant.v is offline Offline
16 posts
since Sep 2009
Nov 16th, 2009
0

tanks

dear sir
thanks for ur reply
i am beginer in java and working on a project , and i am unable to solve the deprecation warning so pls help me how that warning will be solved. if necessary i can forward my code.
pls give reply as soon as possible.
thanks
shashikant
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shashikant.v is offline Offline
16 posts
since Sep 2009
Nov 16th, 2009
0
Re: problem with compiling
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.
Last edited by masijade; Nov 16th, 2009 at 6:49 am.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Nov 16th, 2009
0

problem while compiling

Click to Expand / Collapse  Quote originally posted by topest1 ...
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
dear sir
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shashikant.v is offline Offline
16 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java.exe doesn't work
Next Thread in Java Forum Timeline: Dam..average





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC