onsdag 22 december 2010

Soon - ping!

Ah, yes. Finally, I'm really having some sort of success. I have gotten the java.net stuff in some kind of working state. Now, the work is actually very much on-going, and in progress. It is still trial and error, but I'm really happy to see that JAmiga seldom crashes.

So. Happy. Progress. Fun!

tisdag 7 december 2010

Various progress

The process handling is now in a somewhat more working state. The *nix specific stuff has been removed, and a new VMClass implementation has been created. This basically runs SystemTags() for the command, and on exit tries to send a message to a message port. If the port exists, it means that someone -- the waitFor method of VMClass -- is waiting for the result of the Process. If the port doesn't exists, it is created, and a message is put on queue. Then, with either VMProcess.exitValue(), or VMProcess.finalize() the message port queue is checked (if port exists), the program's return value set, and the message port is removed.
I'm kind of happy with that solution. However, if the SystemTags() is used with the ASYNCH flag enabled, it doesn't return -1 when the command can't be found (i.e. trying to run Mlutiveiw, and not Multiview, return 0 for success), so one can never tell if the command could be started or if the exit code is from the Shell trying to start it. This can perhaps be solved by starting a process that calls SystemTags, with ASYNCH disabled. But I still have to find out a way to know if the SystemTags() succedded... probably by some intrinsic use of wait:s and delay:s... which is not very safe without Forbid() and Permit().

Also, trying with mauve fails. There seems to be something about mauve that likes to create new processes, causing memory failure, which will lead to JAmiga crashing.

Moving to more fun stuff, I tried the AWT classes, which can probably relatively easy be made to work again -- Intuition stuff work, and it seems to be a mere configuration issue initially.

The JAmiga project is continuing...

fredag 26 november 2010


The VMProcess implementation in the GNU CP is kind of aimed at *nix-processes using fork and reap and such. The Process.java implementation is relatively easy and actually more coherent with the Amiga-way of handling processes. So, a JAmiga-native VMprocess-class is probably the best route to go. Should lead to fewer internal/extrnal lists for JAmiga-processes, allowing us to use the Amiga processlists directly.

måndag 22 november 2010

Break through

It seems that my version of the VMCPStringBuilder.class was erronous, or rather; it was probably compiled to have native functionality implemented -- which I haven't bothered with.

So. Progress. I have managed to run a few Process-related stuff, and I'm about to take a look a the Ctrl-C-handling in the Object.wait()-method. This, so any galloping processes (such as my mauve-tries) can be breaked, without JAmiga going down (which is what happens now).

måndag 11 oktober 2010


Yes, JAmiga i s still alive, and work is on-going. Progress is slow, but its atleast some progress.

Now JAmiga "works" with GNU Classpath 0.98. It works kind of like the 0.12 vesion works. There have been work on a few more native methods, but now, mauve has stopped working. Mauve creates new processes for the tests, and the VMProcess methods are... apparently not working correct. A few sockets stuff has been implemented.

All in all, nothing much has seemingly happend, but work is progressing.

lördag 31 juli 2010

JNI 1.2

When looking at supporting JNI 1.2, this document proved valuable: http://download-llnw.oracle.com/javase/1.4.2/docs/guide/jni/jni-12.html

here seems to be quite a lot of stuff to be implemented. But I think that JNI 1.2 could ease the work in getting a newer classpath to run.

måndag 19 juli 2010

Native implementations

Now work has been focused on writing mising native stuff to work with GNU Classpath.
I am trying to run HelloWorld using Classpath 0.93 and also 0.98, and catching any unimplemented methods along the way. It is kind of tedious, and the javah-util could really help me out. Classpath 0.98 works equally well as 0.93 -- which doesn't tell us much -- but work with 0.98 might be upped on the priority list, possibly avoiding 0.93 bugs.

I have also updated the wiki-page on Classpath development, and can happily see the atleast one method has turned from red to green! Noteworthy is that not all red methods have been found yet, and a few of the ones in gnu.java.nio (file handling stuff), might already be implemented.

I have also received some JAmiga work from another developer which I'm currently merging with the other stuff; there were a few speed improvements and such (Thank you Thore, I hope you join the project).

onsdag 14 juli 2010

JNI 1.2.. and other thoughts

JAmiga support JNI 1.1.
Ofcourse, the latest is the way to go. Looked at java.sun.com and looked through teh document on JNI functions. It seems rather straightforward to implement the functions in jnienv.c|h.

