LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Are Java apps really that portable... ?! (https://www.linuxquestions.org/questions/general-10/are-java-apps-really-that-portable-835643/)

Alexvader 10-01-2010 09:56 AM

Are Java apps really that portable... ?!
 
Hi

I have stumbled in this

http://www.archimedes.org.br/ it is a 2D CAD package built in Java for Linux, Mac and win...

Quote:

Archimedes works on GNU/Linux, Mac OS X and Windows and it only requires you have a Java Virtual Machine installed which is also a free software. This means that anything generated with Archimedes is easily recoverable and reused.

... allright...

So i get the .jar package from Sourceforge, http://sourceforge.net/projects/arqu...p.jar/download, try to run this with

Code:

$java -jar archimedes-0.8.1-setup.jar
and i get a whole gibberish about incorrect ELF library types is this normal...?

I mean. I have a JDK OpenJDK6-6.b20_1.9-1 from Arch, installed... shouldn't the Java Virtual Machine interpreter take care of the Jar Archive in a layer different from the OS ( Architecture and Glibc agnostic ? )

Alexvader 10-01-2010 10:40 AM

This creates a directory in /home/user :

Quote:

[alex@iskandhar Archimedes]$ ls
archimedes.jar docs libgl-0500.so libswt-cairo-gtk-3231.so libswt-gtk-3231.so mediumIcon.png swt.jar
archimedes.png largeIcon.png libswt-atk-gtk-3231.so libswt-glx-gtk-3231.so libswt-mozilla-gtk-3231.so ogl.jar Uninstaller
archimedes.sh libcairo-swt.so libswt-awt-gtk-3231.so libswt-gnome-gtk-3231.so libswt-pi-gtk-3231.so smallIcon.png uninstall.sh
[alex@iskandhar Archimedes]$
and running the launching script, archimedes.sh, yelds this ...

Quote:

[alex@iskandhar Archimedes]$ ./archimedes.sh
Picked up _JAVA_OPTIONS: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/alex/Archimedes/libswt-pi-gtk-3231.so: /home/alex/Archimedes/libswt-pi-gtk-3231.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
at com.tarantulus.archimedes.gui.swt.Window.<init>(Unknown Source)
at com.tarantulus.archimedes.gui.swt.Window.getInstance(Unknown Source)
at com.tarantulus.archimedes.gui.swt.Window.main(Unknown Source)
[alex@iskandhar Archimedes]$



So I guess this was made to run in 32 bits... :(

easuter 10-01-2010 12:27 PM

Quote:

Originally Posted by Alexvader (Post 4114846)
Hi

I have stumbled in this

http://www.archimedes.org.br/ it is a 2D CAD package built in Java for Linux, Mac and win...




... allright...

So i get the .jar package from Sourceforge, http://sourceforge.net/projects/arqu...p.jar/download, try to run this with

Code:

$java -jar archimedes-0.8.1-setup.jar
and i get a hole gibberish about incorrect ELF library types is this normal...?

I mean. I have a JDK OpenJDK6-6.b20_1.9-1 from Arch, installed... shouldn't the Java Virtual Machine interpreter take care of the Jar Archive in a layer different from the OS ( Architecture and Glibc agnostic ? )

That version seems to be a very old one so it wouldn't surprise me if it didn't work properly on OpenJDK.
But in any case, I downloaded the archive on their homepage (latest version) and the program is a 32-bit executable, so it looks like the devs may have compiled the Java source to machine code instead of portable byte-code. So it's not Java's fault ;)

Alexvader 10-01-2010 01:33 PM

Thx Easuter :)


All times are GMT -5. The time now is 09:46 PM.