Skip to main content



      Home
Home » Newcomers » Newcomers » Building Hello world - builded even when problems
Building Hello world - builded even when problems [message #33894] Mon, 14 March 2005 08:07 Go to next message
Eclipse UserFriend
Hi,

I have simple Hello World java application and Ant makefile that packages it
into jar. file. The java file contains intentional syntactic bug. When I
select main menu, Project, Build Project, the Console window says "BULD
SUCCESSFUL" (In fact the build process generates .class file, so Ant just
includes it into jar). The Problems windows contains list of bugs.

How can I stop Eclipse from creating .class file from buggy .java file when
the file cannot be compiled??

BTW, why Eclipse doesn't automatically open/put forward the Problems window?
How can I check if the build was successful without investigating?

thanks, Jan

PS: I have Eclipse 3.1M5a. I am new to Eclipse and Java, comming from
C++/VS.NET IDE world.
Re: Building Hello world - builded even when problems [message #35382 is a reply to message #33894] Wed, 16 March 2005 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

is this question unclear? Let me say it in another words. When .java file
contains bugs, it is still compiled into .class file. How java can compile
something uncompilable?

Jan

"Jan Bares" <herkule9s@yahoo.com> wrote in message
news:d142aa$cvh$1@www.eclipse.org...
> Hi,
>
> I have simple Hello World java application and Ant makefile that packages
it
> into jar. file. The java file contains intentional syntactic bug. When I
> select main menu, Project, Build Project, the Console window says "BULD
> SUCCESSFUL" (In fact the build process generates .class file, so Ant just
> includes it into jar). The Problems windows contains list of bugs.
>
> How can I stop Eclipse from creating .class file from buggy .java file
when
> the file cannot be compiled??
>
> BTW, why Eclipse doesn't automatically open/put forward the Problems
window?
> How can I check if the build was successful without investigating?
>
> thanks, Jan
>
> PS: I have Eclipse 3.1M5a. I am new to Eclipse and Java, comming from
> C++/VS.NET IDE world.
>
>
Re: Building Hello world - builded even when problems [message #35899 is a reply to message #35382] Wed, 16 March 2005 14:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jaredburns.no.spam.acm.org

I'm not a compiler expert, but I *think* that if you have a compilation
error in a method, the compiler will just create as many correct
bytecodes as it can and then it inserts an exception throw.

This allows you to still execute code that has compilation errors if
you're so inclined. If you're running in Debug mode, the debugger will
end up suspending at the compilation error when the exception is thrown.
If you're VM supports hot code replace, you can then fix the error on
the fly.

Personally, I associate this mindset (developing code in the debugger)
as very "Smalltalky".

- Jared

Jan Bares wrote:
> Hi,
>
> is this question unclear? Let me say it in another words. When .java file
> contains bugs, it is still compiled into .class file. How java can compile
> something uncompilable?
>
> Jan
>
> "Jan Bares" <herkule9s@yahoo.com> wrote in message
> news:d142aa$cvh$1@www.eclipse.org...
>
>>Hi,
>>
>>I have simple Hello World java application and Ant makefile that packages
>
> it
>
>>into jar. file. The java file contains intentional syntactic bug. When I
>>select main menu, Project, Build Project, the Console window says "BULD
>>SUCCESSFUL" (In fact the build process generates .class file, so Ant just
>>includes it into jar). The Problems windows contains list of bugs.
>>
>>How can I stop Eclipse from creating .class file from buggy .java file
>
> when
>
>>the file cannot be compiled??
>>
>>BTW, why Eclipse doesn't automatically open/put forward the Problems
>
> window?
>
>>How can I check if the build was successful without investigating?
>>
>>thanks, Jan
>>
>>PS: I have Eclipse 3.1M5a. I am new to Eclipse and Java, comming from
>>C++/VS.NET IDE world.
>>
>>
>
>
>
Re: Building Hello world - builded even when problems [message #36459 is a reply to message #35899] Thu, 17 March 2005 02:57 Go to previous message
Eclipse UserFriend
Hi Jared, tahnks for your answer,

your reasoning sounds logical, but what I can do to stop this behaviour? I
want to produce the .class only if the source compiles without errors. How
can I do that?

Jan

> I'm not a compiler expert, but I *think* that if you have a compilation
> error in a method, the compiler will just create as many correct
> bytecodes as it can and then it inserts an exception throw.
>
> This allows you to still execute code that has compilation errors if
> you're so inclined. If you're running in Debug mode, the debugger will
> end up suspending at the compilation error when the exception is thrown.
> If you're VM supports hot code replace, you can then fix the error on
> the fly.
>
> Personally, I associate this mindset (developing code in the debugger)
> as very "Smalltalky".
Previous Topic:ECLIPSE can't start
Next Topic:how to install on Fedora Core 3?
Goto Forum:
  


Current Time: Fri Jun 06 05:35:32 EDT 2025

Powered by FUDForum. Page generated in 0.07546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top