With the increasing competition of domestic 3G market and the development trend of customized mobile phone, mobile software platform will play a more important part, this is also a bottleneck of domestic 3G industry chain . The current cell phone software platform is lacking of opening, portability, compatibility or complex architecture.,and we never had such platform with proprietary intellectual property rights. In this paper, through the analysis of the existing platform and the integration of open source software to realize an open, simple, compatible mobile Java software development platform (Mobile Java Platform, named MJ). The research content and innovative points are as follows:(1)This paper presents a new mobile Java platform architecture, which combined java,component libraries and Linux. From the top down, this platform could be divided into the application layer, service layer and the operating system layer. Among layers, the service layer include the Java application framework, component libraries and Java run-time..Compared with Windows Mobile, this platform both have the stability and reliability of the linux and the cross-platform nature of Java; Compared with Symbian, the platform's structure is more clear, the open interfaces is more simple; Compared with Android, the platform support J2ME; Compared with J2ME, the structure of the platform is more clear and specific.(2)The implementaion of the service layer in MJ platform includes Java application framework, component libraries and Java runtime. The Java application framework includes the JSR specification of J2ME and MJ-dependent development kits. Based on the relevant open source libraries, the Component library provides an implementation of all interfaces in Java application framework: implements the 2D graphics rendering interfaces and event response interfaces by qte, implements the relational database accessing interfaces by SQLite, implements the mobile multimedia services interfaces by GStreamer; The Java run-time is implemented based on CLDC HI virtual machine.(3)For the optimization of Java Virtual Machine, we propose a stack-allocation based garbage collection algorithm, improve the performance of allocating and reclaiming the Java object, make the system releasing immediately and taking up less memory space, thereby reducing the garbage collector's burdens and enhancing the Java virtual machine running speed. The Algorithm analyses and identifys stack-allocation object when compiling the java source code, and mark the object with extend instructions. Stack-allocation object will be allocated from java stack and will be released immediately when leave it's scope. Other object will be allocated from heap and released by garbage collector.At the lack of reserches on mobile software platform in our country, the results of the research on mobile Java platform in this paper has an important reference value to the study and application of mobile software platform. |