My latest entry was about javah, and it may seem like I'm jumping between different things to do in JAmiga, but:
a) the javah-util's aim is to help implement the missing JNI methods of GNU CP 0.95
b) JNI 1.2 works differently, and I might get away without my own javah-util

So... I'm thinking that JNI 1.2 is a highet priority.

But then again, I have been looking at JamVM. I have implemented a few thread stuff in it for AmigaOS, but there are some strange reloc issues when I run the binary. So, I am a bit stumped. And I think that work on Amiga specific Classpath JNI stuff, could be used with JamVM, which I think would perhaps be a safer way, since JamVM, a) is being actively developed, b) has Java 6&7 in the works, and c) is actually working ann being used.

So. I really don't know what to do. JAmiga is a nice project, and it has potential, but it huge task to maintain it, and get it working. Other things talking *for* JAmiga is support for MorphOS, Aros, AOS3 and AOS4. But I think JamVM could be made working for those aswell.

onsdag 7 juli 2010

Say after me: javahhh

Yes, one month after the previous blog. Though I have been doing some work on JAmiga, it hasn't been much. The summer with its sun is here, which puts me outside with a glass of rosé wine.
Anyhow, the work I have made consist of a lite-javah-util. Javah comes with the Java SDK and it creates C-header files for the JNI, for native methods in java classes. I have been using the one on my Ubuntu linux machine, but since it only produces the header files, I still have to do a lot of typing (I believen there were version of javah that also produces skeleton c-source, but I haven't found it anywhere). Basically, my javah-lite (should) produce both header and c-file, with empty skeleton JNI functions, from the java source. The comments from the Java-source should be available, which the original javah does not, so one doesn't need to look at the Javadoc all the time. The JNI stuff should do nothing, but I should be able to run JAmiga with GNU classpath 0.95 (for instance) and make it crash, or hopefully complain about unimplemented methods. When I manage to do this, it is just a matter of going through the JNI code, and implementing the functions.

So, progress is as always slow.

onsdag 9 juni 2010

Looking into GNU Cp 0.93

I have now built GNU CP 0.93 (on my Linux machine), I used this configure:
.\configure --disable-jni --disable-gtk-peer --disable-gtk-gconf-peer --disable-plugin --disable-core-jni --withour-native-libdir -- with-ecj --host=ppc-amigaos --prefix/home/joakim/amiga/Projekt/cp093 --with-glibj=flat

Which build the whole thing using ecj (could probably use somthing else, but I had that installed), and creates a dir with class-files (not a jar file).

Anyways, trying to use this with JAmiga didn't work, and I believe there are a few native stuff needed. Will continue looking at what is implemented and not; info will come on the wiki.

tisdag 8 juni 2010

Roadmap thoughts

I've been thinking of producing a roadmap of some kind. A wiki page has been created. Two subgoals have been identified: getting Java 1.4 working with GNU CP 0.93, and then adding Java 1.5 with GNU CP 0.98.

tisdag 18 maj 2010

Making minimal progress

I've been gathering motivation to getting 0.0.6 version out the door. Tonight I played around with the install script, and hopefully we could have version 0.0.6 out soon. That version will contain jamiga 0.0.6 with OS4-specific memory routines, classpath 0.12 and optional jikes.

onsdag 17 februari 2010

JAmiga continuing

So, a few things has happened on the JAmiga front.

Began from scratch with the jamiga source found at jamiga.org, and the classpath 0.12. I have made a local SVN to keep track of what I've done.

I've also tried mauve, and ran autoconf aclocal, and what not on my Linux machine, copied that to the Miggy, and made a few changes to the Makefile, so it runs with JAmiga (the CP is separated with ",", since the colon is for devices and disks on Amiga), and "/bin/pwd" was changed to "cd".

So, I'm thinking of releasing a JAmiga 0.0.6, with classpath 0.12 and mauven included, to get a few other testers.
Work now has to been done on:
1. Stabilizing JAmiga
For this the mauven project is excellent, since it doesn't need all classes supported; the first goal would be too make JAmiga crash "nicely" and just throwing exceptions.
2. Getting Java 1.5, 1,6 and 1.7 to run
Done, by either getting GNU classpath 0.98 to run (a few GNU classpath native methods has to be made), OR getting the OpenJDK supported (the former is probably much easier, since I've actually got a 0.98 compiled CP, and only get obvious methods that aren't supported)
3. Improving the org.jamiga-classes

These three steps could be done separately.

The first thing needed though is getting a new JAmiga out the door, getting some buzz, and attracting more testers and developers (and perhaps bounty givers).