Java compilers
aprunicki
Posts: 44
Has anyone tried using javac or a newer version of jikes to compile their source and successfully uploaded & run it on a Javelin? I've seen comments in some threads indicating that an older version of jikes was necessary (javac or newer jikes would not work).
I have just successfully compiled a very simple HelloWorld class with both javac and jikes 1.22 (current release) on Linux. I successfully linked (thanks Peter), and uploaded and run it to my Javelin. This is a VERY simple program however, so I was wondering if anyone had tried a newer version of jikes on a complex program.
I am very close to an alpha release of a Java port of JavelinDirect (Linux is the first target platform), and I would like to know if anyone has any experience with other compilers as I pull together a tool chain. I imagine the tool chain will allow users to choose their compiler regardless.
- Andrew
I have just successfully compiled a very simple HelloWorld class with both javac and jikes 1.22 (current release) on Linux. I successfully linked (thanks Peter), and uploaded and run it to my Javelin. This is a VERY simple program however, so I was wondering if anyone had tried a newer version of jikes on a complex program.
I am very close to an alpha release of a Java port of JavelinDirect (Linux is the first target platform), and I would like to know if anyone has any experience with other compilers as I pull together a tool chain. I imagine the tool chain will allow users to choose their compiler regardless.
- Andrew
Comments
As far as I know (for MS Windows that is), the supplied jikes compiler with the Javelin IDE
must be used. The javelin IDE itself puts native calls into the byte codes.
My JavelinDirect version 1.2 (runs in windows·DOS box) allows to generate a .jem file.
This is the binary eeprom image that must be downloaded into the Javelin.
So I think the order of operation for linux must be:
1. generate .jem file (using JavelinDirect 1.2 in windows or a linux ported version)
2. use JavelinDirectLinux (your tool) to download the .jem file into Javelin
Does your tool generate a .jem file also?
A simple binary compare should reveal differences when using different compilers.
The linux generated .jem MUST·match the windows .jem file.
regards peter
Thanks for the help. I just compared the jem files, and the jem file using jikes 1.22 compiled source is identical to the jem file using windows jide/jikes compiled source. The jem file using javac compiled source was different from the windows jem file. Curiously, all of the jem files (javac included) are all the same identical size and work on the Javelin. The javelin is supposed to have a valid JVM lacking gc, so I wonder if the javac compiled source is just as good?
With regard to my new tool, I am targetting it to be as simple as possible (basically give it a path and go). The command-line tool chain would look something like this underneath the covers:
1. Compile java source to class files (using jikes or javac).
2. Link the source into a jem file (using my new tool)
3. Upload jem file into Javelin (using my new tool)
I am working on #2 now. #1 and #3 are roughly complete.
- Andrew
As the linker is integrated into JavelinDirect (and thus your tool), I guess the native calls
are implemented into the JavelinDirect source also.
Have you tried running the javac compiled jem file?
Noticed any difference? The Javelin JVM only supports a SUBSET of java.
regards peter
·
I should clarify that to test the uploading I used your v1.2 of JavelinDirect under wine to produce the jem file. I am working on a Java port of the linking functionality now.
- Andrew
I tried to compile a very simple program with the Javelin class files uncompiled using javac and a newer jikes (1.22), and these indeed produced very different jem files when linked. My previous "success" was using Javelin class files that had already been compiled with jikes version 0.47. The jikes 1.22 files will not even link into a jem file without changes to the jem linker.
For this reason, I have included a copy of Jikes 0.47 with JavelinTools to ensure that the linked jem file is identical to that produced by JIDE.
My apologies for any confusion with previous posts.
- Andrew