Author Topic: Sun J2sdk 1.4.2 For Pdaxrom  (Read 13403 times)

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #30 on: December 31, 2004, 10:18:44 am »
hi, I'm trying to install Mr.Postman jar with jamvm and I receive some errors - they really seem to be related to gui use.
Should I have to try another VM?
That jar could be a good - and useful - test for java vm gui classes support.
Getting Mr.Postman working would mean having a definitive mail client machine in our zaurus, with just one tool more than our favourite mail client

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #31 on: January 01, 2005, 02:55:25 pm »
Quote
hi, I'm trying to install Mr.Postman jar with jamvm and I receive some errors

Could you give a description of the stack trace?
Does the -verbose command line parameter give a clue?
[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]

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #32 on: January 01, 2005, 03:24:14 pm »
this is the output



Quote
sh-3.00# jamvm -jar install-mrpostman-20041121.jar
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invokeNative (Native Method)
   at java.lang.reflect.Method.invoke (Method.java:355)
   at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50)
Caused by: java.lang.NoClassDefFoundError: com/izforge/izpack/gui/IzPackMetalTheme
   at com.izforge.izpack.installer.GUIInstaller.loadLookAndFeel (Unknown Source)
   at com.izforge.izpack.installer.GUIInstaller.<init> (Unknown Source)
   at java.lang.reflect.Constructor.constructNative (Native Method)
   at java.lang.reflect.Constructor.newInstance (Constructor.java:265)
   at java.lang.Class.newInstance (Class.java:1139)
   at com.izforge.izpack.installer.Installer.main (Unknown Source)
   at java.lang.reflect.Method.invokeNative (Native Method)
   ...2 more
« Last Edit: January 01, 2005, 03:25:48 pm by scoutme »

rlougher

  • Newbie
  • *
  • Posts: 2
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #33 on: January 01, 2005, 06:33:12 pm »
Hi,

It means the VM can't find one or more classes needed.  In most cases, a jar runnable with -jar should be stand-alone, i.e. all the classes needed should be in the jar file, or be standard Java classes that are included in the Java runtime (i.e. GNU Classpath).

To check you need to unpack the jar file, using jar xvf foo.jar (unzip or winzip should also work).  Then look for:

com/izforge/izpack/gui/IzPackMetalTheme.class

If it's there, something's gone wrong.  If it isn't (and I expect this to be the case), the jar needs external classes.  As the class isn't a standard class, the jar _must_ extend the classpath to find it.  To check this, look in the jar's manifest file:

META-INF/MANIFEST.MF

There should be a Class-Path: attribute, setting up the classpath to where to find the extra classes.  If there isn't the jar's bad.

If there is a Class-Path: attribute, and you've got everything it wants, then I know the problem.  GNU Classpath has a bug, which means it doesn't take any notice of it.  Unfortunately, there's nothing I can do to work round it in JamVM.

So for now, the easiest way to run it will be to run the classes directly from the unpacked jar file.

You can find out the main class by looking at the Main-Class attribute in the manifest.

Then, if you setup the CLASSPATH variable to point to the unpacked jar file directory, and everything else the jar needs you can run it by typing

jamvm <main.class.from.manifest>

i.e. if Main-Class: foo.bar

jamvm foo.bar

The -verbose option will print out which classes are loaded and from where.

Rob.

P.S.  Where did the jar come from?  Any chance you could email it to me?  rob.lougher AT gmail.com.

rlougher

  • Newbie
  • *
  • Posts: 2
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #34 on: January 01, 2005, 06:46:26 pm »
OK, I googled for it and found it on sourceforge...

Rob.

titus

  • Newbie
  • *
  • Posts: 29
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #35 on: January 02, 2005, 11:04:02 am »
hi,

i've tried to compile gnu's java compilier gcj, but didn't succeeded...

i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...

i'm very new in compiling such stuff, maybe anyone else have more success or any hints?

i need gcj for compiling swt for arm...

titus
SL-C860, 512MB SD Kingston, D-Link DCF-660W, pdaXrom 1.1.0 Kathrin RC9

titus

  • Newbie
  • *
  • Posts: 29
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #36 on: January 02, 2005, 12:57:05 pm »
Quote
i've tried to compile gnu's java compilier gcj, but didn't succeeded...

i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...

this error-message i've got on compiling many programs:
checking for a sed that does not truncate output... ./configure: line 3972: cmp: command not found

sed was missing!!!    

just compiling wzdftpd-0.4.4, later i retry gcj...
SL-C860, 512MB SD Kingston, D-Link DCF-660W, pdaXrom 1.1.0 Kathrin RC9

scoutme

  • Hero Member
  • *****
  • Posts: 579
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #37 on: January 02, 2005, 07:05:09 pm »
Quote
OK, I googled for it and found it on sourceforge...

Rob.
let me/us know what you get from it

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #38 on: January 03, 2005, 03:22:34 pm »
Quote
've tried to compile gnu's java compilier gcj, but didn't succeeded...

i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...

Correct me if I'm wrong, but compiling gcj means compiling gcc, and compiling gcc means compiling libc and compiling libc means... horror  
At least when you need a newer gcc version than the current 3.3.2. Did you look at the dependencies?

Quote
i need gcj for compiling swt for arm...

What makes you belief gcj makes it possible to compile swt? The native parts aren't provided for the ARM architecture, or did I miss something...

