pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Levi <drjle...@aol.com>
Subject Re: Shell Can't Find pdfbox
Date Sat, 07 Nov 2015 16:30:57 GMT

Tilman and Andreas,

Thank you for your help. Unfortunately, I can't make either suggestion work:
Tilman: I don't think the problem is a missing $PATH entry. My pdfbox-app-1.8.10.jar is in

jonathan$ ls /usr/local/bin/pdfbox-app-1.8.10.jar

This is in $PATH:

jonathan$ echo $PATH


 Andreas: To eliminate as much uncertainty over permissions as possible, I did

jonathan$ chmod 777 /usr/local/bin/pdfbox-app-1.8.10.jar
drj-air:Desktop jonathan$ ls -al /usr/local/bin/pdfb*
-rwxrwxrwx@ 1 jonathan  staff  10613055 Aug 16 13:26 /usr/local/bin/pdfbox-app-1.8.10.jar

(I don't understand the @ flag: Is that the problem?) Anyway, it still doesn't work:

jonathan$ java -jar pdfbox-app-1.8.10.jar \
> ExtractText aFile.pdf > aFile.txt; cat aFile.txt
Error: Unable to access jarfile pdfbox-app-1.8.10.jar

 What seems to work, again, is to supply the full path of pdfbox-app-1.8.10.jar:

jonathan$ java -jar /usr/local/bin/pdfbox-app-1.8.10.jar \
> ExtractText aFile.pdf > aFile.txt; cat aFile.txt

which is also what I got before modifying pdfbox-app-1.8.10.jar's permissions. Any further


-----Original Message-----
From: Andreas Lehmkühler <andreas@lehmi.de>
To: users <users@pdfbox.apache.org>; Jonathan Levi <drjlevi6@aol.com>
Sent: Tue, Nov 3, 2015 5:48 am
Subject: Re: Shell Can't Find pdfbox


> Jonathan Levi <drjlevi6@aol.com> hat am 3. November 2015 um 03:25
> I'm finding that shell commands to use
pdfbox-app-1.8.10.jar won't work unless
> the full path is used. Example:

> drj-air:Desktop jonathan$ ls /usr/local/bin/pdfb*
> drj-air:Desktop jonathan$ java -jar
pdfbox-app-1.8.10.jar ExtractText
> Contact-Office-Letter.pdf 
> Error: Unable
to access jarfile pdfbox-app-1.8.10.jar
> drj-air:Desktop jonathan$ java -jar
> ExtractText Contact-Office-Letter.pdf

> drj-air:Desktop jonathan$ 
> Is there a shell variable that has to be
set for Java to know where to look
> for jars?
I guess the issue might be that
your user doesn't have sufficient rights to
access the jar.

Check the output

ls -al /usr/local/bin/pdfb*

and change the access permissions if

> Using Mac OS X 10.11.1.
> TIA,



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message