GCJ Porting for RTEMS Status Report

Jie Liu <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <BANLkTinktqJM01MvOcdEDk85GLJP94ebVruV+tUOLu+NwF_TNQ@mail.gmail.com>
Hi,

First, let us look at an HelloWorld example with exception and thread,
the HelloWorld.java is:
public class HelloWorld{
   public static void main(String args[]){
      ThreadTest t=new ThreadTest();
      Thread t1=new Thread(t);
      System.out.println("GCJ For RTEMS in Java!---in HelloWorld.java");
      try{
        System.out.println(args[100]+"for raise an exception");
      }catch(Exception e){
        System.out.println(e.getMessage()+"---in an Exception");
      }
      t1.start();
    }
}
class ThreadTest extends Thread{
  public void run(){
    System.out.println("ThreadTest from HelloWorld!---in a new thread");
  }
}

Compiling it using cross gcj and linking with rtems system, we get a
HelloWorld.exe. And then, run it on qemu as:
qemu -m 512 -boot a -cpu 486 -fda /home/rtems/qemu/pc386_fda -hda
fat:/home/rtems/qemu/hd -monitor null -nographic -serial stdio
--no-reboot

The output is:
Initialized console on port COM1 9600-8-N-1
GCJ For RTEMS in Java!---in HelloWorld.java
100---in an Exception
ThreadTest from HelloWorld!---in a new thread
EXECUTIVE SHUTDOWN! Any key to reboot...

Is this interesting?

In the last few months, I have
--Porting bdwgc to RTEMS/I386
--Use RTEMS’s pthread for GCJ Porting
--Fix many many problems in compiling, linking and running
--Have a cross gdb environment for source code level debug
and next step I will
-- Start focusing on running the testsuite and fix encountered problem
-- Move to other architectures and repeat this progress
--Submitting patches to related community

If you are interested in, welcome! Do not hesitate to contact me. :)

Best Regards,
Jie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.