Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Running PersonalJava apps on a P800

1 replies · 2,837 views · Started 03 February 2003

Hi,

I'm trying to get a simple PersonalJava app running on a P800. The code is from the example in the UIQ 7.0 documentation. I'm able to create and install a .sis file on the phone, but when I start the app, a box with the text "Starting..." appears in the top right-hand corner, but nothing happens. I have a feeling it's something to do with my .aifb project file and/or my .pkg file used to generate the .sis. Are there special settings required in these files for the P800? For example, I wasn't able to install the app onto the phone, until I added the following line to the .pkg file (input to makesis.exe):

;
; For the P80x only
;
(0x101F80BE), 1, 0, 0, {"SonyEricssonP80xPlatformProductID"}

which I found in the .pkg file in the EDoom source. Here's the Java source code I'm using:

import java.awt.*;
import java.awt.event.*;

public class Hello extends Frame implements ActionListener
{

public static void main(String[] args)
{
Hello hi = new Hello();
}

Hello()
{
Label lab = new Label("Hello world"😉;
Button but = new Button("Dismiss"😉;
but.addActionListener(this);
addWindowListener(new Goodbye());
setLayout(new GridLayout(2, 1, 10, 10));
add(lab);
add(but);
pack();
show();
}

public void actionPerformed(ActionEvent e)
{
dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
}

private class Goodbye extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
System.out.println("Goodbye"😉;
System.exit(0);
}
}
}

The classes are bundled in a jar file called helloapp.jar. Here's the aifb file project file which was created using aifbuilder:

<?xml version="1.0" encoding="UTF-8"?>

<AIFBPROJECTFILE>
<APPLICATION NAME="Hello" UID="0x00000010" LANGUAGE="JAVA">
<COMMAND>-cp helloapp.jar Hello</COMMAND>
</APPLICATION>
<DFRD MBM="">
<DFRDNAME>UIQ</DFRDNAME>
<OUTPUTLOC OUTPUTDIR="C:\Symbian\UIQ_70\epoc32\winscw\c\system\Apps\Hello\" WORKINGDIR="D:\temp\" />
</DFRD>
</AIFBPROJECTFILE>

and here's the .pkg file I'm supplying to makesis:

;
; Basic install file for minimal application
;

; Languages -
&EN

; Installation header
; Only one component name as we only support English
; UID is the app's UID - see HelloWorld.mmp
#{"Hello application"},(0x00000010),1,0,0,NC,TYPE=SISAPP

;
; For the P80x only
;
(0x101F80BE), 1, 0, 0, {"SonyEricssonP80xPlatformProductID"}

; Only two files to install for the minimal application
"helloapp.jar"-"!:\system\apps\Hello\helloapp.jar"
"Hello.txt"-"!:\system\apps\Hello\Hello.txt"
"Hello.app"-"!:\system\apps\Hello\Hello.app"
"Hello.aif"-"!:\system\apps\Hello\Hello.aif"

; Required files
; None

; Component .sis files
; None

Is there anything obvious that I'm doing wrong here? I'd appreciate any help with this, or a pointer to some PersonalJava source code with a .aifb file and .pkg file that produces an .sis which can be installed and run on the P800.

thanks,
Derek

Hi,

I just figured this out. It was a problem in the aifbuilder file, I changed the command from:

-cp helloapp.jar Hello

to:

-cp ?:/system/apps/Hello/helloapp.jar Hello

The original value I had is for when you're running it with the Symbian emulator.

FYI here's the tool that enabled me to solve this, it's a useful tool which allows Java console/debug messages to be displayed:

http://www.ericsson.com/mobilityworld/developerszonedown/downloads/tools/epoc/redirect.zip

Derek