No offense, just curious  
[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]

titus

  • Newbie
  • *
  • Posts: 29
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #39 on: January 03, 2005, 04:05:10 pm »
hi cortez,

i'm very new with compiling such stuff, but as far as i understand it (it's possible i'm wrong, it had been a long weekend *g)

gcc-java-3.3.2 is part of the gnu compiler collection but not included in the main package... you can get it at gnu.org...

it is able to compile java to byte code and what i needed more: compile java or byte code to native machine code...

ibm provides the source of swt2 in the file j-nativegui2.zip, which includes java source for building the native libraries you needed, in the instructions you are advised to use gcj for this work...

http://www-106.ibm.com/developerworks/java...y/j-nativegui2/

gcc-java isn't avaiable for arm, so i need to compile it.

i think my problem are missing switches i probably have to start with the configure script... on gnu's page i found an instruction with example switches for arm architectures, but didn't succeeded... make fails on one or some later sourcefiles because of 'i686' instructions (the first 30min it was compiling fine *g)... i don't know what went wrong with the configure script...

http://www.gnu.org/software/gcc/java/

these i686 error i've got on some other programs i tried to compile, in the according installations note always stand: ./configure, make, make install, ready.... paaaah!!!    

in past i have compiled some programs on i86 linux without problems, but compiling for arm seems to be very difficult  

do you or someone else knows where i can find a good howto for compiling on arm?

thanks,

titus
SL-C860, 512MB SD Kingston, D-Link DCF-660W, pdaXrom 1.1.0 Kathrin RC9

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #40 on: January 03, 2005, 04:53:19 pm »
You're right, compiling code is tricky, and information is fragmented and scattered around the internet. Most of the time it's trial-error and you're on your own I guess  
But that where forums like this come in, so we can share our experiences  

The steps I use most of the times are:

1. Run the script from the pdaXrom SDK:
Code: [Select]
#!/bin/sh

export BASEDIR=/opt/arm/3.3.2-vfp
export SDK_VERSION="1.1.0 softfloat(VFP)"

export X11DIR=$BASEDIR/armv5tel-cacko-linux/X11R6
export X11INC=$X11DIR/include
export X11LIB=$X11DIR/lib

export QTDIR=$BASEDIR/armv5tel-cacko-linux/qt
#export QMAKEDIR=$QTDIR/mkspecs
#export QMAKESPEC=linux-arm-g++
export PATH=$BASEDIR/bin:$QTDIR/bin:$X11DIR/bin:$PATH
export LD_LIBRARY_PATH=$BASEDIR/lib

export PKG_CONFIG_PATH=$BASEDIR/armv5tel-cacko-linux/lib/pkgconfig:$X11LIB/pkgconfig:$QTDIR/lib/pkgconfig

2.  Set following vars also
Code: [Select]
export CC=$BASEDIR/bin/armv5tel-cacko-linux-gcc
export AS=$BASEDIR/bin/armv5tel-cacko-linux-as
export AR=$BASEDIR/bin/armv5tel-cacko-linux-ar
export NM=$BASEDIR/bin/armv5tel-cacko-linux-nm
export RANLIB=$BASEDIR/bin/armv5tel-cacko-linux-ranlib
export LD=$BASEDIR/bin/armv5tel-cacko-linux-ld
export STRIP=$BASEDIR/bin/armv5tel-cacko-linux-strip
export LIBTOOL=$BASEDIR/share/libtool
export READELF=$BASEDIR/bin/armv5tel-cacko-linux-readelf
Tricky, but to be sure that the right linker is used, I renamed the one in /usr/bin to some fake name.

3.  Configure your code with at least following:
Code: [Select]
./configure --host=arm-linux --target=arm-linux --prefix=/your/dest/dirRun the ./configure --help to make sure you don't miss any special configuration options.

4. Then run make and keep your fingers crossed

5. When succesfull, run make install-strip, copy the resulting files from /your/dest/dir to your Zaurus and give it a try.

I hope this will help for starters. I know a lot of you all probably know this already, but please add info so we can all learn from this.

Thanks
[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]

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #41 on: January 17, 2005, 07:47:42 am »
Just a quick status update.

SableVM is finally compiled. Thanks to Grzegorz B. Prokopski, one of the lead developers of SableVM, for helping me out.

I am able to run the gnu-classpath AWT and Swing examples, although they crash occasionally.

It took me some time to find out that libart-lgpl has to be installed for AWT and/or Swing. This package can be found in the pdaXrom Stable Feed
[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]

titus

  • Newbie
  • *
  • Posts: 29
    • View Profile
Sun J2sdk 1.4.2 For Pdaxrom
« Reply #42 on: February 01, 2005, 04:52:56 pm »
hi cortez,

sorry for my long disappearing, but i was very busy last time...

thank you for your help, it makes the situation more clearly...
the first program i get compiled was epic2, which conundrum wants to use...

the final solution on my system was removing flex...

in this moment wzdftpd-0.4.4 is compiling, i need an ftp daemon, the next project is compiling firebird sql server

when i'm finished with these tasks i switch to compile the gjc and make a try on swt...

but first i need to find out how to make an ipk.. ;-)

titus
« Last Edit: February 01, 2005, 05:05:10 pm by titus »
SL-C860, 512MB SD Kingston, D-Link DCF-660W, pdaXrom 1.1.0 Kathrin RC9