From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19699 invoked by alias); 13 Jun 2011 09:14:42 -0000 Received: (qmail 19688 invoked by uid 22791); 13 Jun 2011 09:14:41 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GC,TW_QE,TW_WG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 09:14:27 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5D9ERMl025287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jun 2011 05:14:27 -0400 Received: from zebedee.pink (ovpn-113-116.phx2.redhat.com [10.3.113.116]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5D9EP1U017307; Mon, 13 Jun 2011 05:14:26 -0400 Message-ID: <4DF5D4F1.2070300@redhat.com> Date: Mon, 13 Jun 2011 09:14:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 MIME-Version: 1.0 To: java@gcc.gnu.org Subject: Re: GCJ Porting for RTEMS Status Report References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00017.txt.bz2 On 12/06/11 18:15, Jie Liu wrote: > 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. :) All good stuff. Thanks, Andrew.