This chapter explains how to use certain CVM command line options. The same options can be used with the emulator executable.
To change the resolution add the following line to the DirectFB resource file ~/.directfbrc.
mode=720x400
Another way to change the resolution is to add the following parameters in the command line:
DFBARGS=mode=720x400
For example, the command to execute an application with a specific screen resolution of 640x480 could be:
/usr/local/Oracle_JavaME_Embedded_Client/1.0/ emulator-platform/bin/cvm -Xdevice:HDTV -DFBARGS=mode=640x480 -Xms48m -cp /home/dawn/NetBeansProjects/test/dist/test.jar test.Main
If you want to stop the VM emulator (while running in debug mode or not) it is not sufficient to press the red stop key in NetBeans. Pressing the stop key only stops the NetBeans build. There are several ways to stop the VM application:
On your application’s window, press the X button.
Focus on your application’s window and press CTRL+C.
Ubuntu Linux: If the above methods don’t kill the window, you can stop a running VM from the command line as follows:
for pid in `ps aux | | grep Oracle_JavaME_Embedded_Client/1.0/emulator-platform/bin/cvm | grep -v grep | awk '{print $2}'`; do kill -KILL $pid; done
ARM, PPC, or MIPS Linux: To stop a running VM, use the following command:
for pid in `ps aux | | grep Oracle_JavaME_Embedded_Client/1.0/binaries/bin/cvm | grep -v grep | awk '{print $2}'`; do kill -KILL $pid; done