Welcome, Guest. Please login or register.

Author Topic: Java VM for AOS4  (Read 5501 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show all replies
Java VM for AOS4
« on: November 25, 2002, 10:41:27 AM »
If and when AOS 5 ever happens, we will get intent and the Tao JVM (which runs like lightning). However, until then, would a port of a JVM be A Good Thing?

I ask because the Kaffe JVM already has an Amiga port (68k) and could be ported to AOS4 without too much trouble. I realise that Kaffe is not the be all and end all of JVMs, but then neither is Personal Java (what we'll get from Tao's JVM).

IB 2.3 has a Javascript interpreter, I believe, so is a JVM worth the trouble?

Yes, I am volunteering. I have the tools here, but little experience in Java itself, so it won't be trivial. But even if it takes some months to get it going on AOS 4, it might be worth it.

What thoughts?

tony
 

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show all replies
Re: Java VM for AOS4
« Reply #1 on: November 25, 2002, 11:11:22 AM »
Thanks, Occie. I don't know whether I'll take on the task yet. I've had a look at the archive and there is a lot of code with machine-dependent stuff like CPU register sets, etc. Also there is a lot of (68k) assembler code in there. I think the best bet would be to get it going in 68k emulation first, then go for the PPC native version. (It's one of the JVMs in C, others are written in Java or C++). I remember getting it going many years ago on the Ami.

I'l take it on if it can do some good for the platform. But unless there is some expression of interest, I won't bother. Frankly, I'm not sure that it's worth it.

tony

Edit for gnarly:
The latest version is 1.0.7, posted in July this year, so it's fairly recent.
 

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show all replies
Re: Java VM for AOS4
« Reply #2 on: November 25, 2002, 11:54:48 AM »
1) The 1.0.7 tarball contains all the versions.
2) Yes, there is a Linux PPC version in the tarball, as well as the AmigaOS version, and all the others.

I think that it would be easier to port an AmigaOS version to AOS 4 than a Linux PPC version, even with the ixemul library problem. I think 68k emul is the way to start. Later I could take parts of the Linux PPC version for the PPC native version (if it gets that far).

But still I have to wonder, could anyone use it? How much of Kay's Uni work can she do on a limited VM? To quote Kaffe.org,
"Kaffe is not the best Java virtual machine for developing Java applications, as it lacks much in the way of documentation, compatibility, debugging/ profiling support, etc. If you are learning Java, or are looking for a complete Java development environment, you will probably be best served by using a "real" Java development environment (such as the JDK) . . ."

Kaffe probably won't enable you (or me) to access the online bank. You'll need the full metal jacket version for that.

tony
 

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show all replies
Re: Java VM for AOS4
« Reply #3 on: November 25, 2002, 10:13:00 PM »
@Kay: Sorry, old son, it's your avatar that looks feminine.

ne_one et al: No, I'm not looking for a big job. I know from 30+ years' programming experience how much work it would be to port the whole Sun implementation to a new platform.

However, the Kaffe implementation already exists, already runs on a 68k Amiga and might run on an AmigaOne out of the box. It might even be doable (NB: not 'easy') to make an AOS4 PPC-native version if the 68k version is a success.

And it would be a useful bootstrap for porting other, more thorough implementations to AOS4, like those written in Java.

Like most *nix ports, it relies on ixemul to work, the code itself is not changed from one platform to another. So there are a couple of challenges there, and it might give me something to do for the Kommunity.

(I can see myself in a couple of decades, in a nursing home with my old AmigaTwo laptop, shooing away the nurse because build #29158 is nearly complete)

tony
 

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show all replies
Re: Java VM for AOS4
« Reply #4 on: November 27, 2002, 11:46:58 AM »
OK, it seems no one is officially working on a JVM at the moment, so I'll proceed. My aim at the moment (to be modified if and when necessary) is:
1) Get the kaffe sources and expand (done)
2) Compile for 68k AOS (3.9). This is not as easy as it sounds, because the kaffe build is supposed to run under a Linux/Unix environment, with all the shell script files, etc. I am not a Unix expert and I might just throw away all the auto configure stuff and start from scratch with hand-coded makefiles.
3) Run test suite (supplied) and check build.

When it reaches this stage, it ought to be portable (read: re-compilable) to AOS 4, assuming ixemul can be ported. If someone else were to port ixemul, that would be grand.

4) (The real work) remove dependencies on ixemul and make kaffe stand-alone. This may not be feasible with the classic Exec (multiple threads problem).

We'll see how we go. I don't have a fast access website, so any output from this exercise will have to be hosted by someone.

tony