[Lazarus] Installing lazarus on Windows, horror story goes on

Andreas Schneider aksdb at gmx.de
Thu Jul 29 16:58:11 CEST 2010


On Thu, 29 Jul 2010 11:24:46 -0300, Marcos Douglas <md at delfire.net> wrote:

>> I think I must learn GUI programming with Java and port the code. Java

is

>> already installed on those machines and runs for sure.

>> The other choise is to boot Windows XP on my mini-laptop, install

Lazarus

>> there and build the program, then send the binary to my friend. He

lives

>> 250

>> km away and I don't drive there now.

> 

> If you don't have Java installed then broke. If you use another

> version of Java then broke. If you change anything.. broke!

> Java works, this is true. But he has the same (even worst) problems.

> 

>> Write once, compile everywhere. Right yeah...

>>

> 

> This is more true (and more realistic) than Java: write and run

everywhere.



Indeed. I wrote several extensions for OpenOffice.org in Java and for some

time even tried to use the GUI Widgets from Java (Swing). It worked fine on

both of my development machines and I assumed, it would just run everywhere

else too (where Java is available). Then a Mac user came by and told me

that my extension crashed his installation. After getting my hands on a Mac

I was able to see the problem: the Java VM that is shipped with MacOS is a

bit different from the others ... some packages are different and the rules

for opening new dialogs/frames were completely different. In the end I had

to either handle Mac completely different or rewrite the whole extension to

use more calls to the OpenOffice.org API instead of relying on it's native

packages. I have no idea how I would have handled that if it wasn't just an

extension/plugin but should have been a full standalone app. Either way it

taught me that I definitely can't trust Java to "just run everywhere".

Without testing and if necessary platform specific workarounds/fixes, it

just doesn't/can't work, if the apps are complex enough. In the end I'm

still faster writing apps in Lazarus and compiling them for the target

platform than I am writing them in Java and searching workaround for all

those corner cases.



Just my two cents.



Best Regards,

Andreas.




More information about the Lazarus mailing list