• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

KVM problems??

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is anyone here familiar with the KVM? (The JVM that runs on palmtops?)
I am walking thru the tutorial on Suns website on KVM. I can get the HelloPalm code to compile fine but when I try to run the preverify it fails on loading HelloPalm.class
Has anyone worked with this before...what do my classpath settings need to be?
ANy info would be greatly appreciated.
Ryan
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ryan, GUESS WHAT!! YOU are about to become the new expert on Palmtops, and educate the REST of us on what it is all about. Lucky you!!
(This is my hint that I have not a clue )
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,
Once I get it figured out, I'll letcha know. So far I fixed my problem relating to this post. You really have to make sure you've got the correct classpaths setup. That is the worst and its a pain.
However, once you got it, its pretty slick. Another thing though, and this is my new problem. Walking thru Sun's tutorial on KVM, they give you some source code for HelloPalm.java. I finally got the sucker to compile, but it only works inside of the KVMs emulator, (similar to appletviewer with the JDK).
The darn thing crashes on the POSE (Palm OS Emulator..third party) and gives me an error on my Palm Vx. I am going to post a question on Suns Developer connection. There seems to be some help there.
I will keep you all posted...heh, wish me luck!
Ryan
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ryan!
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay,
I got it. I grabbed some source code from this website, (forgive me, I forgot the link but can post it later). Then I compiled it on my machine using the myriad [sp?] of commands that you use with the KVM, HotSync'd it with my palm and BAM! It worked.
It was just a little app that printed Simple Spotlet on the palm screen. Mind you it was quite simple, but I did modify it a bit and added an Exit button and an Again button to run it more than once and incremented a counter on the screen.
I like this little KVM thing =)
I will try to write something up sometime for those that may want to try, but the website should help too, that where I learned. I did have to tweak it a bit for my setup however.
Here's the link: http://webdev.apl.jhu.edu/~rbe/kvm
Enjoy!!
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spotlets Isn't that cute .
You DO seem to be getting good at this.
If you don't mind I am going to put a link to this thread in the J2ME (Java 2 Micro Edition) forum, since I think that this directly relates to it.
Gotta share the knowledge yaknow! Thanks.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, actually if you were to follow the examples from SUN completely, it may or may not work. Ryan, you got the right link, I been to that link too, what I can say is the guide there is the nearest to make a working example. But I notice there are few minor tweaks you must follow in order to work. Since Ryan didnt mention about the tweaks, I might as well include it here.
Tips and tricks
1. First you need to compile some java apps to convert .class to .prc. My first attempt fails, then I found out, downloading the latest toolkit already have those apps ready.
Go to c:\j2me_cldc\bin\kjava\tools\palm\classes\palm\database.
If you still want to compile it use this:
c:\j2me_cldc\tools\palm\src\palm\database> javac *.java -d c:\j2me_cldc\tools\palm\classes\database
NOTE - make sure this directory exists!!!
---> c:\j2me_cldc\tools\palm\classes\database
Copy the files Wrapper.prc and DefaultTiny.bmp to the new dir.
If it still pops up error then try include jdk1.3/jre/lib/rt.jar in the classpath.
2. To get java -> prc compare the following with examples given by Ryan. *Note* addition class rt.jar and common classpath.
> set path=c:\jdk1.3\bin;%path%
> set allclasspath=".;classes;c:\j2me_cldc\bin\api\classes;c:\jdk1.3\jre\lib\rt.jar"
> set j2meclasspath="c:\j2me_cldc\bin\api\classes;c:\jdk1.3\jre\lib\rt.jar"
> set commonclasspath="c:\j2me_cldc\bin\common\api\classes"
> javac -g:none -d tmp -classpath %allclasspath% -bootclasspath %j2meclasspath% HelloWorld.java
> c:\j2me_cldc\bin\preverify -d classes -classpath %j2meclasspath% tmp
> java -classpath %allclasspath% palm.database.MakePalmApp -v -bootclasspath %j2meclasspath% -classpath classes;%commonclasspath% HelloWorld
If everything is successful then you should get the .prc in some subdir.
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So how does this "sync" thing work? It looks like you set everything up on a PC to look right, and then majic happens ?
 
Enzo Chang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its good to try the examples, but dont get too involved with the development using kjava user interface because it is no longer supported officially. Just read the welcome note in UITest examples included in Sun KVM.
So what is supported now? Sun is coming out with MIDP for Palm
OS.
Well you can take a look at this http://java.sun.com/pr/2000/12/pr001212.html
Thats it... Good Luck
P/s : Knowledge belongs to everyone
 
Enzo Chang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using Hotsync? =) If you have a palm desktop installed then just double click on the .prc file.
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I imported all of the kAWT stuff as well. That seems pretty cool because I was able to use Toolkit and make the thing beep.
I am writing a beaming app right now, but for some reason the KVM isn't receiving the beam even though I do have the beamReceive method. It tries to send fine, but I am working on the receive thing.
Cindy...hehe sorry I posted this question here, I didn't see a J2ME forum.
Talk to ya soon...this stuff is fun!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic