OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Swing on SL-6000
deepster
post Oct 14 2004, 01:18 PM
Post #1





Group: Members
Posts: 9
Joined: 14-October 04
Member No.: 5,012



New to the Zaurus and a little to Java, but trying to get a version of Swing working on my 6000. Downloaded swingZ.jar from http://jeffreyrfox.addr.com/zaurus/ and tried to run the sample, but it still could not find swing ( NoClassDefFoundError ). Sounds like a classpath problem, but I believe that I have the simplest config with swingZ.jar and SimpleExample.jar in the same directory and running it with "evm -cp ./swingZ.jar:SimpleClass.jar SimpleClass"

Anyone else got this working on the 6000 or have a better alternative to Swing on Zaurus for the easy creation of dialog windows?

Thanks,
-- Brian
Go to the top of the page
 
+Quote Post
Omicron
post Oct 14 2004, 02:28 PM
Post #2





Group: Members
Posts: 608
Joined: 14-April 04
Member No.: 2,853



QUOTE(deepster @ Oct 14 2004, 04:18 PM)
New to the Zaurus and a little to Java, but trying to get a version of Swing working on my 6000. Downloaded swingZ.jar from http://jeffreyrfox.addr.com/zaurus/ and tried to run the sample, but it still could not find swing ( NoClassDefFoundError ). Sounds like a classpath problem, but I believe that I have the simplest config with swingZ.jar and SimpleExample.jar in the same directory and running it with "evm -cp ./swingZ.jar:SimpleClass.jar SimpleClass"

Anyone else got this working on the 6000 or have a better alternative to Swing on Zaurus for the easy creation of dialog windows?

Thanks,
-- Brian



Shouldn't that be ? :

"evm -cp ./swingZ.jar:./SimpleClass.jar SimpleClass"
Go to the top of the page
 
+Quote Post
freizugheit
post Oct 14 2004, 11:05 PM
Post #3





Group: Members
Posts: 409
Joined: 7-November 03
Member No.: 811



Give EWE VM at http://www.ewesoft.com/M2.htm a try.
Go to the top of the page
 
+Quote Post
deepster
post Oct 15 2004, 04:06 AM
Post #4





Group: Members
Posts: 9
Joined: 14-October 04
Member No.: 5,012



Omicron - Guess that depends on what your environment settings are. I am set to serach the present working directory, so ./SimpleExample.jar = SimpleExample.jar

freizugheit - Thanks, will give that a look.

Anyone else get Swing working on th 6000?
Go to the top of the page
 
+Quote Post
deepster
post Oct 15 2004, 04:57 AM
Post #5





Group: Members
Posts: 9
Joined: 14-October 04
Member No.: 5,012



Well, my problem was (of course) a dumb path problem. But, once I solved that, I ran into an error

java.lang.NoSuchMethodError:
java/awt/Component.getPeer()Ljava/awt/peer/ComponentPeer;

See http://groups.google.com/groups?hl=en&lr=&....com%26rnum%3D1

if you run into this.

Thanks,
-- Brian
Go to the top of the page
 
+Quote Post
smuelas
post Oct 24 2004, 08:03 AM
Post #6





Group: Members
Posts: 110
Joined: 15-October 04
Member No.: 5,026



I have swing running (compiling and running) with no problems on my 6000.
If anyone needs help, I will be delighted to help.
Santiago Muelas (smuelas@telefonica.net)
Go to the top of the page
 
+Quote Post
AsLan^
post May 20 2005, 08:20 PM
Post #7





Group: Members
Posts: 45
Joined: 3-June 04
From: Seoul, Korea
Member No.: 3,555



QUOTE(smuelas @ Oct 24 2004, 08:03 AM)
I have swing running (compiling and running) with no problems on my 6000.
If anyone needs help, I will be delighted to help.
Santiago Muelas    (smuelas@telefonica.net)
*


Hi smuelas, I can compile a swing application using jikes and swingZ.jar from http://foxfrenchtranslations.com however I cannot get it to run with the stock jeode (evm) on my 6000. I get the same error as the others but I didnt see anything helpful in the link posted by deepster. Any help would be welcome.

Thank you
Go to the top of the page
 
+Quote Post
smuelas
post May 22 2005, 03:05 AM
Post #8





Group: Members
Posts: 110
Joined: 15-October 04
Member No.: 5,026



Hi Aslan,
The only thing that I can tell you is that I've never been able to run satisfactorily "jikes" in my Zaurus. It gives always mistakes with calculations a.s.o. What I do is what follows:
1- I have the "classes.zip" from blackdown's java 1.1.8 and the swingZ.jar in my card.
2- I compile with: evm -cp /mnt/cf/classes.zip:/mnt/cf/swingZ.jar:. sun.tools.javac.Main Myprogram.java
3- I run the compiled program with: evm -cp /mnt/cf/classes.zip:/mnt/cf/swingZ.jar:. Myprogram

Doing that, I've been able to run quiet big Finite Element programs using swing-sliders and all type of buttons, borders, a.s.o.

The other "nice" point about that is that running Debian with Xqt, I have jdk1.1.8 installed. When in Debian, I run the application with: java -classpath /swingZ.jar:. My program
and when in Qtopia as I'have said at the beginning. Compiling from Debian or from Qtopia works o.k. for the other one.

If you have any more problem, please contact me. Good luck
Smuelas
Go to the top of the page
 
