D Slevin

Greenhorn
+ Follow
since Jul 29, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by D Slevin

I do, but I need to be able to run the jar file on another computer and that's
what Im having trouble with.

Anyways, thanks for the help.
14 years ago
It seems that the GUI is looking for the extra jar files in the path relative to the one that the jar is run in. Is there a way to create a jar file
so that it checks the folder extra-jar-files for those extra jars?
14 years ago
I defined it within the Manifest file (Manifest.txt) as follows:

Main-Class: Gui
Class-Path: extra-jar-files/PDFBox-0.7.3.jar extra-jar-files/some_other_jar.jar

I had to include a number of jar files and I defined them on separate lines preceded by a space. The extra-jar-files folder is located in the same folder as the class files.
It works if the jar is run in that folder, but if I try to run it on another folder it cant find the jar files or the images needed by the GUI.
14 years ago
Hi,

I've created a jar file and when I double-click it within the folder in which it is created, it works fine. I added my own manifest file so that I could specify the main class to be run and the class path
for the various jars I've needed to include. When I copy the jar file to the Desktop and run it there, it runs but the images are missing and I cant use the other jar files that I need. Has anyone encountered this problem before?

Any help would be appreciated.
14 years ago
Hi,
cheers for that. Just after I posted my problem, I got it working last night. I implemented mine a little differently.



I don't know if its the proper way to do it, but it reads in the file perfectly. I'll have a go at trying the code you linked me to (no harm in knowing 2 ways). I also kept getting ClassNotFoundExceptions. I put the jar file it was looking for (such xmlbeans, dom4j) in the classpath and it worked then.

Again, thanks.

ps if anyone needs any help reading doc or docx files, I'll be happy to post code here
Hi,

I'm helping to write an application that needs to read in a word doc (the text of the doc will be processed by some language processing software. Im working on the
frontend for the project.) At the moment, I am able to read in word docs with the file extension .doc using the Apache POI library (POIFileSystem, HWPFDocument and WordExtractor).
Now I want to be able to read in .docx files. I've tried using XWPFDocument and XWPFWordExtractor. I pass in OPCPackage.create(filename) as an argument to XWPFDocument, but
its not working.The code compiles, but when I run it, it throws an exception.Its throwing an org.apache.xmlbeans.XmlException. I thought I had set the classpath for the relevant jar files.
I'm using Apache POI 3.5 beta6. If anyone can shed some light on this, that would great!