Author Topic: Java.net (1.4 Spesifications) Incompatible  (Read 13294 times)

acidmoose

  • Newbie
  • *
  • Posts: 4
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« on: October 06, 2005, 08:07:12 am »
I have successfully installed blackdown 1.3.1 on my Zaurus SL-C3100, and I´m trying to run a program originally intended for java 1.4.x and above...

My problem is this:
java.lang.NoClassDefFoundError: java/net/SocketAddress
   at....
   at....
   and so on.

After some searching I found that the problem is this:
SocketAddress is apparently a java 1.4 spesific class, and has been reorganized from the jnet package in java 1.3.

So is it possible to download some libraries or packages, for a workaround so that I don´t have to reprogram everything? Could someone direct me in any direction, as I´m currently quite stuck...

Thanks

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Java.net (1.4 Spesifications) Incompatible
« Reply #1 on: October 06, 2005, 04:25:09 pm »
Look into GNU Classpath to see if all classes needed to run your program are implemented. If so, I could update JamVM and/or SableVM in combination with GNU Classpath.
That is... if you're using PdaXrom  
[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]

sds

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #2 on: October 06, 2005, 07:14:23 pm »
cortez, firstly many thanks for your efforts on jamvm, jikes and classpath around the end of the last year. I've installed them from your ipks in the unstable feed and am using them on a daily basis.

However, they are already a bit dated. So if you please make a short howto for your setup for compiling and packaging them, I promise to update them every 3 months or on a major release as I will most definitely need a recent version for myself anyway.
C3100 pdaXrom

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Java.net (1.4 Spesifications) Incompatible
« Reply #3 on: October 07, 2005, 10:26:02 am »
You're right, the versions from the unstable feed need to be updated. For some instructions on how to compile this stuff see my comments in this thread

I will look into this. I wasn't aware of the fact that it was used that much  
[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]

sds

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #4 on: October 08, 2005, 11:49:50 am »
Hmmm, I decided to use the native RC11 SDK in zgcc-3.4.4.img  which I verified to work by building, packaging and running the example at:
http://www.pdaxrom.org/index.php?showid=35&menuid=1

