Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java + PDFBox on Linux

Tags:

java

linux

pdfbox

I need to write a small program for a server which will use PDFBox. I'm writing under windows with NetBeans. How do I add PDFBox jar to my program jar once I export it to the server?

like image 456
gh0st Avatar asked Jan 27 '26 20:01

gh0st


1 Answers

You don't necessarily have to put pdfbox.jar into your application's jar. It's easier to keep them separate and just add them both to your classpath before running it.

For example, place both jars in the same directory and run:

$ java -cp myapp.jar:pdfbox.jar app.MainClass args
like image 167
dogbane Avatar answered Jan 29 '26 10:01

dogbane