• Post Reply Bookmark Topic Watch Topic
  • New Topic

The thrills of interacting with an existing jar file  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ppl,

Hoping you java guru's can help a fella out.
I'm still relatively new to java and still have a lot to learn.

My Issue:
The app I am trying to interface with name is pdfcompress.jar:
I can access it via creating my own html interface.




-- The above code then takes me through a manual interface for uploading etc.
However I would like to interact with this .jar file via my own app.
i.e. parse, the location & name of the to be compressed pdf + the dir & name where it will be
"exported to" aswell, and just add the directory for the log File.

I decided let me try use the command line first.
I tried using the command line but was unsuccessful (compress is the documented method to use).

java –jar "C:\pdfcompress.jar" compress "C:\toobig.pdf" "C:\just_right.pdf" "C:\"

I get the following error:


C:\>java -jar "C:\pdfcompress.jar" compress "C:\toobig.pdf" "C:\just_right.pdf" "C:\"
Exception in thread "main" java.lang.NoClassDefFoundError: ûjar


Help would be greatly appreciated


 
Marshal
Posts: 56838
173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
I have broken some of the long lines and deleted some blank lines to improve legibility in your post. Don’t use tabs for indenting; use spaces.
That doesn’t look like Java™ code, but JavaScript, so I shall move you to the JavaScript forum.
What happens if you run that applet with appletviewer on its own, apart from the rest of the programming?
 
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the thing above the 'u' in ujar, is that a problem with the site or does the compress.jar has some other dependency which can't be found?
 
Rudi de Klerk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the welcome ;)

What happens if you run that applet with appletviewer on its own, apart from the rest of the programming?
- The applet seems to run perfectly fine, it then takes me through all the convert options etc; hence I know the program is working.
- P.s Wont use those indentations again ty for the edit and move to the correct forum.

The thing above the 'u' in ujar, is that a problem with the site or does the compress.jar has some other
dependency which can't be found?
- I have no idea, the pdfcompress.jar from its documentation says it can be ran from a command line and when
I entered it into the format as seen bellow that error occurred .

Here is the "syntax" they tell me to run in the command line:

 
Author and ninkuma
Marshal
Posts: 66345
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Applets forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!