As a mobile developer using Slackware I often stumble over the fact that most of the major Mobile providers like Nokia, samsung, Motorola and Sony Ericsson only support the Windows platform with their development tools?? I hate this fact!
It must be possible for any of these companies to hire some one who could handle their development tools on other platfroms like Mac or Linux!
Luckily, the Sony Ericsson emulator is based on the Sun ME emulator. So I decided to get the emulator running wit my netbeans setup. So here's how to get the SonyEricsson (SE) mobile phone emulator running on a linux
box.
1. Install wine!
If you don't have a windows box with the SE installed you'll need to be
able to install the windows version of the SE emulator so you can hack the
files. This can be done using wine.
2. Install the recomended jdk and jre for the latest SE emulator in
wine You'll need jdk and jre to install the SE Emulator. Just
follow the online instalations.
3. Install the SE emulator in wine.
Point to the recently instaled jdk and jre if needed. Just
follow the online instalations.
4. Go to the SE PC_emulation directory typically placed at:
$HOME/.wine/drive_c/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation
5. backup the WTK2 directory to keep the windows files just in case tar -czvf
se.tar.gz WTK2/
6. Merge the Linux kvem.jar into the Windows kvem.jar file
In the WTK2 directory with the one from the netbeans Linux
emulator. Depending on the Netbeans installation on your Linux box you'll
have to find the emulator/WTK2 directory.
My directory for the sun emulator is:
$HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/
Then find you SE installation, mine is:
$HOME/.wine/drive_c/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation
If you have Midnight commander (MC) installed. You can open the zipped jar
files directly and copy all the linux class files into the Windows version
of the jar file.
This is done by opening the kvem.jar files in their own window in MC. Each
of the kvem.jar files should be opened to the first level, having the
META_INF and com directory avaialble. Then press 'F5' in the linux version
at the com directory, remember to mark the "dive into sub directories" tap
in the copy dialog to get everythign copyed from the Linux kvem.jar file
to the windows kvem.jar file. That's it
Now if you don't have MC installed unzip both kvem.jar files into the same
directory. Firs the windows kvem.jar file should be unzipped. Then unzip
the Linux kvem.jar file into the windows kvem.jar directory and zip the
whole thing again.
It is crutial that the linux version is written ontop of the windows
version. This is for the Linux version. This is because the linux version
needs to overwrite the non platform independend java classes in the
windows file.
7. Copy all the executables from the Linux version to the Windows
version. This is done by copying every executable from the Linux netbeans
WTK2/bin/ to the PC_Emuation/WTK2/bin/
find .netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/ -perm -u+x | xargs
cp -t bin
copy the file from 6.0 if you're using this netbeans version.
8. Copy all the library files from the Linux version to the Windows version
this is done by copying all the *.so files from the WTK2/bin to the
PC_Emuation/WTK2/bin/
cp $HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/*.so bin
copy the file from 6.0 if you're using this netbeans version.
9. Copy the Linux wtklib subdirectory to the windows version
if you're not there allready goto the SE windows PC_Emuation/WTK2/wtklib/
then copy the Linux directory to thisdirectory.
cp -R $HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/wtklib/Linux .
copy the file from 6.0 if you're using this netbeans version.
10. Copy the Linux sound support library to the windows. This is done by
copying the soundbank.dsl from the WTK2/lib/ to the PC_Emuation/WTK2/lib
directory.
cp
$HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/wtklib/lib/soundbank.dls
lib
11. Import the emulator into netbeans. See the netbeans documentation on how
to do this.
12. If you're a nice guy like me create a tarball for so everyone can use the
emulator.
mkdir se_emulator_wtklib-2.5.1
cp -R WTK2 se_emulator_wtklib-2.5.1
tar -czvf se_emulator_wtklib-2.5.1.tar.gz se_emulator_wtklib-2.5.1/
1 comment:
Hey there, thanks for your tutorial.... I followed it to the letter.....however I'm having real difficulty getting a jad to load, there's a problem with "lime" whatever that is:
rick@rick-office:~/.wine/drive_c/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation/WTK2/bin$./emulator -Xdescriptor:/home/rick/workspace/BallHog/trunk/dist/ff_Sony-Ericsson_K750.jad -Xdevice:SonyEricsson_K750_Emu
java.lang.InstantiationError: com.sun.kvem.Lime
at com.sun.kvem.KVMBridge. init>(KVMBridge.java:49)
at com.sun.kvem.KVMBridge.getBridge(KVMBridge.java:40)
at com.sun.kvem.midp.MIDP.run(MIDP.java:779)
at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(EmulatorInvoker.java:110)
at com.sun.kvem.environment.EmulatorInvoker.runEmulatorSameVM(EmulatorInvoker.java:99)
at com.sun.kvem.environment.EmulatorInvoker.runEmulator(EmulatorInvoker.java:57)
at com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator(ProfileEnvironment.java:237)
at com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(ProfileEnvironment.java:260)
Any ideas please? Is it possible you could email your WTK2 directory to me at r.hamnett "at" gmail dt com
Post a Comment