Welcome, Guest. Please login or register.

Author Topic: Java (sort of) for the Amiga  (Read 3250 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline EDanaIITopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show all replies
    • http://www.EdwardGDanaII.info
Java (sort of) for the Amiga
« on: December 18, 2006, 05:20:50 PM »
I'm just thinking out loud here... and forgive me if this topic has already been broached.

I know, of course, that there have been several (failed) attempts to port Java to the Amiga, primarily centered around the JVM. To the best of my knowledge, the majority (if not all) of these projects have been abandoned, I'm presuming, because of time issues, the Amiga's unfortunately underpowered CPU, and out of date libraries.

But has anyone considered the possibility of simply creating C++ libraries that mirror Java packages? In other words, mirror Java include files as C++ header files so that one may implement Objects or Swing or what-not in C++. One would implement this entire scheme by starting off with Java.Lang.Object, from which everything else is built, and expand from there.

Obviously, it would not be as simple as doing just that. I assume C++ datatypes would need to be mirrored as Java datatypes, programmers would have to discipline themselves not to use pointers, base libraries modified to conform to the Java standard, some effort would be needed to convert from a Java program to C++ and so on... but by eliminating the JVM, while you might loose the WORA paradigm, you still might gain a huge collection of apps.

Further benefits would allow the full power of whatever CPU the machine was running on. AROS, MorphOS and, even OS 4.0 might benefit too, if they never obtain a JVM.

I'm not expert, on Java, C++, or even the Amiga and I'm curious to hear other people's points of view on the subject. Such a project seems possible to me, albeit a large one.

But, like I said before, I'm just thinking out loud.

One thing is for certain, the Amiga still survives, if only in emulation, so... here's yet another way to keep it going. ;-)

Ed.
Ed.
 

Offline EDanaIITopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show all replies
    • http://www.EdwardGDanaII.info
Re: Java (sort of) for the Amiga
« Reply #1 on: December 19, 2006, 03:29:42 PM »
Not to argue with you, Karlos, but I don't see that as an issue. There are serveral Java to C++ translators that I'm aware of. How good they are, is another matter.

Here are some of the ones I'm refering too:
* Octopus - Java to C++.
* ANTLR - Java to C++.
* XES - Java to C++

I tried the first one. I didn't compile and run it, merely had it translate Java to C++, and it looks like it did OK.

As to garbage collection, that's a good point, but I get the impression that the tranlators above manage that. I could very well be wrong on that one, however.

I have no idea if this would be an easy task, but, then, that's why I'm "thinking out loud here." :-)

Ed.
Ed.
 

Offline EDanaIITopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show all replies
    • http://www.EdwardGDanaII.info
Re: Java (sort of) for the Amiga
« Reply #2 on: December 19, 2006, 04:51:29 PM »
Syntacticly like Java? No. :-) Structurally like Java? So that one can use all the same libraries and methods? Yea, sort of... What I was thinking of was more a case of making the libraries look more like Java import libraries. But, to be honest, that's why I keep repeating "I'm just thinking out loud here" 'cause, I'm just trying to get my brain around the issue.

Your input's been quite helpful. Thanks. :-)

Ed.
Ed.
 

Offline EDanaIITopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show all replies
    • http://www.EdwardGDanaII.info
Re: Java (sort of) for the Amiga
« Reply #3 on: December 20, 2006, 07:58:54 PM »
Yes, as I understand it, GCJ compiles Java directly. You would still need the Java libraries, I presume, and you'd still have to compile the low-level libraries for the OS. But I could be talking out my S here. :-)
Ed.