Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made the stand alone version nicer to use as a lib #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

greenwoodma
Copy link

Two main changes to the standalone version to make it easier to use as a lib (for example from within the GATE plugin).

  1. the code now only calls System.exit() from within the main method. In other cases where an error occurs it is logged and then a runtime exception thrown which can be handled by calling code, which includes the main method which can then call System.exit()
  2. readConfigFile() now takes a URL as an argument rather than a String which was expected to contain a file path. This is not only more robust (spaces in filenames should be less of an issue, see GATE #58) but also means that the config.props doesn't have to be a real file but can be any URL including inside a JAR file, which is where it will be in the new version of the GATE plugin. I've kept the old methods that assumed a String but marked them as deprecated.

… others to use as a lib, and switched readConfigFile to use a URL so that when this is used as a lib, rather than from the command line, we can pass in a URL which could be inside a JAR file or any other location which isn't actually a file on disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant