Hello Joakim
Finally I got the HelloWorld Java program running on MorphOS. For this I had to fix the MorphOS version of javanio.library.
Unfortunatel I had to throw away socket stuff. Here I have to look for a suitable solution, but for now it should work without network support.
Here my changes for MorphOS and nio:
LibCrossCompile.mk:
MorphOS LFLAGS changed to:
LFLAGS = -noixemul --verbose --export-dynamic -nostartfiles
javanio.c:
added
struct SocketBase *SocketBase = NULL;
to MorphOS section for lib bases. Needed by linker for getting rid of exception "No reference to SocketBase".
Changes for gnu_java_nio_VMChannel.c:
added missing define:
#ifdef __MORPHOS__
#define ERROR_BROKEN_PIPE 109
#endif
in function JAmiga_gnu_java_nio_VMChannel_send:
changed
#if JA_TARGETOS==JA_AMIGAOS4
struct sockaddr_in to;
#endif
and also set
#if JA_TARGETOS==JA_AMIGAOS4
_before_ tolen = sizeof(struct sockaddr);
in function JAmiga_gnu_java_nio_VMChannel_getsockname:
Disabled whole function using:
#if JA_TARGETOS==JA_AMIGAOS4
[....]
#else
ThrowException(env, "java/io/IOException", "gnu_java_nio_VMChannel_getsockname not implemented.");
return 0;
#endif
in function JAmiga_gnu_java_nio_VMChannel_getpeername
Disabled whole function using:
#if JA_TARGETOS==JA_AMIGAOS4
[....]
#else
ThrowException(env, "java/io/IOException", "gnu_java_nio_VMChannel_getpeername not implemented.");
return 0;
#endif
So I think that were the changes I made to let it compile under MorphOS.
I will keep you up to date with my changes.
so long
Thore
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
-------- Original-Nachricht --------An: Thore Sittly <TSi...@gmx.de>
Datum: Thu, 9 Jun 2011 08:21:38 +0200
Von: "Joakim Nordström" <joakim.n...@gmail.com>
Betreff: Re: JAmigaHi Thore!
That sounds great! I have made sure it compiles for OS 3, so any OS 4 specific stuff should be in defines.
I have started with a network implementation, which is far from ready. That code is checked in as network.c, but I can't remember if it compiles a.t.m. I will try to look at it, and make it compile (I really should have made a branch...). Anyways, the network code isn't used, so just remove it from the makefile, if it doesn't work.
I won't be home this weekend, but if you have questions I will read the mail.Good luck!
/Joakim
> I think I should do a bit on JAmiga next time, just wanted to let you know
> :)
> Hope I can do something at the Weekend.
>
> First I will check if the new source will compile on MorphOS.
>
> Just wanted to let you know.
>
> Greetings
>
> Thore
> --
> NEU: FreePhone - kostenlos mobil telefonieren!
> Jetzt informieren: http://www.gmx.net/de/go/freephone