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

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Inner classes, How to use them on Zaurus?
cwalstad
post Jul 24 2004, 12:37 PM
Post #1





Group: Members
Posts: 9
Joined: 25-June 04
Member No.: 3,830



So I have this Java program that uses inner classes. When I transfer the class files over to the Zaurus I get the message that filenames cannot be saved with a $ sign in them. I think the Zaurus converts the dollar sign to a %24 or something like that. When I try to run the program the vm fails to find the class. I tried using the terminal to rename the file and replace the %24 with a $ sign. If I do that the file seems to dissapear completely. How can I use inner classes on the Zaurus?

Thanks for your help.
Go to the top of the page
 
+Quote Post
GMan
post Jul 24 2004, 12:56 PM
Post #2





Group: Members
Posts: 35
Joined: 23-February 04
Member No.: 2,009



cwalstad,

Can you jar up your class files from your machine and then transfer the JAR file over to the Z? You can then launch it with the jar file in the classpath or if you are using the J2ME PP, then you can create a manifest to run the program with cvm -jar <jarname>.

-Gary
Go to the top of the page
 
+Quote Post
cwalstad
post Jul 24 2004, 02:23 PM
Post #3





Group: Members
Posts: 9
Joined: 25-June 04
Member No.: 3,830



Thanks for your help.

Yes it works to add all of the inner classes to a jar file and then execute it using
CODE
evm -cp NameOfJarFile.jar:. NameOfMainClass

But you cannot put all of the files in one jar and create a manifest file then run it using
CODE
evm -jar NameOfJarFile.jar

Because evm will not recognize the jar flag.


What a pain....
Go to the top of the page
 
+Quote Post
jamesannan
post Jul 24 2004, 11:21 PM
Post #4





Group: Members
Posts: 119
Joined: 8-July 04
Member No.: 3,955



May not help, but compiling the java on the zaurus itself generates the $ class files and it runs fine...at least that's in my limited experience using kopi on a 860.

James
Go to the top of the page
 
+Quote Post
GMan
post Jul 25 2004, 02:48 AM
Post #5





Group: Members
Posts: 35
Joined: 23-February 04
Member No.: 2,009



Oops - I meant 'cvm -jar' if you are using the J2ME PP instead of Jeode smile.gif
Go to the top of the page
 
+Quote Post
cascadefx
post Sep 10 2004, 08:35 AM
Post #6





Group: Members
Posts: 30
Joined: 10-December 03
Member No.: 1,132



QUOTE(cwalstad @ Jul 24 2004, 02:23 PM)
Thanks for your help.

Yes it works to add all of the inner classes to a jar file and then execute it using
CODE
evm -cp NameOfJarFile.jar:. NameOfMainClass

But you cannot put all of the files in one jar and create a manifest file then run it using
CODE
evm -jar NameOfJarFile.jar

Because evm will not recognize the jar flag.


What a pain....

What about:

CODE
evm -classpath /path/to/jar/NameOfJarFile.jar
?
Go to the top of the page
 
+Quote Post
Omicron
post Oct 10 2004, 05:24 AM
Post #7





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



QUOTE(jamesannan @ Jul 25 2004, 02:21 AM)
May not help, but compiling the java on the zaurus itself generates the $ class files and it runs fine...at least that's in my limited experience using kopi on a 860.

James



Yeah, this works for me as well, even compiling using Eclipse...I use a C860 too.

Perhaps this is a 5500 issue?
Go to the top of the page
 
+Quote Post
rrashkin
post Oct 12 2004, 10:17 AM
Post #8





Group: Members
Posts: 67
Joined: 10-December 03
From: Colorado
Member No.: 1,134



I run on a 5500 with Sharp 3.1. I do most of my compiling on a PC and copy the files (including inner classes) onto my CF or SD card. Never had a problem. I also use KOPI sometimes and also don't have a problem.
How are you transfering the files? If you're using the ZDrive software that might be the problem.
Go to the top of the page
 
+Quote Post
jfox
post Jun 20 2005, 10:11 PM
Post #9





Group: Members
Posts: 13
Joined: 10-December 03
Member No.: 950



The problem is that Jeode will use the jar properly as the classpath, but does not read the manifest file to find the class with "main". So you must say something like:

evm -cp myjar.jar path.to.mymainclass
Go to the top of the page
 
+Quote Post

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

 



RSS Lo-Fi Version Time is now: 22nd October 2014 - 04:17 AM