Reply
Thread Tools
Posts: 75 | Thanked: 1 time | Joined on Apr 2006
#11
Ok, well I found that dpkg -u doesn't work, but dpkg -r does. I have reinstalled all the packages, but still no go.
Can someone give me the exact command line they use to start a java app? Having used Java on other platforms, I think I need to give it a CLASSPATH for it to find the default classes, what is the correct CLASSPATH for this set-up?
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#12
OK, once you've got it installed, here are the commands to get it working:

Code:

$ export PATH=/usr/local/bin:$PATH
$ export CLASSPATH=/usr/local/classpath/share/classpath/glibj.zip:.
$ jikes AWTExample.java
$ jamvm AWTExample
Note that I've linked to a different version of AWTExample.java - the one alongside the JamVM debs has some formatting issues (easily fixed, but this version has them already).

HTH,

Andrew
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#13
Originally Posted by aleksandyr
Screenshots forthcoming: for now, I'm just happy it works.

<snip />

Enjoy.
Excellent work.

From a quick look at the Classpath source code it looks like it should be trivial to Hildonise all AWT applications (at least) automatically.

The main things which need to be done are:
  1. HildonWindows rather than GtkWindows (completes the border to the right of the window)
  2. Setting menus on the window, rather than adding menubars.

The first is straight-forward in native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c, changing gtk_window_new() in _create() to hildon_window_new(). Example in Sylpeed

The second is also straight-forward in native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c in the *MenuBar() functions, mapping them to their HildonWindow equivalents.

I've got code in Sylpheed for taking a Gtk-style menu bar and turning it into a normal GtkMenu which can be used in hildon_window_set_menu().

Is the package source you used to build Classpath available? If so, I'd be happy to try and make these changes myself.

Thanks in advance,

Andrew
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#14
Sorry about the delayed reply.

Just a copy of GNU Classpath's source, very lightly tweaked and crosscompiled in Scratchbox. My linux partition is refusing to boot at the moment: I'll try to extract the source at some point soon --- but really, Classpath was the easy part
 
Posts: 13 | Thanked: 0 times | Joined on Jan 2007
#15
Is JamVM more lightweight or easially portable than Kaffe JVM. It looks like Kaffe runs on IPAQ linux
 
Posts: 90 | Thanked: 32 times | Joined on Sep 2006 @ Bucuresti, Romania
#16
I'm trying to port a custom implementation of J2ME over J2SE to the 770. Unfortunately, starting it with jamvm/classpath 0.91 crashes in the classpath with this error:

[Loaded java/util/logging/SimpleFormatter from /usr/local/classpath/share/classpath/glibj.zip]
[Linking class java/util/logging/SimpleFormatter]
[Created array class [Ljava/util/logging/SimpleFormatter;]
Exception occurred while VM initialising.
java/lang/NullPointerException

Any ideas what to do ? I'm thinking to try and use the classpath-0.93. Does anyone know what version of gtk does scirocco have ? The mistral version I'm using right now has gtk 2.6 which limits me to classpath-0.91.
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#17
Originally Posted by pure View Post
Is JamVM more lightweight or easially portable than Kaffe JVM. It looks like Kaffe runs on IPAQ linux
Yes and yes. Kaffe doesn't compile in scratchbox (yet) and I haven't thrown any cycles at the problem, since Mika and PhoneME came about.
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#18
It's been some time since I revisited these problems, and I figure I owe an update by now

I have abandoned JamVM since it has no JIT. I will be recompiling it against the newest SDK, but it's a dead-end as far as usable Java on ITOS --- extremely useful for testing, however!

I am currently researching Kaffe and Cacao as JIT+JVM solutions. I found out that a Cacao developer managed to get Cacao working on OS2005: however, the ARM optimizations appear to be closed-source and therefore I am not yet able to duplicate this success.

PhoneME lacks a GTK peer, and I lack the GTK knowledge to put one together: furthermore, far more experienced coders appear to be working on this. Classpath, on the other hand, has a GTK+Cairo peer that already works on the 770 and is, as Aflegg notes, quite hildonizable: both Kaffe and Cacao work with Classpath.

For those interested in J2ME support, I recommend http://wiki.java.net/bin/view/Mobile...tformsNokia770

Jikes appears to be suitable for the time being.

Finally, I was able to secure a developer code, and will therefore be supporting the 800 in future endeavors as well as the 770: I promise to make a best-effort attempt to ensure anything I release functions on both platforms.

Here are my current plans:
0) Release fresh AbiWord packages for the 800.
1) Experiment with the new 3.0 SDK.
2) Experiment with the release of PhoneME for the 770.
3) Recompile JamVM/Classpath/Jikes for the latest SDKs: implement basic Classpath hildonization.
4) Get Cacao working (if possible: otherwise, renew Kaffe efforts)
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#19
Hallo guys,

I have repackaged the .deb files so that this Java VM and compiler for Java 1.4 work also on the Nokia N800.

If you guys wish, with permission of the author of course, I can upload it to the maemo downloads (http://downloads.maemo.org)

I will provide links to them asap anyway.

--
anidel
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#20
anidel: did you do any recompilation? Include any auto-Hildonisation for AWT?

I've not yet got a working version of the Classpath source tree to get it a shot.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:06.