0

I have checked out the SWI-Prolog JPL library, and I am trying to add some functionality. Right now, I am just trying to get the tests to work in the TestJUnit test. However, I am getting the following error:

SWI-Prolog: [FATAL ERROR:
Could not open resource database "../../src/swipl.prc": No error]

I have looked at the code, and I know that path is coming from this declaration:

public static final String startup = 
  (System.getenv("SWIPL_BOOT_FILE") == null ? "../../src/swipl.prc" :
  System.getenv("SWIPL_BOOT_FILE"));

It is looking for a an environment variable %SWIPL_BOOT_FILE%, so I could see how this might fix the problem. However, I don't know which file I should add as the boot file.

I have tried the swipl-win.exe, but that doesn't work.
Any ideas?

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
  • Would it not be easier to change the current path used with `../../src/swipl.prc` or move the file `swipl.prc` to the directory it wants. I would avoid the second option in the long run but do it as a quick test of the existing code. – Guy Coder Jan 15 '17 at 21:57
  • I want to change as little as possible in the source code, since I hope to make a pull request once I have added the functionality I desire. I can try moving swipl.prc to see if the code works. – Ben Mathers Jan 15 '17 at 22:03
  • I didn't mean to change the way `../../src/swipl.prc` was written in the code. I was suggesting that you change the location from which you start the app so that it has the correct current directory when it gets to `../../src/swipl.prc`. – Guy Coder Jan 15 '17 at 22:10

0 Answers0