I'm having trouble getting BlueJ to generate compiler warning messages. I've tried several small programs that I think should have caused warnings to be issued, but I only see the message: "Class compiled - no syntax errors".
Is there a setting somewhere that enables/disables the display of compiler warning messages?
I've been expecting to see the warnings in the same place that the compiler errors are displayed.
> I'm having trouble getting BlueJ to generate compiler warning messages. I've tried several small programs that I think should have caused warnings to be issued, but I only see the message: "Class compiled - no syntax errors".
Hi Joey, could you give an example of one of the programs that you think should give a warning (and explain why it should give a warning / what warning it should give)?
> Is there a setting somewhere that enables/disables the display of compiler warning messages?
In the preferences there is an option to disable the 'raw type' warnings. Any other warnings should be displayed as usual .
> I've been expecting to see the warnings in the same place that the compiler errors are displayed.
> Am I looking in the wrong spot?
Warnings are displayed in a separate dialog, which should appear when the warning is generated.
public class Example
{
public static void main()
{
int a = 5;
a = a; //this should generate a warning similar to the
following: Assignment has no effect (e.g. 'x = x')
}
> > I'm having trouble getting BlueJ to generate compiler warning messages. I've tried several small programs that I think should have caused warnings to be issued, but I only see the message: "Class compiled - no syntax errors".
> Hi Joey, could you give an example of one of the programs that you think should give a warning (and explain why it should give a warning / what warning it should give)?
> > Is there a setting somewhere that enables/disables the display of compiler warning messages?
> In the preferences there is an option to disable the 'raw type' warnings. Any other warnings should be displayed as usual
> .
> > I've been expecting to see the warnings in the same place that the compiler errors are displayed.
> > Am I looking in the wrong spot?
> Warnings are displayed in a separate dialog, which should appear when the warning is generated.
The Eclipse compiler is much more user-friendly than (the standard) javac. I'm pretty sure BlueJ uses the javac provided with a JDK, but it would be cool if you could download the Eclipse compiler and use it instead.
On Tue, Jan 31, 2012 at 1:28 PM, Joey Goertzen <joey.goert...@gmail.com> wrote: > Thanks for the response Davin.
> An example? Sure thing:
> public class Example > { > public static void main() > { > int a = 5; > a = a; //this should generate a warning similar to the > following: Assignment has no effect (e.g. 'x = x') > } > }
> On Jan 30, 3:39 pm, Davin McCall <dav...@bluej.org> wrote: >> On 31/01/2012, at 4:42 AM, Joey Goertzen wrote:
>> > I'm having trouble getting BlueJ to generate compiler warning messages. I've tried several small programs that I think should have caused warnings to be issued, but I only see the message: "Class compiled - no syntax errors".
>> Hi Joey, could you give an example of one of the programs that you think should give a warning (and explain why it should give a warning / what warning it should give)?
>> > Is there a setting somewhere that enables/disables the display of compiler warning messages?
>> In the preferences there is an option to disable the 'raw type' warnings. Any other warnings should be displayed as usual >> .
>> > I've been expecting to see the warnings in the same place that the compiler errors are displayed.
>> > Am I looking in the wrong spot?
>> Warnings are displayed in a separate dialog, which should appear when the warning is generated.
>> Davin
> -- > You received this message because you are subscribed to the Google Groups "BlueJ Discuss" group. > To post to this group, send email to bluej-discuss@googlegroups.com. > To unsubscribe from this group, send email to bluej-discuss+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/bluej-discuss?hl=en.
> The Eclipse compiler is much more user-friendly than (the standard)
> javac. I'm pretty sure BlueJ uses the javac provided with a JDK, but
> it would be cool if you could download the Eclipse compiler and use it
> instead.
> On Tue, Jan 31, 2012 at 1:28 PM, Joey Goertzen <joey.goert...@gmail.com> wrote:
> > Thanks for the response Davin.
> > An example? Sure thing:
> > public class Example
> > {
> > public static void main()
> > {
> > int a = 5;
> > a = a; //this should generate a warning similar to the
> > following: Assignment has no effect (e.g. 'x = x')
> > }
> > }
> > On Jan 30, 3:39 pm, Davin McCall <dav...@bluej.org> wrote:
> >> On 31/01/2012, at 4:42 AM, Joey Goertzen wrote:
> >> > I'm having trouble getting BlueJ to generate compiler warning messages. I've tried several small programs that I think should have caused warnings to be issued, but I only see the message: "Class compiled - no syntax errors".
> >> Hi Joey, could you give an example of one of the programs that you think should give a warning (and explain why it should give a warning / what warning it should give)?
> >> > Is there a setting somewhere that enables/disables the display of compiler warning messages?
> >> In the preferences there is an option to disable the 'raw type' warnings. Any other warnings should be displayed as usual
> >> .
> >> > I've been expecting to see the warnings in the same place that the compiler errors are displayed.
> >> > Am I looking in the wrong spot?
> >> Warnings are displayed in a separate dialog, which should appear when the warning is generated.
> >> Davin
> > --
> > You received this message because you are subscribed to the Google Groups "BlueJ Discuss" group.
> > To post to this group, send email to bluej-discuss@googlegroups.com.
> > To unsubscribe from this group, send email to bluej-discuss+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/bluej-discuss?hl=en.
Joey Goertzen wrote: > Are you saying that BlueJ will only display warnings that are picked > up by the standard compiler?
BlueJ only reports warnings generated by the compiler it is using, so if you could convince it to use another compiler (like the Eclipse Compiler for Java), then you would see whatever warnings that one generated.
It looks unlikely that ECJ would be a drop-in replacement for javac.
You might like to look at the Findbugs plugin for BlueJ. It doesn't look as though it's seen any maintenance love for a while, but if you want warnings about your code, it'll give you plenty!
> Joey Goertzen wrote:
> > Are you saying that BlueJ will only display warnings that are picked
> > up by the standard compiler?
> BlueJ only reports warnings generated by the compiler it is using, so if
> you could convince it to use another compiler (like the Eclipse Compiler
> for Java), then you would see whatever warnings that one generated.
> It looks unlikely that ECJ would be a drop-in replacement for javac.
> You might like to look at the Findbugs plugin for BlueJ. It doesn't look
> as though it's seen any maintenance love for a while, but if you want
> warnings about your code, it'll give you plenty!