+Quote Post
AsLan^
post May 23 2005, 04:53 AM
Post #9





Group: Members
Posts: 45
Joined: 3-June 04
From: Seoul, Korea
Member No.: 3,555



Hi smuelas, I tried a couple of different classes.zip from the blackdown java 1.1.8 jdk, specifically i386 v3, arm v1, and arm v2 and I got the same error each time while trying to compile...

java.lang.NoSuchMethodError: java.lang.Character: method isJavaLetterOrDigit┬ęZ not found

followed by at sun.tools.blah for about ten lines.

Any ideas ? is there a specific version of classes.zip that I should be using ?

Thanks for your help smile.gif

oh and the program I am trying to compile is very simple... its from a java textbook.

import javax.swing.*;

/**
A simple demo of a window with swing
*/

public class FirstSwingDemo
{
public static final int WIDTH = 300;

public static final int HEIGHT = 200;

public static void main(String[] args)
{
JFrame myWindow = new JFrame();
myWindow.setSize(WIDTH, HEIGHT);

JLabel myLabel = new JLabel("Please dont click that button");

myWindow.getContentPane().add(myLabel);

WindowDestroyer myListener = new WindowDestroyer();
myWindow.addWindowListener(myListener);

myWindow.setVisible(true);

}

}
Go to the top of the page
 
+Quote Post
smuelas
post May 25 2005, 02:09 PM
Post #10





Group: Members
Posts: 110
Joined: 15-October 04
Member No.: 5,026



Hi Aslan,
I've tried your class and it works o.k. in the Zaurus. BUT, I've removed the lines:

WindowDestroyer myListener = new WindowDestroyer();
myWindow.addWindowListener(myListener);

as I've never heard about a class called "WindowDestroyer".
If you want to "destroy" your class when closing the window, just add instead of this 2 lines, what follows:

addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0); }
});

Anyway, the class runs with no problems. If you are unable to run it, tell me and I will put my "classes.zip" and "swingZ.jar" somewhere for you to download it. O.K.? :-)

Smuelas
Go to the top of the page
 
+Quote Post
AsLan^
post May 26 2005, 06:43 PM
Post #11





Group: Members
Posts: 45
Joined: 3-June 04
From: Seoul, Korea
Member No.: 3,555



Hi smuelas,

well I tried removing the WindowDestroyer lines but no dice, I still get the same error. Could you please post your classes.zip and swingZ.jar I would be most grateful.

Also, thanks for the code tidbit smile.gif
Go to the top of the page
 
+Quote Post
smuelas
post May 29 2005, 10:18 PM
Post #12





Group: Members
Posts: 110
Joined: 15-October 04
Member No.: 5,026



Hi Asland, I have put "classes.zip" and "swingZ.jar", both of them in a new compressed package with the name "myjava.zip", in my Debian-Xqt page at
http://w3.mecanica.upm.es/~smuelas/debianxqt.html
Try it.
Regards
Smuelas
Go to the top of the page
 
+Quote Post
AsLan^
post May 30 2005, 02:16 AM
Post #13





Group: Members
Posts: 45
Joined: 3-June 04
From: Seoul, Korea
Member No.: 3,555



Thank you for taking the time to post that, unfortunately I still get the same error !

Perhaps its my JVM... evm -showversion displays

java version "J2ME Personal Profile for Zaurus 1.0"
J2ME Personal Profile 1.0 (build 1.0_fcs-b25)
J2ME CDC-HI 1.0_v01

Is this the same as yours ?
Go to the top of the page
 
+Quote Post
smuelas
post May 30 2005, 05:19 AM
Post #14





Group: Members
Posts: 110
Joined: 15-October 04
Member No.: 5,026



Well, don't mind. If you have just said this at the beginning :-(
What you have is the "personal profile" from Sun. This is a more limited Java than Jeode, and you can't run Swing (to my knowledge) with it.
You should have to uninstall j2me but, perhaps, this is a little bit too complicated for you as it is included with the rom for Z-6000.Instead, try to
get Jeode and install it. A small problem could be that the JVM that you have runs with the instruction "cvm" but there is a link from "cvm" to "evm". If everything goes o.k. you will have cvm in /home/QtPalmtop/j2me/bin/cvm (with a possible link to evm). The "true" evm (the one from Jeode) will be in /home/QtPalmtop/bin/evm.
To use this one it can be convenient to create an alias in your " .bashrc " file in the /home/zaurus directory. You can write a line with:
alias evm='/home/QtPalmtop/bin/evm -cp /path to/myjava.zip:.'
in such a way that you don't have to care anymore about "classes.zip" and/or "swingZ.jar". To compile it should be enough to write:
evm sun.tools.javac.Main Yourprogram.java
And to run it: evm Yourprogram
Perhaps I've said something wrong, but I cannot test it now as I'm not at home.
Just, try it and tell me the result. :-)
And be optimistic: finally, you will run some swing classes. For sure
Smuelas
Go to the top of the page
 
+Quote Post
AsLan^
post May 30 2005, 03:13 PM
Post #15





Group: Members
Posts: 45
Joined: 3-June 04
From: Seoul, Korea
Member No.: 3,555



smuelas, you sir, are the man !

it all works now ! I cant believe I never noticed that jeode and personal java were two seperate programs !

Thank you for all your help,

AsLan^ smile.gif
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd July 2014 - 01:21 PM