Hi Peeps,

My latest endeavor was to get pdfsam (www.pdfsam.org) * pdfsam basic 0.6sr2
*which is basically a cool PDF splitter / merger released under GNU/GPL and
is an application which I use a lot on win32 at work, and thought it would
be cool to get installed and working on ubuntu. Incidentally for Linux you
just download the zip archive  (NOT the source code), extract the zip
contents and run the .JAR file under the JRE. You can also run the Java
version under windows (right-click .jar file > open with > Java Virtual
Machine - and it does work I just tried it),  but there is a  simpler
installation EXE for download that Win32 users can use, and theres also a
pdfsam-starter.exe for Windows users as well in the ZIP archive I just
downloaded.

Anyway back to Linux, the Java version was designed to be platform
independant, think about it, what a brilliant idea, seriously  -  the author
didnt have to think about developing separate sets of code for  Windows,
Linux, Mac OS, etc, so long as the OS platform runs Java JRE, it will run in
a separate application layer, on top of, and regardless of OS.

With this in mind, my pet project for this-evening *should* have been fairly
painless to get working because:

a) Its already compiled Java code

b) its Java! so just runs in the JRE, no installation and compilation
required.

So, I downloaded the Java Runtime Environment (latest version, for Linux)
direct from the Sun Microsystems website, (.bin file), did the usual CHMOD
700 on the BIN file to make it executable and ran it in a terminal. No
problems here, and when it is finished I type:

java -version

and get the following output:

java version "1.4.2"
gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Again this "appears" fine but when I run the PDFSAM program by typing

java -jar /pdfsam/pdfsam-0.6sr3.jar

I get the following output:

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
gnu.java.awt.peer.gtk.GtkToolkit
  at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
  at java.awt.Font.tk(libgcj.so.70)
  at java.awt.Font.getPeerFromToolkit(libgcj.so.70)
  at java.awt.Font.<init>(libgcj.so.70)
  at javax.swing.plaf.FontUIResource.<init>(libgcj.so.70)
  at javax.swing.plaf.metal.DefaultMetalTheme.<clinit>(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at it.pdfsam.util.ThemeSelector.setTheme(ThemeSelector.java:179)
  at it.pdfsam.GUI.MainGUI.<init>(MainGUI.java:134)
  at it.pdfsam.GUI.MainGUI.main(MainGUI.java:83)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot
open shared object file: No such file or
directory
  at java.lang.Runtime._load(libgcj.so.70)
  at java.lang.Runtime.loadLibrary(libgcj.so.70)
  at java.lang.System.loadLibrary(libgcj.so.70)
  at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70)
  at java.lang.Class.initializeClass(libgcj.so.70)
  at java.lang.Class.forName(libgcj.so.70)
  at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
  ...13 more


Now, going back up to the java -version output, you see theres a line
(second line) that says :

gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)

Apparently this is my problem, because pdfsam was written in Java "Swing"
(whatever that is) and Swing is not fully supported by gij (yes you've
guessed I am now parrot-copying from a
forum<http://www.pdfsam.org/bbforum/viewtopic.php?p=137&sid=53c06b1497eab6180d6ff38572d70d82>and
have no idea what I am *actually* saying) I need to make sure that I
uninstall this gij thing, and only use the Sun Java.

I dont understand how to uninstall gij. I looked for it in Add / Remove
Applications, but I can't see it.

I think I installed Sun's JRE ok, not sure how to uninstall gij and how to
get the Java application working I know the command should be java -jar [
filename.jar] but as you see from the output above, I am not getting
anywhere.

Any Java experts?
Anyone know how to get rid of gij?
Also has anyone got a clue what the output means by AWT toolkit?

Cheers


--
*****
Richard Forth

"I used to be indecisive, but now, I''m not so sure!"

*****
_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to