However, when I try to build classpath-0.18 with jikes 1.22 from unstable, configure and make seem to complete fine, but make install fails:
Code: [Select]
[lax:0:src/classpath/classpath-0.18> make DESTDIR=ipkg_tmp install
Making install in lib
make[1]: Entering directory `/mnt/card/src/classpath/classpath-0.18/lib'
true
top_builddir=.. top_srcdir=.. /bin/sh ./gen-classlist.sh standard
Adding java source files from srcdir '..'.
Adding java source files from VM directory ../vm/reference
if test "" != ""; then  -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
make[2]: Entering directory `/mnt/card/src/classpath/classpath-0.18/lib'
true
top_builddir=.. top_srcdir=.. /bin/sh ./gen-classlist.sh standard
Adding java source files from srcdir '..'.
Adding java source files from VM directory ../vm/reference
make[2]: Nothing to be done for `install-exec-am'.
if test "" != ""; then  -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
test -z "/usr/local/classpath/share/classpath" || /bin/sh ../mkinstalldirs "ipkg_tmp/usr/local/classpath/share/classpath"
 /usr/bin/ginstall -c -m 644 './glibj.zip' 'ipkg_tmp/usr/local/classpath/share/classpath/glibj.zip'
/usr/bin/ginstall: cannot stat `./glibj.zip': No such file or directory
make[2]: *** [install-pkgdataDATA] Error 1
make[2]: Leaving directory `/mnt/card/src/classpath/classpath-0.18/lib'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/mnt/card/src/classpath/classpath-0.18/lib'
make: *** [install-recursive] Error 1
[lax:2:src/classpath/classpath-0.18>

Before I dive in the Makefile, maybe I am missing smth obvious?
C3100 pdaXrom

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Java.net (1.4 Spesifications) Incompatible
« Reply #5 on: October 08, 2005, 01:24:31 pm »
not sure what the problem is, though I remember having problems when setting DESTDIR to a relative path. prefer make DESTDIR=/..../ipkg-tmp.

Also not all makefiles like the DESTDIR argument.

Another idea, in there:
Code: [Select]
if test "" != ""; then  -r -D glibj.zip gnu java javax org META-INF > /dev/null; fi
it seems to me that maybe something is missing ( the command "zip"?)

we should ask an admin to move the last posts into a new thread....
« Last Edit: October 08, 2005, 01:25:23 pm by pgas »
SLC-860 cacko / senao wifi

Borealid

  • Newbie
  • *
  • Posts: 46
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #6 on: October 08, 2005, 02:59:16 pm »
Since there's interest, I've built Jikes, Classpath, and JamVM from source.  These are all PdaXrom RC-11/12, built with -O2 -mtune=iwmmxt -mcpu=iwmmxt.  Have fun.

Also included are two scripts, "java" and "javac", which run jamvm and jikes respectively with the arguments needed to make them work.

If you install to an alternate destination remember to create the correct symlinks.

Classpath is a hair too big to post here normally (5.2MB), so I've split it into two files.  Download them all to the same directory, and combine them like this:

$ tar xvzf usrlibinclude.tar.gz
$ tar xvzf usrshare.tar.gz
$ tar czvf classpath_0.18_armv5tel.ipk debian-binary control.tar.gz usr

Then you'll have a .ipk you may install normally.

Remember the symlinks if you use ipkg -d!

The included scripts may also may not work for strange classpaths.  They're just one-line hacks.  Feel free to rewrite them.

Borealid

  • Newbie
  • *
  • Posts: 46
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #7 on: October 08, 2005, 03:00:48 pm »
Here's the remaining piece of classpath.

reinci

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://ore.sourceforge.net
Java.net (1.4 Spesifications) Incompatible
« Reply #8 on: October 11, 2005, 12:40:27 pm »
Hello everybody!

I'm a new user of Zaurus, my first Z is SL-C3000, and the first I've noticied is that there isn't a JavaVM installed on it.

I would like to install a JVM 1.4 as minimum, 'cause I'm working in a project that uses that version of Java, but I can't find any JVM with such version...

Somebody could help me?  Thank yoy very much

Borealid

  • Newbie
  • *
  • Posts: 46
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #9 on: October 11, 2005, 05:34:46 pm »
I believe that at this point the best you'll be able to do is GNU Classpath.  Classpath 0.8 is mostly compatible with Java 1.4.  Mostly.  Not completely.  But currently there's nothing better for an ARM system.

sds

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #10 on: October 12, 2005, 10:54:54 am »
I would actually prefer to try compiling and packaging native myself, but this is indeed better kept for another forum and thread...

Thanks for the packages!
Unfortunately I have problems installing them.
Code: [Select]
[lax:0:mnt/card/ipks> ls -l
-rw-r--r--    1 root     root        72332 Oct 11 21:56 JamVM_1.3.3_armv5tel.ipk
-rw-r--r--    1 root     root      5348952 Oct 11 22:05 classpath_0.18_armv5tel.ipk
-rw-r--r--    1 root     root       600651 Oct 11 21:57 jikes_1.22_armv5tel.ipk
[lax:0:mnt/card/ipks> ipkg install JamVM_1.3.3_armv5tel.ipk
tar: ./control.tar.gz: Not found in archive
tar: Error exit delayed from previous errors

zcat: stdin: unexpected end of file
mv: unable to rename `//home/tmp/ipkg/JamVM/control/*': No such file or directory
[lax:1:mnt/card/ipks> df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock/2         102400     59912     42488  59% /
none                     12288        28     12260   0% /dev/shm
/dev/mtdblock/3          21504      2868     18636  13% /home
/dev/mmcd/disc0/part1   984152    423284    510876  45% /mnt/card
/dev/loop2               61528     61528         0 100% /opt/native/arm/3.4.4-xscale-softvfp
[lax:0:mnt/card/ipks>    
Although seems like control.tar.gz is present in the ipk?
The GUI package manager (qpkg) also does not install them, but silently drops.
Any clues?

Also, what is the benefit of compiling with the iWMMXT extensions? I am a total newbie on the topic, but AFAIK they are for multimedia playback and battery life optimization -- how is that of interest for a jvm/classlib and a compiler?
C3100 pdaXrom

Borealid

  • Newbie
  • *
  • Posts: 46
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #11 on: October 12, 2005, 11:47:37 am »
You may have a corrupt download, or perhaps an old version of ipkg...  The ipk installed correctly on my PdaX RC12 SL-C3100 (it was built in a cross-compilation environment).  You can also see that it's all correct when you extract it, as you pointed out.

iwmmxt is a set of additional CPU instructions.  It's a bit of a move from RISC processing to CISC.  As with any additional instructionset, using these instructions is faster that having the equivalent basic assembly statements; this means that the program will run more quickly and consume less power.  Note that I did not use -march=iwmmxt, meaning that although the code will try to use the extensions where possible, it will still run on Zaurii without support for them.  It's always a good idea, especially on such a low-powered device, to take advantage of what's available to you.

sds

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #12 on: October 15, 2005, 10:21:26 am »
I am sure it is working fine in your setting and thank you for your further clarification.

However, I am still unable to install, so please bear with me.
I am reasonably confident my package manager is fine.

Could you please confirm the following md5 sums:
Code: [Select]
[lax:0:mnt/card/ipks> md5sum *
b25bc7da5f2ba2b139f49884be3bc55d  JamVM_1.3.3_armv5tel.ipk
5f78ee3f2c342483b356edee832cd34b  classpath_0.18_armv5tel.ipk
8471cf37731999378685aeff223e3378  jikes_1.22_armv5tel.ipk
[lax:0:mnt/card/ipks>

Could also somebody please report success or failure installing on C7xx-C860 with RC11?
C3100 pdaXrom

Borealid

  • Newbie
  • *
  • Posts: 46
    • View Profile
Java.net (1.4 Spesifications) Incompatible
« Reply #13 on: October 15, 2005, 07:16:47 pm »
The correct sum for classpath over here is f0c7742357d3d50ee76934562cc185e0 .  Apparently the problem was in how you put the files together again - do you have a good version of tar?  Did you use the correct options?

If you can't get it to work, you could always just extract data.tar.gz from inside the archive and then copy the files to their correct locations.