Posted by opinali
on November 26, 2004 at 11:21 AM PST
One major problem for J2SE as an open-source project is that it's too difficult to build. This is a huge barrier to entry for most developers interested in really experimenting with the sources.
The Linux build requires a very specific version of Linux (Redhat Enterprise Advanced Server 2.1 update 2). I haven't yet tried to build this release, but my experience with 1.4.x releases is that the build will fail with thousands of cryptic compiler/linker errors if I use anything but the exact distribution recommended by Sun.
The Windows build is much worse. It requires the MKS Toolkit, which is a commercial product (some time ago I tried to use Cygwin, without success). It requires an old version of Microsoft VisualC++ (6.0sp2) which is also commercial; I have this one, but I'd hate having to install that old junk just for compiling the J2SE. Ideally, the build should work with current VC++ versions, including the now VisualC++ Toolkit (which is freely available and contains the latest and greatest MSVC/C++ command-line compilers) and the latest Windows SDKs.
In addition to disencouraging many developers to go beyond browsing the sources, the restrictions of the Windows build should affect the performance of the JVMs too. Microsoft's VC++ compilers received very important optimization improvements in the last few releases. The JVM and its native libs contain a good amount of C code, so you could give a "free lunch" boost to all Java apps in some areas (loading time, overhead of JIT&GC, APIs depending on native libs) by simply exploiting the best compilers available. BTW, the Intel C/C++ compiler is highly compatible with MS, supports Linux too, and it was even better than MS last time I checked, so it would be great to support that compiler too.
We know that the J2SE is a huge project, full of low-level code, and C/C++ compilers are famous for screwing up code under strong optimization. Validating the project for new compilers must have some cost in additional testing and maybe fixing some compiler-dependant code. But it should be worth the effort.
As for the other issues, in my dreams the J2SE project would have an autoconf script like any regular open-source C/C++ project... for my personal taste, this is more urgent than moving to a "real open source" license ;-) but if that's too difficult, even a big, I'd be happy if I could manually configure the build for my environment, even with an ugly and complex (but well-documented) set of scripts or configuration files.