Showing posts with label jarpa. Show all posts
Showing posts with label jarpa. Show all posts

28 May 2008

First step with Jarpa

Here are the steps to successfully compile Jarpa.
It's very basic and I assume you already know it but, for people like me who fought so many hours with the security domain issue, I could be interesting...
I currently use JarpaDebug and not newly Jarpa_105 since Felipe removed web support on this last release...and S40 3rd FP2 only support web ;)


First download Netbeans mobility or full edition.
Unzip the file where you want to install it

Like I don't like wher software make a lot of folders in My Document folder, I personnaly created an 'user' folder where I unzipped Netbeans and modified netbeans/etc/netbeans.conf to define my userdir :
netbeans_default_userdir="e:/Nokia/user"


To run, Netbeans needs JDK not the JRE, so you have to download and install it.

You can now run Netbeans.

If problem occurs like a message box talking about JDK Home (like I had the first time I tried, because another JRE version was installed), you'll have to modify netbeans/etc/netbeans.conf to define JDK home :
netbeans_jdkhome="e:/Nokia/jdk"


Now, you have to download a S40 or S60 Java SDK.
Note : you'll have to sign the Forum Nokia to download it, and after 15 days, you'll have to request a free serial number to continue.
I personnaly used S40 3rd edition FP 2 because it's Nokia 5200's one (a common S40 here in France).

Relaunch Netbeans to add this SDK to your Netbeans.
Select Tools> Java Platforms
Click the Add Plaform... button
We want to use a Java ME MIDP Plaform emulator
Netbeans automatically detects the SDK
Finish platform installation
You're now ready to develop for S40 3rd Edition FP2

I created a folder 'projects' when I'll add my future projet

Download JarpaDebug and unzip to your own projects folder

On Netbeans, File > Open project... and choose Jarpa folder
Don't be afraid by the Error dialog box, Jarpa was made for the Sun Java Wireless Toolkit, not a Nokia SDK so it complains it doesn't found the Wireless Toolkit platform. Let's change that !
Right click on Jarpa project you just opened, Properties.
On platform, select the Emulator Platform you want, like Series 40 SDK 3rd Edition Feature Pack 2
Ok, it's now done, you could launch Jarpa using F6 or the big green arrow or Run>Run main project

"Application is not from a trusted supplier. Continue anyway ?"
Welcome in the great world of Security Domain ;)
Since your JAR file isn't signed, you're allowed to do a lot of thing : if you continue ("yes"), you'll see some "Application access set to not allowed".
Like I said, it's security issue : Nokia doesn't want you to launch malicious software without to be sure what's you're doing.
To resolve this, follow my post according Security Domain.
For this S40 3rd Edition FP 2 emulator
- exit Jarpa
- go to "Menu"
- go to "Apps"
- highlight "JarpaDebug"
- use left soft key "Options"
- On the menu, select "Application access"
- then "Data access"
- then "Add and edit data"
- select "Ask every time"

You problably saw some options like "Ask first time only" and "Always allowed" are greyed : they are disabled because Jarpa isn't signed.
Note : since I don't tried to sign a JAR yet, I don't know if you can automatically define to "Always allowed" after that. Let me know if you try!

To avoid this, you could also (on emulator only), set the Trusted domain to "maximum" on emulator preferences.

Still on the emulator, relaunch "JarpaDebug", you're now able, with "Options" left soft key, to open it from the Web : you'll have to exit Jarpa to launch Web
From memory and from phone memory doesn't work on emulator and I didn't tried them on a real device yet.

These settings are saved so you won't have to redefine then every launch.

23 May 2008

After sandbox, MIDP2 security domains!

I was fighting with Jarpa not working on my phone (N70) nor emulator (5300) when I found the Java Security Domains page at Forum Nokia.

In fact, my code was working but, as it's not signed (Netbeans's own certificate doesn't seems to work on S40), no writing (Edit user data) was able.

I so followed the 2 tutorials on Forum nokia (S60 or S40) and I'm now happy to make Jarpa work on my phone and emulator! So let's try to add some cool features !

After Kuneri great post on FLite3 sand box problem, I thought it was impossible to make something more than graphical application or wallpaper on mobile with FLite!

18 April 2008

J2ME

2 years ago, I tried to understand Java for mobile.
My plan was to add functionalites to the FL player throught a proxy.
I quickly stopped because Java was a mess for me.
I saw SWF2GO, Kiss60, etc.. but nothing for Java (Symbian C++ is insame!), so for 'any' phones.

Then I learnt AS3 throught Flex (yeah, not throught Flash).
I know see what a class is, what an event is and I must say J2ME doesn't afraid me anymore.

Then Jarpa appeared some times ago...I noticed it but, at this moment, I didn't have time to play with (see my posts, you'll see I wasn't really 'here' for a long time)

So I downloaded NetBeans, Sun's Wireless Kit and still trying to download Nokia's SDK (got a problem registering!)
It's hard because it's not the same world : I'm more from a "look how well it's animated"-world than "look how much lines I used to print Hello World"-world.

I don't plan to code in pure J2ME, I only would like to contribute to Jarpa project.
See you in Jarpa's Google group ;)