Author Topic: Inner classes  (Read 7080 times)

cwalstad

  • Newbie
  • *
  • Posts: 9
    • View Profile
Inner classes
« on: July 24, 2004, 04:37:32 pm »
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.

GMan

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Inner classes
« Reply #1 on: July 24, 2004, 04:56:34 pm »
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

cwalstad

  • Newbie
  • *
  • Posts: 9
    • View Profile
Inner classes
« Reply #2 on: July 24, 2004, 06:23:34 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: [Select]
evm -cp NameOfJarFile.jar:. NameOfMainClassBut you cannot put all of the files in one jar and create a manifest file then run it using
Code: [Select]
evm -jar NameOfJarFile.jarBecause evm will not recognize the jar flag.


What a pain....

jamesannan

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Inner classes
« Reply #3 on: July 25, 2004, 03:21:59 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

GMan

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • http://
Inner classes
« Reply #4 on: July 25, 2004, 06:48:23 am »
Oops - I meant 'cvm -jar' if you are using the J2ME PP instead of Jeode

cascadefx

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
Inner classes
« Reply #5 on: September 10, 2004, 12:35:56 pm »
Quote
Thanks for your help.

Yes it works to add all of the inner classes to a jar file and then execute it using
Code: [Select]
evm -cp NameOfJarFile.jar:. NameOfMainClassBut you cannot put all of the files in one jar and create a manifest file then run it using
Code: [Select]
evm -jar NameOfJarFile.jarBecause evm will not recognize the jar flag.


What a pain....
What about:

Code: [Select]
evm -classpath /path/to/jar/NameOfJarFile.jar?
Zaurus SL-5600
Sharp 1.0 ROM
256 SanDisk Secure Digital Card (fat16)
Linksys WCF12 wireless card

Omicron

  • Hero Member
  • *****
  • Posts: 608
    • View Profile
    • http://
Inner classes
« Reply #6 on: October 10, 2004, 09:24:00 am »
Quote
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?
« Last Edit: October 10, 2004, 09:24:35 am by Omicron »
"You Shall Not Pass"    
....Gandalf, Lord Of The Rings
--------------------------------------------------------------
C-860 (Cacko), 3x4gb MD  
DLINK 660W, 1GB SD,  
Upgraded Archos AV320 w/80GB HDD
Pocketop and Targus IR keyboards
Favorite Deal Site: SaveCity.net (pretty cool, good deals daily on one page)

rrashkin

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://pwp.t-3.cc/rrashkin
Inner classes
« Reply #7 on: October 12, 2004, 02:17:59 pm »
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.
Bob Rashkin
rrashkin@csc.com
SL5500/Sharp3.1
Targus IR keyboard

jfox

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://FoxFrenchTranslations.com/zaurus
Inner classes
« Reply #8 on: June 21, 2005, 02:11:03 am »
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