I have a small Java project built with the jGRASP IDE on Windows, with all the files in a single flat directory. Among them is an external jar file: pdfbox-app.jar. Compilation and access to that library succeeds if I add the file to the project CLASSPATH with an absolute address.
But the project build then breaks if this is distributed to other people (via GitHub) and they put the code in any different directory structure. So it would be preferred to provide a relative address on the CLASSPATH. However,nothing I've tried to add in that vein reliably succeeds. Things I've tried to add to the project classpath:
pdfbox-app.jar
\pdfbox-app.jar
.\pdfbox-app.jar
%<PROJECT_PATH>\pdfbox-app.jar
I've also tried to add command-line compile arguments:
-cp ".;.\pdfbox-app.jar"
What would work here for a relative-address inclusion on the jGRASP project CLASSPATH?
Any of those classpath additions should work, assuming that pdfbox-app.jar is located at the root of your common classpath (the directory containing the package roots), or for %<PROJECT_PATH>, the directory containing the project file itself if that is different. If it is not, then you need a relative path to one of those locations.
The flags should also work, but for Java flags you need to add them as "Flags2 or Args2" for the "Compile", "Run", and "Debug" commands using "Settings" -> "Compiler Settings". Command line arguments are arguments to your program only.