Author Topic: Sun J2me Kvm Available  (Read 13406 times)

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2me Kvm Available
« on: November 10, 2005, 05:15:24 pm »
I've always wondered why Sun provides JVM's for WinCE while we still don't have a decent up-to-date Java runtime environment... so I downloaded the source code of their smallest available JVM, especially targeted to devices with limited memory, processing power etc. Just to see if it can be build for the Zaurus.

Quote
K virtual machine (KVM) is a Java virtual machine that provides the basis for the CLDC reference implementation (RI). K stands for "Kilobyte" virtual machine, referring to the small footprint of the platform. The K virtual machine is very small -- starting from approximately 70K in size.
So much for the bla bla, attached a version compiled for pdaXrom RC11+. I've only just been succesful in building the code, so give it a try and see for yourself if it works.

I guess you guys have to do the testing  

The virtual machine: (untar)
The runtime classes:  [ Invalid Attachment ]  (DON'T unzip!)
[div align=\"center\"]== == == == == == == == == == == == == ==
www.omegamoon.com
Zaurus SL-C750 - Died in a dreadful coffee experiment, has a second life somewhere in the Czech Republic
Zaurus SL-C1000 - Multiboot Zubuntu, Debian, Fedora, Poky, Android and others
Zaurus SL-C3100 - Development device, currently Zubuntu 2.0
Zaurus SL-6000L - The fridge is running Zubuntu 1.0
Zaurus SL-C860 - Cacko, untouched since kindly donated, waiting for Zubuntu
== == == == == == == == == == == == == ==[/div]

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Sun J2me Kvm Available
« Reply #1 on: November 10, 2005, 08:40:08 pm »
Quote
I've always wondered why Sun provides JVM's for WinCE while we still don't have a decent up-to-date Java runtime environment... so I downloaded the source code of their smallest available JVM, especially targeted to devices with limited memory, processing power etc. Just to see if it can be build for the Zaurus.

Quote
K virtual machine (KVM) is a Java virtual machine that provides the basis for the CLDC reference implementation (RI). K stands for "Kilobyte" virtual machine, referring to the small footprint of the platform. The K virtual machine is very small -- starting from approximately 70K in size.
So much for the bla bla, attached a version compiled for pdaXrom RC11+. I've only just been succesful in building the code, so give it a try and see for yourself if it works.

I guess you guys have to do the testing  

The virtual machine:  [ Invalid Attachment ]  (untar)
The runtime classes:  [ Invalid Attachment ]  (DON'T unzip!)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103205\"][{POST_SNAPBACK}][/a][/div]
looking forward to it
Java and kphone are both great additions, thanks

ANy hope of a firefox java plugin?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2me Kvm Available
« Reply #2 on: November 11, 2005, 07:11:13 pm »
For J2ME there are currently two configurations:
The CLDC is meant to be used on Mobile Phones and entry level PDA's. It uses KVM as virtual machine. Well, it's *very* simple, but it can be done, I've proven that much  

The other J2ME configuration is the CDC, targeted at high-end PDA's, set-top boxes and embedded devices. The runtime Personal Profile for Zaurus can be downloaded here from the Sun site, is still an early access product, and is so for at least a few years now. Apart from that, it's build for the original Sharp (QT) ROM.

So, I'm currently in the process of (re)building the CDC JVM for pdaXrom. The building has been succesfully done, but it seems I have tweaked the code a bit to much  so some more work has to be done.

After that, the Foundation Profile (non-GUI) and the Personal Profile (GUI) have to be build. The Personal Profile has to be rebuild with X11 into mind. This seems to be a question of adjusting the building parameters somewhat. At least I hope so  

adf: A browser plugin is part of the fullblown J2SE, so I guess the answer to your question is no .

I hope these efforts are useful for others as much as they are learnful to me  That depends of course whether or not I will be able to post some nice IPK's here  

Wish me luck!

cortez
[div align=\"center\"]== == == == == == == == == == == == == ==
www.omegamoon.com
Zaurus SL-C750 - Died in a dreadful coffee experiment, has a second life somewhere in the Czech Republic
Zaurus SL-C1000 - Multiboot Zubuntu, Debian, Fedora, Poky, Android and others
Zaurus SL-C3100 - Development device, currently Zubuntu 2.0
Zaurus SL-6000L - The fridge is running Zubuntu 1.0
Zaurus SL-C860 - Cacko, untouched since kindly donated, waiting for Zubuntu
== == == == == == == == == == == == == ==[/div]

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Sun J2me Kvm Available
« Reply #3 on: November 11, 2005, 07:37:47 pm »
Quote
For J2ME there are currently two configurations:
The CLDC is meant to be used on Mobile Phones and entry level PDA's. It uses KVM as virtual machine. Well, it's *very* simple, but it can be done, I've proven that much   

The other J2ME configuration is the CDC, targeted at high-end PDA's, set-top boxes and embedded devices. The runtime Personal Profile for Zaurus can be downloaded here from the Sun site, is still an early access product, and is so for at least a few years now. Apart from that, it's build for the original Sharp (QT) ROM.

So, I'm currently in the process of (re)building the CDC JVM for pdaXrom. The building has been succesfully done, but it seems I have tweaked the code a bit to much  so some more work has to be done.

After that, the Foundation Profile (non-GUI) and the Personal Profile (GUI) have to be build. The Personal Profile has to be rebuild with X11 into mind. This seems to be a question of adjusting the building parameters somewhat. At least I hope so  

adf: A browser plugin is part of the fullblown J2SE, so I guess the answer to your question is no .

I hope these efforts are useful for others as much as they are learnful to me  That depends of course whether or not I will be able to post some nice IPK's here   

Wish me luck!

cortez
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103387\"][{POST_SNAPBACK}][/a][/div]


Good luck,
and... full konqueror from kde 3.4 (which is available for rc 10, at least) uses the machines jvm rather than a browser plugin, right? Any hope with kvm/konqueror?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

smuelas

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Sun J2me Kvm Available
« Reply #4 on: November 15, 2005, 08:09:28 am »
Quote
So, I'm currently in the process of (re)building the CDC JVM for pdaXrom. The building has been succesfully done, but it seems I have tweaked the code a bit to much  so some more work has to be done.
..........
I hope these efforts are useful for others as much as they are learnful to me  That depends of course whether or not I will be able to post some nice IPK's here   

Wish me luck!

cortez
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103387\"][{POST_SNAPBACK}][/a][/div]

I haven't seen this thread before. I think that your job can be wonderful. Just, a few minutes before I was writing to someone in here asking him what is the strange story about Java.
Now, I see that you are doing it "the hard way". Up to yesterday that I changed my "qtopia-debian+xqt" to pdaXrom, I used without any problem the standard Java complete from Blackdown, so jdk-1.1.8 plus SwingZ.jar. I wrote some applications on the SL-6000 and compiled them, and after they runned wonderfully in my desktop with JDK-1.5. Also on the Zaurus.
I have tried to do the same with pdaXrom but it seems that there are changes in some libraries in relation to Debian ones. I am unable to run java with graphics or frames, windows...etc. There is a permanent "Segmentation Fault" message when I try it.
Wouldn't be easier for you to try to arrange the way for jdk-1.1.8 to be able to run on pdaxrom?
Note that the combination of this "old" version plus Swing gives you an almost complete java sdk, able to do almost everything you do today with the last versions. And it runs quite satisfactorily in Zauruses...
Anyway, thanks a lot for your effort. I have download your kvm and will try it.
smuelas
Zaurus SL-6000  --  Microdrive Hitachi 6Gb placed permanently on CF slot.

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Sun J2me Kvm Available
« Reply #5 on: November 15, 2005, 09:07:36 am »
Quote
Quote
So, I'm currently in the process of (re)building the CDC JVM for pdaXrom. The building has been succesfully done, but it seems I have tweaked the code a bit to much  so some more work has to be done.
..........
I hope these efforts are useful for others as much as they are learnful to me  That depends of course whether or not I will be able to post some nice IPK's here   

Wish me luck!

cortez
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103387\"][{POST_SNAPBACK}][/a][/div]

I haven't seen this thread before. I think that your job can be wonderful. Just, a few minutes before I was writing to someone in here asking him what is the strange story about Java.
Now, I see that you are doing it "the hard way". Up to yesterday that I changed my "qtopia-debian+xqt" to pdaXrom, I used without any problem the standard Java complete from Blackdown, so jdk-1.1.8 plus SwingZ.jar. I wrote some applications on the SL-6000 and compiled them, and after they runned wonderfully in my desktop with JDK-1.5. Also on the Zaurus.
I have tried to do the same with pdaXrom but it seems that there are changes in some libraries in relation to Debian ones. I am unable to run java with graphics or frames, windows...etc. There is a permanent "Segmentation Fault" message when I try it.
Wouldn't be easier for you to try to arrange the way for jdk-1.1.8 to be able to run on pdaxrom?
Note that the combination of this "old" version plus Swing gives you an almost complete java sdk, able to do almost everything you do today with the last versions. And it runs quite satisfactorily in Zauruses...
Anyway, thanks a lot for your effort. I have download your kvm and will try it.
smuelas
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103759\"][{POST_SNAPBACK}][/a][/div]

Just mentioning :
I have been running "jabp" on pdaXrom. I can't remember which java program I used. At the time (a few moons back) I was running rc10 and had "jamvm" and "jikes" installed from unstable feed, as well as java blackdown 1.3.1 from "Chris Double's radio weblog". It only worked with one of them, and I think I copied some files from one to the other. (I really should keep notes of what i'm doing, but most of the time I'm too lazy to do so. It's a good thing a lot is saved in these forums).

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2me Kvm Available
« Reply #6 on: November 15, 2005, 02:51:16 pm »
adf: Maybe I'll try Konquerer later, but first I will concentrate on this "project". kvm wouldn't work anyway, because it lacks the graphical capability needed. Maybe JamVM+Classpath works, but that needs further investigation.

smuelas: I'm not going to put a lot of effort in trying to get a closed source thing like Blackdown to work.

There seems to be a general need for full Swing support. First step in trying to achieve that is rebuilding J2ME. It has to work, because the J2ME-JVM source was build before by Sun (the early access version) for Qt. What I'm trying to do here is to rebuild it for pdaXrom, using X11. It's just a matter of reconfiguration. Building J2SE-JVM seems not to be an option, simply because the source lacks support for arm-linux.

Main difference between J2ME and J2SE are in java.awt and the omission of javax.swing. I don't know if Swing can be build seperately for use in J2ME, but I will certainly give it a try!

So, back to work now. I'll keep you updated!
[div align=\"center\"]== == == == == == == == == == == == == ==
www.omegamoon.com
Zaurus SL-C750 - Died in a dreadful coffee experiment, has a second life somewhere in the Czech Republic
Zaurus SL-C1000 - Multiboot Zubuntu, Debian, Fedora, Poky, Android and others
Zaurus SL-C3100 - Development device, currently Zubuntu 2.0
Zaurus SL-6000L - The fridge is running Zubuntu 1.0
Zaurus SL-C860 - Cacko, untouched since kindly donated, waiting for Zubuntu
== == == == == == == == == == == == == ==[/div]

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Sun J2me Kvm Available
« Reply #7 on: November 15, 2005, 05:00:10 pm »
tried jamvm.... no good, but since I have no real clue what i'm doing, the problem could very well be me.
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Sun J2me Kvm Available
« Reply #8 on: November 15, 2005, 06:26:17 pm »
if you have a j2me running on pdaxrom, then you could add swing by adding SwingZ.jar and the extra files required by blackdown, ie additional-ipq-stuff.tar.gz and you also need libawt.so
haven't tried this yet because I don't have pdaxrom installed yet, but that's what I intend to try out once I have pdaxrom which hopefully will be soon.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

smuelas

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Sun J2me Kvm Available
« Reply #9 on: November 16, 2005, 08:55:28 am »
Quote
if you have a j2me running on pdaxrom, then you could add swing by adding SwingZ.jar and the extra files required by blackdown, ie additional-ipq-stuff.tar.gz and you also need libawt.so
haven't tried this yet because I don't have pdaxrom installed yet, but that's what I intend to try out once I have pdaxrom which hopefully will be soon.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103825\"][{POST_SNAPBACK}][/a][/div]
Hi Meanie, Cortez
I have very good news (or perhaps, not so good...). A complete version of j2sdk-1.3.1 is running at the moment in my SL-6000.  There is a package "ipk" with j2re-1.3.1 from blackdown. The only thing to do is to download and install it. My sugestion is to do it in /mnt/cf or sd as it is quite big. It comes with all the needed libraries. It will be installed in /mnt/cf/usr/local/j2sdk1.3.1, so add to your PATH the needed directory with:
export PATH=$PATH:/mnt/cf/usr/local/j2sdk1.3.1/bin  (I know yu know how already but perhaps others don't)
and the REAL JVM is yours. I have found a known bug: when launching some application there is a message (long message) about the fons. But the application opens wonderfully.
I will continue this message in a few moments. I have to look at the URL where you can download the ipk.

smuelas
Zaurus SL-6000  --  Microdrive Hitachi 6Gb placed permanently on CF slot.

smuelas

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Sun J2me Kvm Available
« Reply #10 on: November 16, 2005, 09:37:00 am »
I continue, sorry.
But before I want to thank Pgas for his help. My first contact with pdaXrom was the day before yesterday. I had some troubles and I put a message on this list. Pgas answered me and in a very few lines he solved all my problems, including Java. Grreat guy, Pgas!!

You can download jre from
http://www.double.co.nz/zaurus/blackdown-jdk_1.3.1_arm.ipk

The next point is to be able to compile *.java files in the Z. For doing that, you need to download the original j2sdk-1.3.1 from blackdown.org. There is no such thing for arm. You must do it for i386. It is a compressed tar package. Unpack it wherever you want. Then, find the file "tools.jar" and move or copy it to the zaurus. It should be included in your:  /usr/local/j2re1.3.1/lib/ext/  . Nothing more.
Then, create 3 files in j2re1.3.1/bin with the names: "javac", "jar", and "appletviewer". Edit them.  Only one line for each one. For "javac" write:
java sun.tools.javac.Main $1
For "jar", almost the same:
java sun.tools.jar.Main $1
and for "appletviewer", just write
java sun.applet.AppletViewer $1
and that's all. If you have stablished your PATH you can compile your *.java files with javac. You can create java-packages with jar and launch and view your applets with appletviewer. Nice, isn't it..
 Sorry, I forgot. Don't forgat to make your scripts executables with:
chmod +x javac
and so on.

smuelas
Zaurus SL-6000  --  Microdrive Hitachi 6Gb placed permanently on CF slot.

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Sun J2me Kvm Available
« Reply #11 on: November 16, 2005, 06:51:51 pm »
Quote
I continue, sorry.
But before I want to thank Pgas for his help. My first contact with pdaXrom was the day before yesterday. I had some troubles and I put a message on this list. Pgas answered me and in a very few lines he solved all my problems, including Java. Grreat guy, Pgas!!

You can download jre from
http://www.double.co.nz/zaurus/blackdown-jdk_1.3.1_arm.ipk

The next point is to be able to compile *.java files in the Z. For doing that, you need to download the original j2sdk-1.3.1 from blackdown.org. There is no such thing for arm. You must do it for i386. It is a compressed tar package. Unpack it wherever you want. Then, find the file "tools.jar" and move or copy it to the zaurus. It should be included in your:  /usr/local/j2re1.3.1/lib/ext/  . Nothing more.
Then, create 3 files in j2re1.3.1/bin with the names: "javac", "jar", and "appletviewer". Edit them.  Only one line for each one. For "javac" write:
java sun.tools.javac.Main $1
For "jar", almost the same:
java sun.tools.jar.Main $1
and for "appletviewer", just write
java sun.applet.AppletViewer $1
and that's all. If you have stablished your PATH you can compile your *.java files with javac. You can create java-packages with jar and launch and view your applets with appletviewer. Nice, isn't it..
 Sorry, I forgot. Don't forgat to make your scripts executables with:
chmod +x javac
and so on.

smuelas
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103899\"][{POST_SNAPBACK}][/a][/div]

You can get rid of the annoying font messages by editing font.properties and commenting out all the lines containing adobe.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

smuelas

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Sun J2me Kvm Available
« Reply #12 on: November 17, 2005, 09:31:45 am »
Quote
You can get rid of the annoying font messages by editing font.properties and commenting out all the lines containing adobe.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103961\"][{POST_SNAPBACK}][/a][/div]

Thanks Meanie. Already done!
Apart from that, I'm testing the difference between the combination jdk118+swingZ.jar and the all new j2se131, and I'm not very satisfied.
The problem, in my very humble opinion, is that "tools.jar" is a huge thing. For compiling anything, it takes quite a lot of time and it's not precisely a thunder at running time.
It is necessary to be much more precise at programming time. For example, in my laptop, if I'm using swing, I write at the beginning:
import javax.swing.*;
and then, when needed, I write something like:
JPanel myPanel = new JPanel();
All that due to the fact that I don't use any kind of Eclipse or JBorland or Netbeans...

If used in the zaurus, it is very important to write the whole path everytime, and only import what will be used. For the example above, it would be:

import javax.swing.JPanel;
.....................................
javax.swing.Jpanel myPanel = new javax.swing.JPanel();

Anyway, the combination jdk118+swingZ.jar works quicker and better.

What do you think if we do (between you and myself and any other that would want) a new distribution of a serious, complete JDK for Zauruses?
My idea is to have something like Personal Java but bigger and with a complete AWT and the most used Swing and Java2. There are a lot of classes that are not used almost never. So, one aspect would be to remove everything unnecesary.
You have done already something very similar, so your work could be the start-up to begin with.
My personal interest is "profesional educational scientific programming" (it sounds impressive!!). So, Kopi, for example, but also Jikes, do not compile o.k. if using intensive float operations with double numbers, parsing text to double and all that stuff.
Another point is the "slowness" of zauruses in moving screen-pixels. So, I'm afraid that a part of the software should be done using the primitives for the framebuffer and/or the X's. Surely, those great guys from pdaXrom would be an enormous help.

I look forward to your ideas about all that.

smuelas
Zaurus SL-6000  --  Microdrive Hitachi 6Gb placed permanently on CF slot.

sashz

  • Sr. Member
  • ****
  • Posts: 388
    • View Profile
    • http://
Sun J2me Kvm Available
« Reply #13 on: November 17, 2005, 11:31:47 am »
Hello

i compiled midp2 kvm for zaurus. Only ssl stuff unsupported because sun excluded it from source pack. Also i fixed bug in Xserver for 16 bits chars (need was fix it before  ).
If you like it i will upload for your testing.

screens attached
« Last Edit: November 17, 2005, 12:11:30 pm by Laze »

plcg

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • http://
Sun J2me Kvm Available
« Reply #14 on: November 17, 2005, 04:52:55 pm »
Quote
Hello

i compiled midp2 kvm for zaurus. Only ssl stuff unsupported because sun excluded it from source pack. Also i fixed bug in Xserver for 16 bits chars (need was fix it before  ).
If you like it i will upload for your testing.

screens attached
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104056\"][{POST_SNAPBACK}][/a][/div]
Hello sashz,

I would like to test midp2 kvm.
Can you upload it, please ?

Thanks,
plcg
C760 & Pdaxrom 1.1.0beta1 / Transcend 512 MB CF
C1000 & Cacko 1.23 full / PQI 1 GB SD/ Hitachi 2GB microdrive
Linksys WCF12 CF WiFi Card