Java Forum / General / January 2006
javac: how to get the FULL errors/warnings list?
Miguel Farah - 29 Dec 2005 13:49 GMT I was recently appointed to fix a big source code repository [6000+ Java files], which -due to poor discipline by the previous manager- is heavily inconsistent. Its biggest problem is that the source code, taken *as is* from our versioning system manager, won't compile. My problem here is that compiling with javac/ant yields 100 errors displayed on screen, and any further output is cut off. I need to see ALL the error messages at once, but I haven't been able to find the javac option to display unlimited error messages.
This ALSO happens with the warnings, which are cut out at 200, but I know there are many more (mostly "this class/method has been deprecated" messages).
I've tried searching for command-line options in both javac and ant's online documentations, but haven't found what I need.
I'm using Sun's JVM 1.4.2 and ant 1.5.2 (I know, they're both a bit old, but that's what I'm stuck with).
Thanks in advance.
Andrew McDonagh - 29 Dec 2005 13:56 GMT > I was recently appointed to fix a big source code repository [6000+ > Java [quoted text clipped - 20 lines] > > Thanks in advance. There's very little use in seeing every compile error, thats why they don't show them.
Fixing one of them, and this usually will fix several others. So start with the first error and fix that, then re-compile and tackle the next error, rinse & repeat....
I'd imagine that if the source won't compile, then its likely that the documentation to go along with the design is also out of date, so it would be worth looking for a tool that can reverse engineer the code into UML.
Borland's Together application can do this for Java very well, someone else may know something similar thats free or cheaper...
Miguel Farah - 29 Dec 2005 14:24 GMT >There's very little use in seeing every compile error, thats why they >don't show them. I need that to be able to write up an "estimated" time to fix the problem. More so with the warnings, as the project to erase the dependency warnings has a budget and therefore requires knowing how much time will it take.
>Fixing one of them, and this usually will fix several others. So start >with the first error and fix that, then re-compile and tackle the next >error, rinse & repeat.... It's what I'm doing, but I'd love to be able how much more do I need to fix. :-/
Mike Schilling - 30 Dec 2005 05:47 GMT > >There's very little use in seeing every compile error, thats why they >>don't show them. [quoted text clipped - 4 lines] > warnings has a budget and therefore requires knowing how much time > will it take. You don't need more bad news, I'm sure, but ...
There's no reason to expect that code which doesn't compile will actually work well once the compilation bugs are fixed, and I'm guessing that a regime that couldn't keep the code at least building wasn't good about enforcing testing procedures. So if it were me, I'd estimate how long it would take to code everything from scratch, and if feeling exceptionally optimistic, cut that in half.
Miguel Farah - 30 Dec 2005 15:39 GMT >You don't need more bad news, I'm sure, but ... In an ODD way might be good, as this means job security for an entire year or more. ;-)
>There's no reason to expect that code which doesn't compile will actually >work well once the compilation bugs are fixed, and I'm guessing that a >regime that couldn't keep the code at least building wasn't good about >enforcing testing procedures. So if it were me, I'd estimate how long it >would take to code everything from scratch, and if feeling exceptionally >optimistic, cut that in half. I'm extremely tempted to do so... but that's a huge project in itself.
On the other hand...
Luke Meyers - 30 Dec 2005 07:39 GMT > >There's very little use in seeing every compile error, thats why they > >don't show them. > > I need that to be able to write up an "estimated" time to fix the > problem. My organization is as metrics-hungry as any (I work for a certain large North American aerospace company which does defense contracting), so I can certainly appreciate the pressure one feels to produce such numbers. However, the nature of compilation errors is such that it would be wholly inaccurate, and even unethical IMHO, to take the current number of compilation errors and represent it as a metric of how much work is left to be done.
I'm sure what I'm about to say is basically obvious to anyone who's spent several hours burning down compilation errors, but I don't know how else to put it. When your compiler encounters a syntax error, it may do one of several things:
1. Isolate the error as a local problem and proceed to the next section of code. 2. Get horribly confused and give up, not even looking at the rest of the code. 3. Turn what a human would consider a "single error" into a godawful long cascade of errors, which goes away as soon as you "kill the head vampire." 4. Seg fault (well, it happens...).
Since any of these may be the case for any given error, it's basically absurd to take the error count at any given time and pretend it means something. It doesn't. If you're not convinced, try (once you figure out how to display all of them -- as someone else mentioned, Eclipse handles this great) plotting a little histogram of errors over time. If it doesn't fluctuate wildly... well, it will fluctuate wildly, so I'll just optimize out what I was going to say (hooray for branch prediction in everyday speech).
> More so with the warnings, as the project to erase the dependency > warnings has a budget and therefore requires knowing how much time > will it take. Warnings are another story. They are generally independent, isolated, deterministic, and easy for the compiler to recover from. That said, there is still something of a multiplicity problem. For example, I recently did some work converting a codebase from 1.4 to 1.5, which mostly entailed getting rid of generics warnings. The common case is that you get a single container which should be generic, and generate a warning everywhere it's used. But you fix the definition of the container (one line of code), and the whole mess goes away in one swell foop.
So, a "total warnings" metric may be pretty fuzzy, and not a great predictor of the actual amount of work required. But it can at least be counted upon to be more or less monotonically decreasing, which ought to be enough to satisfy your bosses.
Of course, you could try explaining all this to them, but I imagine they'll just tell you to go pound SLOC.
Luke
Roedy Green - 30 Dec 2005 09:24 GMT >My organization is as metrics-hungry as any (I work for a certain large >North American aerospace company which does defense contracting How the hell do you sleep at night. You are like a bullet maker for the Mafia. Your planes kill kids. You are even worse than the bastards who build nukes. There is at least a chance their products won't be used.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 30 Dec 2005 09:30 GMT >>My organization is as metrics-hungry as any (I work for a certain large >>North American aerospace company which does defense contracting [quoted text clipped - 3 lines] > bastards who build nukes. There is at least a chance their products > won't be used. Off topic roedy
Roedy Green - 30 Dec 2005 10:26 GMT On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>> How the hell do you sleep at night. You are like a bullet maker for >> the Mafia. Your planes kill kids. You are even worse than the >> bastards who build nukes. There is at least a chance their products >> won't be used. > >Off topic roedy It is on topic in that he might be puzzled why I stop helping him, and I hope everyone else does to. If you aid him, there is blood on your hands too.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 30 Dec 2005 11:28 GMT > On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 10 lines] > I hope everyone else does to. If you aid him, there is blood on your > hands too. Luke wasn't the OP, Miguel was so Luke doesn't need your 'help'...
Therefore, yes you are way off topic.
Roedy Green - 30 Dec 2005 15:00 GMT On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>Luke wasn't the OP, Miguel was so Luke doesn't need your 'help'... After this initial discussion as to why, Luke is going into the filter file so I won't accidentally help him on any matter. I request everyone do likewise until he gets a proper job. Others don't have to be so public about it as I am being.
You simply must not co-operate with that sort of wrongdoing. If you do, you become part of it.
.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Miguel Farah - 30 Dec 2005 15:35 GMT I work at a BANK. You know, those evil bastards that retain people's money and then "have system-wide problems" when they want their coins & bills back.
Excuse me for wanting to do things properly, you troll. :-P
Roedy Green - 30 Dec 2005 18:15 GMT On 30 Dec 2005 07:35:56 -0800, "Miguel Farah" <miguel.farah@gmail.com> wrote, quoted or indirectly quoted someone who said :
>I work at a BANK. You know, those evil bastards >that retain people's money and then "have system-wide >problems" when they want their coins & bills back. > >Excuse me for wanting to do things properly, you troll. :-P I am not plonking you. I am plonking those who use the help they are given here for military purposes.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Mike Schilling - 30 Dec 2005 18:25 GMT >I work at a BANK. You know, those evil bastards > that retain people's money and then "have system-wide > problems" when they want their coins & bills back. A bank? Well, I'll let you slide this time, but it's lucky for you that you don't work for an insurance company.
Andrew McDonagh - 30 Dec 2005 15:44 GMT > On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 11 lines] > > .. I request you stop using this ng for your political belief delivery, lets keep to java eh?
(besides, you paying taxes funds those companies so indirectly.....sod it can't be arsed to argue with a moron like you....
Andrew 'Even plants have feelings' ...yep, some nice and crunchy, some not so, a bit like meat - yum!
Nigel Wade - 04 Jan 2006 11:30 GMT > On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 11 lines] > > . I will co-operate with whomsoever I like.
I don't need you to instruct me on who I ma allowed to help, and who I am not. Someone who works for the defence of their country is much more deserving of help than is someone who thinks they have the right to dictate to others what they should think.
 Signature Nigel Wade, System Administrator, Space Plasma Physics Group, University of Leicester, Leicester, LE1 7RH, UK E-mail : nmw@ion.le.ac.uk Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Roedy Green - 04 Jan 2006 16:33 GMT >I will co-operate with whomsoever I like. > >I don't need you to instruct me on who I ma allowed to help, and who I am not. >Someone who works for the defence of their country is much more deserving of >help than is someone who thinks they have the right to dictate to others what >they should thin I am dismayed at the reaction. Some of your are like the guy who fixed the gas chambers at Auschwitz who refused to even consider the effect his work was having on the big picture. It is your responsibility to think every once in a while about whether what you are doing is right, even something as seemingly innocuous as writing Java code.
I can't stop you from contributing to murder, but of course I won't help you do it either. I want to encourage others to behave in a similar morally responsible way as I do, even if it makes people uncomfortable. I don't feel the slightest guilt about making people who kill, even indirectly, feel uncomfortable. I have no power over you other than persuasion and refusing to help you, so your "dictating" crack is off the mark. The American Defence industry has had little to do with defense since WWII. It is about squeezing other countries to get them to hand over resources to American corporations. Americans consume about 1/3 of the world pie with less than 5% of the population.. If it were about defense, there would be no need for the stupendous expenditures, more than the rest of the world put together.
I can get really nasty to those who kill directly, e.g. Americans solders who brag to me about killing children. See http://mindprod.com/feedback/peace.html
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 04 Jan 2006 16:43 GMT > On Wed, 04 Jan 2006 11:30:57 +0000, Nigel Wade <nmw@ion.le.ac.uk> snipped usual dribble...
> I can get really nasty to those who kill directly, Is it just me, or did anyone else imagine Roedy standing at this pc, writing that with his hands on his hips and sticking his tongue out?
Roedy, this is a Java NG....nothing else
Roedy Green - 04 Jan 2006 18:14 GMT On Wed, 04 Jan 2006 16:43:07 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>Is it just me, or did anyone else imagine Roedy standing at this pc, >writing that with his hands on his hips and sticking his tongue out? > >Roedy, this is a Java NG....nothing else That was an underhanded trick to post to comp.lang.java.programmer but set the follow up quietly to elsewhere so no one here would hear rebuttals.
I am not asking for a discussion of military contractors, the Iraq war, President Bush, American military history.... If you want to discuss that stuff try the politics part of my website and blogs or other newsgroups.
I AM talking about Java -- how you can inadvertently use Java to kill people. I am talking about YOU and what you do at your keyboard. Whom do you use your skills for? Whom do you help on the newsgroups?
It is just as relevant as talking about bug control in Java systems to control automated rail.
You are flatly refusing to even think for 5 seconds about the big picture. It makes you uncomfortable so you weasel away from it.
I am having great trouble controlling my contempt for you.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 04 Jan 2006 18:23 GMT > I am having great trouble controlling my contempt for you.
:-p Stefan Schulz - 04 Jan 2006 19:36 GMT > On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 9 lines] > You simply must not co-operate with that sort of wrongdoing. If you > do, you become part of it. Roedy, continue to spew propaganda at this rate, and i might be forced to add you to my filters. I would not like to do so, since you are a regular, and frequently have interesting ideas, but i don't want this NG to become to playground for discussions about anyones particular views. (Not that i do not agree with you on quite a few things...)
If you are interested in answering me, please use a private mail, we do not need to distribute this to the entire world.
Roedy Green - 30 Dec 2005 15:08 GMT On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>Luke wasn't the OP, Miguel was so Luke doesn't need your 'help'... This is irrelevant. I was not explaining why I was withholding information Luke would find interesting about Miguel's problem, but why for the foreseeable future would ignore all of Luke's requests for information (or his responses for that matter).
Your objections are based more on your politics than your concern for protocol.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 30 Dec 2005 15:38 GMT > On Fri, 30 Dec 2005 11:28:02 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 9 lines] > Your objections are based more on your politics than your concern for > protocol. bollocks! I haven't stated my politics - God you are full of sh.t
Roedy Green - 30 Dec 2005 18:16 GMT On Fri, 30 Dec 2005 15:38:48 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>bollocks! I haven't stated my politics - God you are full of sh.t Well you certainly don't like mine and you have made no secret of it.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Chris Smith - 30 Dec 2005 23:52 GMT > Well you certainly don't like mine and you have made no secret of it. Roedy, I have a lot of respect for you and your politics. I turn down job offers in military industries. I do pay my taxes (U.S.), but I also spend thousands of hours and dollars per year trying to change how the government spends them.
Nevertheless, I also agree that you're off-topic.
Obviously you may disagree, and no one here can stop you from posting... but don't assume that any objections are coming from extremist conservative war-mongerers.
 Signature www.designacourse.com The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
Hiran Chaudhuri - 31 Dec 2005 00:00 GMT > It is on topic in that he might be puzzled why I stop helping him, and > I hope everyone else does to. If you aid him, there is blood on your > hands too. I hope you and your company never get involved into software projects that are directly or indirectly involved in military actions. Which is quite unlikely to happen......
Hiran
Roedy Green - 04 Jan 2006 00:26 GMT On Sat, 31 Dec 2005 01:00:45 +0100, "Hiran Chaudhuri" <Hiran.Chaudhuri@softwareag.com> wrote, quoted or indirectly quoted someone who said :
>I hope you and your company never get involved into software projects that >are directly or indirectly involved in military actions. Which is quite >unlikely to happen... Ever since about 1985 I have marked every piece of software I have written "for non military use only". I have turned down all requests from military contractors. If you co-operate with them, your have as much blood on your hands as any soldier.
In once incident Rockwell's representative said "f.ck you, we are going to use your software anyway". It was a bug-free rewrite of MS DOS restore, used at the time by the FAA for distributing software.
It could restore files backed up under any version of DOS to any version of DOS. This was before the Internet and people shared files on floppy.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 30 Dec 2005 10:40 GMT On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>> How the hell do you sleep at night. You are like a bullet maker for >> the Mafia. Your planes kill kids. You are even worse than the >> bastards who build nukes. There is at least a chance their products >> won't be used. > >Off topic roedy Come now. If it is on topic whether students who leave their assignments to the last second deserve aid, surely it is on topic to discus whether those who work for defence contractors deserve aid.
I find the latter many times less deserving of aid. The student hurts only himself. The defence employee hurts others. Students con you into doing their assignments for them. US defence workers are conning you into a criminal enterprise, namely the Iraq war declared illegal by the UN. Granted the Iraq war itself is off topic. I have a blog if you want to sound off on it or try the newsgroup alt.bush.politics. see http://mindprod.com/politics/iraq.html.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Andrew McDonagh - 30 Dec 2005 11:30 GMT > On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh > <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted [quoted text clipped - 10 lines] > assignments to the last second deserve aid, surely it is on topic to > discus whether those who work for defence contractors deserve aid. Like I said in the last message....
Perhaps you would better 'help' people here by actually reading the posts and then flaming the right people.
Luke wasn't the OP asking for help, he was giving a reply to Miguel.
> I find the latter many times less deserving of aid. The student hurts > only himself. The defence employee hurts others. Students con you into [quoted text clipped - 3 lines] > you want to sound off on it or try the newsgroup alt.bush.politics. > see http://mindprod.com/politics/iraq.html. What you find deserving or not is of no interest to anyone here but yourself.
Roedy Green - 30 Dec 2005 15:01 GMT On Fri, 30 Dec 2005 11:30:05 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>What you find deserving or not is of no interest to anyone here but >yourself. I think Luke would be curious why I would plonk him. He deserves to know why.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 30 Dec 2005 15:24 GMT On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>Off topic roedy This is this first time you or anyone else has claimed a plonk was off topic.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 30 Dec 2005 16:24 GMT On Fri, 30 Dec 2005 09:30:33 +0000, Andrew McDonagh <news@andrewcdonagh.f2s.com> wrote, quoted or indirectly quoted someone who said :
>Off topic roedy You never complained when someone pointed out that information sought would be used primarily by spammers.
Surely pointing out that it will be used for murder is in the same domain.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Patrick May - 30 Dec 2005 17:22 GMT > You never complained when someone pointed out that information > sought would be used primarily by spammers. > > Surely pointing out that it will be used for murder is in the same > domain. By the same token, then, pointing out that those large aerospace companies that work on DoD contracts make a major contribution to the defense of the United States is equally on topic for this group.
I don't post as frequently as Mr. Green, but I do welcome Mr. Meyers' participation on those grounds.
Sincerely,
Patrick
------------------------------------------------------------------------ S P Engineering, Inc. | The experts in large scale distributed OO | systems design and implementation. pjm@spe.com | (C++, Java, Common Lisp, Jini, CORBA, UML)
Roedy Green - 30 Dec 2005 18:18 GMT > By the same token, then, pointing out that those large aerospace >companies that work on DoD contracts make a major contribution to the >defense of the United States is equally on topic for this group. That was true, but no longer. The USA spends more on "defence" that every other country put together. The Pentagon has not been about defence since WWII.
In any case, I am plonking military contractors and I invite you to also. I won't plonk you for refusing.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Luc The Perverse - 30 Dec 2005 23:57 GMT >>>My organization is as metrics-hungry as any (I work for a certain large >>>North American aerospace company which does defense contracting [quoted text clipped - 5 lines] > > Off topic roedy Oh chill out.
The world has enough crusaders, SUV drivers, and heroin addicts already.
Your reply stating that his post is off topic is also by the same definition off topic.
-- LTP
:) Roedy Green - 04 Jan 2006 00:28 GMT On Fri, 30 Dec 2005 16:57:15 -0700, "Luc The Perverse" <sll_noSpamlicious_z_XXX_m@cc.usu.edu> wrote, quoted or indirectly quoted someone who said :
>Oh chill out. You are just sticking your head in the sand. You can kill by helping the wrong people.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 04 Jan 2006 03:00 GMT On Wed, 04 Jan 2006 00:28:06 GMT, Roedy Green <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or indirectly quoted someone who said :
> You are just sticking your head in the sand. You can kill by >helping the wrong people. You think that is an exaggeration? Consider the worst case: that these military contractors end up blowing up the entire world and killing everyone . That is 6.5 billion people killed. If you contribute even 0.000000015% of that effort, that is equivalent to killing one person.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Miguel Farah - 30 Dec 2005 15:45 GMT >My organization is as metrics-hungry as any (I work for a certain large >North American aerospace company which does defense contracting), so I [quoted text clipped - 5 lines] >vampire." > 4. Seg fault (well, it happens...). Investigating further, I managed to "determine" the number of errors, by removing individual source files, one by one, until the number of errors dropped below 100 (28, to be precise). Almost all of them are due to missing libraries (which eases the burden considerably), and only around 50 are due to true syntax errors.
Now, I'm on the same process with the warnings...
jason - 30 Dec 2005 00:11 GMT Eclipse has an option in the "Problems" to allow you to see every error and warning. You can also sort and filter all the problems.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|