I wrote a program that parses HTML files to read some text within the files and then creates new files with filenames containing the new string information extracted from each. Anyway, after cleaning and building the project the .jar program won't run without being in a folder which includes the lib folder containing the jsoup library (jsoup is the library that parses HTML). Is there a way I can somehow include it the main .jar file so it will be more of a standalone program? I want to be able to deploy just one file.
The standard class loader won't load class files from an embedded jar but there are class loaders out there that will and I believe IDE's like Eclipse provide a class loader which supports embedded jars.
Joined: Feb 24, 2012
Okay, thanks. I wrote it in Netbeans because that's what I've used since I started school but I hear Eclipse is great too. I will have to check it out.
After adding the following code to the build.xml file... It works! I just changed "MyJarName" to the title of my class file. Yes, it does make the final JAR bigger; I went from 20KB to almost 1MB, but this is definitely what I was looking for. Thanks everyone for your input and help!