[openbeos] Re: Java

  • From: Bryan Varner <bryan@xxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 13 Nov 2006 18:20:51 -0500

Wow. Where to start.

1.) Correct, but it's getting there.

2.) True, the kernel's lack of POSIX correctness on R5's protect_area made the 1.4 port (which is still running on a machine in my home) unstable. There are potential hacks, but they'd be very ugly to even try to implement.

3.) Ding!

Yes, I'm still willing (just not able at the moment -- time is very limited for my busy life right now through January) to help with this. In fact, I'm downright excited!

But for right now, we have to look at what's available to port, and it isn't much. Sure, the VM is open, but the platform class libraries, all the classes that make up the java API -- they're still not released. All we have is the javac compiler and the VM. This is enough to add language features, but not enough to port to a new OS. Until the platform libraries are opened (supposed to happen in the first half of 2007) there's really not a lot to do.

The other thing is, Java (like the hotspot vm and javac) requires a working java to compile. We managed to bootstrap the 1.4 build with open tools and a custom javah written in C. I'm haven't looked at the open tools recently, and I'm not sure if they support all the language features added since 1.4 (like all the goodies from 1.5 and JSE6) that we'll need in order to build the GPL'ed code.

The other thing that I have to look into (which I am) is weather or not the code that's been written for beunited can be used in this GPL version. I am not a lawyer, I do not know the agreement between beunited and Sun, and I will decline to speculate on that at this time. I'll leave it up to the beunited folks to figure this one out.

If we can, then it may need to be a progressive merge where we do a partial port of 1.5 and _then_ the current GPL'ed code. Thanks to the whole "java needs java" chicken-and-egg thing.

As for starting right now, it's pretty useless, as you won't even be able to execute javac without a working class library -- we have basic parts of this from the 1.4.2 port. My suggestion to developers is:

Continue working on _Haiku_. Get it to the point that it's self hosting, stable, and ready for something this enormous. I will investigate the state of weather or not the beunited code sitting on my hard disk is encumbered. If it's not, then come January or early Feb I will be starting on this. If anyone is interested, contact me in early January (after the 6th -- I'll be on a honeymoon until then) and I'll be happy to give you a status report and try to coordinate work efforts.

Judging from the quick browse of the source that I did today of the GPL'ed SVN -- there will be a lot of work to get HotSpot going again, but the build system is all the same layout.

The biggest things that were blocking us from finishing previously were the BeOS signal and protect_area functions. Haiku devs, if you can make those work -- then this will be a lot easier. But for now, that -- Haiku itself -- should be the focus. Platform compatibility libraries, dev language support, etc. can come later. First, we need a stable native environment.

Regards,
-Bryan



On Nov 13, 2006, at 5:30 PM, Karl vom Dorff wrote:

With this announcment: http://www.desktoplinux.com/news/ NS3337915997.html

It would seem it might be beneficial to start organizing a Java porting project/team? Even if it's just organizing and coordinating developers.

I say this because I spoke with a couple of developers about the stalled Java port by Beunited when there was a bounty for a Java port at Haikubounties. Besides the politics and paperwork with Sun, there were three main obstacles they (Bryan Varner & Simon Gauvin) claimed towards porting Java to Haiku.

1) Haiku is not self-serving

2) BeOS is closed source and there were some memory management issues in the OS that made finishing the port difficult if not impossible.

3) Java was not opened.

It seems now #3 is addressed, and #2, well Haiku is open and those problems can be addressed, and #1, is being worked on.

Here's some interesting points from Bryan:

"BeOS R5 (and I'm guessing Zeta too) have problems with the way their memory protection mechanisms work (they aren't really posix compliant) that make it virtually impossible to implement the hotspot virtual machine properly. I have a workaround from another developer sitting in my in box, complete with sample code that _may_ solve the problem. If this work, I'm guessing that 75% of our existing bugs will disappear."

"There's essentially three major things left to do with the port. Get the virtual machine to be truly stable, finish the Java2D implementation, and the Sound / Media framework. The virtual machine has never been a pillar of stability on BeOS -- which is why I quit working on the Java2D implementation. There's no point in putting more time into making frameworks / features work if the core execution engine isn't going to run well."

"But the single biggest problem at this point is simply this:
We were porting java 1.4.2, which is now at least 2 years obsolete. Sun doesn't want to assign any resources to help us finish that port, they want us to migrate to 1.6... which would be a monumental task -- one that we should probably take, but a huge task no less."

"There's a few system calls missing in Haiku (last I tried, about two months ago) that kept the current java builds from running on Haiku. It was -really- close to working last I checked. The issue is that I don't think Haiku is stable enough to be fully self- hosting yet. Once that's solved (matter of time) getting java compiled will be an easy piece of cake, there's only about 3 libraries (libdl, realpath, cpio, iirc) that needed to be installed on R5 to get things going. "

Most importantly, Bryan's willingness to work on the project:

"We (Andrew and I) wrote 2 AWT implementations. We've gotten Hotspot to bootstrap on R5, we can do it again on Haiku, and I think with Haiku we'd be able to do it a LOT better."

"If you're willing to track down people, I'm more than willing to help by donating code and even time at least one night a week. I miss working on this."

A couple of quotes from Simon Gauvin about Java on Haiku:

"I suspect that by the time Haiku is ready to compile Java then 1.6 will be open source and there should be no problem to get the source. Either way,
the source is easy to get from Sun, that's not the problem, and
beunited.org certainly can support souce storage as it has in the past. The real challenge is getting the Java 1.6 to pass the test suite on Haiku so that Java can be distributed legally. That may change with open source Java, but it's not the case now. So in short, there is nothing to do but
wait for Haiku to be ready and 1.6 to be released."

These were extracts from June '06.

_________________________________________________________________
Say hello to the next generation of Search. Live Search – try it now. http://www.live.com/?mkt=en-ca



Other related posts: