Im a final year i.t student and im writing a simple program to be implemented on an iPaq PDA. I have some experience in java but none in PDA's. I have downloaded and installed Creme onto the PDA and i have the cube demo working.
My question is how to run my own applications. I have written a simple temperature conversion program as a test and exported it to a .jar file in eclipse. However this will not run on the PDA. Is there anything else i have to include along with the .jar file or is my problem somewhere else.
I would appreciate any advice that you could give me.
Thanks in advance
Sorry friend , why you dont give us more information about your problem, so maybe i can help you.
First of all, your GUI is written in Swing?
If it is a simple program why are using Creme?
Give me more information, and then maybe i call help you to go further!
Hi thanks for your reply. I had thought i had to use a vm like creme to run a java application on a pda? Is there another way?
My code is below for a simple test program im trying to run:
public class tempConverter
public static void main(String args)
double celsius, fahrenheit;
// Getting user to input the temperature they want to convert
celsiusStr = JOptionPane.showInputDialog("Enter the temperature (in celsius) you wish to convert:");
celsius = Double.parseDouble(celsiusStr);
// Performing the conversion
fahrenheit = ((celsius*9)/5)+32;
//Displaying the result
JOptionPane.showMessageDialog(null, "The temperature in fahrenheit is:" + fahrenheit);
First of all , to clarify some points. The Creme Virtual machine , runs only J2ME CDC compliant code.
That means that not everything that you run on J2SE will necessary run on your application. However looking to your code, i dont see anything that would not compile. It seems ok!
The first very thing you have to be aware. You are running a swing application, therefore you need to take the swing.jar file in your creme folder in your pc which usually is located at something like c:\program files\nsicom\creme\lib ... i am not sure if the last directory is lib, or libray or whatever, you have to check it out by yourself. Then, all you should do, is copy this jar, to the pda phone, to the libray directory, located at the creme folder.
try to run it again, and then tell me the results!
If you already did it, tell me what kind of errors are you receiving!
anyway, still as an advice: If your program makes only that , why do u want to use Creme with Swing. Wouldnt a midlet do this job very easily too?
I presume that this is just a part of your final code!
Thanks for your help. This is actually just a test app i wrote just to get started. The actual program will be more complicated. I tried putting in the swing.jar file but it hasnt fixed the problem yet.
The error in my log file is: not found: java.lang.classNotFoundException:tempConverter
Shnanl, there are SEVERAL steps that you cannot miss trying to run a program with the Creme JVM.
That gave me headache , when i finally wrote an article in my university on how to deploy a java application for a windows mobile phone using creme virtual machine.
Unforunatelly, my webpage is down, and i have it written there. The reason is that my webpage runs direct on my computer(my homeserver).
I think this article is EXACTLY what you are looking for, you have just to follow step by step to get it working.
So lets make like this, in 7 hours ill be home, and ill put my page up again. Send me your email to firstname.lastname@example.org, and i will send you the address so you connect at your place.
I will not give more possible solutions, because everything is written in this article, you just have to follow it!
Just so you know, if you double click on the jar on the PDA, creme does not start in full verbose mode. (this is hinted by the "obscure" message you have). This error message is pretty generic. If you want to have more console message (a real message, not the classdefnotfound), start your app with a .lnk (a shotcut that includest command line options). The creme doc is not that bad at documenting the options. Don't start the app with the -jar, but instead use the
I have developed a CLDC application(has both .jar & .jad files) and tried it succesfully on Palm OS Emulator and Pocket PC Windows Mobile 5.0 emulator. When i tried with a CDC application(.jar files only) the application is not coming up. Only the message 'Loading CrEme..please wait' comes up and nothing. Any help on the issue? Is it because the correct JVM is not installed or something?