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...