-
Notifications
You must be signed in to change notification settings - Fork 39
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
Unexpected error, Invalid resource: A, zsh: unknown file attribute: i #88
Comments
The Nashorn JavaScript Engine has been removed from recent versions of Java, which breaks CollateX. You will need JDK8 for Mac M1, which you can find here: https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk#zulu (bottom of the page). |
You are half way there. It's still calling on the previously installed version of Java (16), instead of 8. Follow the "Set JAVA_HOME environment variable" instructions listed in this guide, https://dev.to/shane/configure-m1-mac-to-use-jdk8-with-maven-4b4g That should fix the problem. |
If you want more background information on setting your JAVA_HOME variable, see here: https://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-macos |
That works! Thanks. How do you select two of the four witnesses? I tried various things... What is the syntax? Mike@MIKEs-M1-iMac collateX % java -jar collatex-tools-1.7.1.jar witnesses.json |
Glad to hear that it worked. As far as I remember there is no witness selection syntax. You can either pre filter the input before sending it to CollateX or post process the output. The idea is that the JSON is already a derivative of some other input file or files, like plain text, XML or a database. |
OK, thanks. That'll be fine. I can work with that. Looking forward to trying it... But the help suggests that you can (or have I misread it? I'm not sure what "|" and "(" mean) Mike@MIKEs-M1-iMac collateX % java -jar collatex-tools-1.7.1.jar -h |
What I think is meant is that you can either supply a single JSON file that supplies all the witnesses or a list of file names of plain text files. As in java -jar collatex-tools-1.7.1.jar plain_text_witness1.txt witness2.txt witness3.txt |
Ah! I see. Thanks. |
Hi,
I am struggling to get collatex to work with the example json file. Can you help?
This is what I get (below)
Thanks,
Mike
Mike@MIKEs-M1-iMac collateX % java -jar collatex-tools-1.7.1.jar witnesses.json
Unexpected error
null
Mike@MIKEs-M1-iMac collateX % java -jar collatex-tools-1.7.1.jar witnesses.json A B
Error while parsing command line arguments (-h for usage instructions)
Invalid resource: A
Mike@MIKEs-M1-iMac collateX % java -jar collatex-tools-1.7.1.jar (witnesses.json A B)
zsh: unknown file attribute: i
Mike@MIKEs-M1-iMac collateX %
Mike@MIKEs-M1-iMac collateX % more witnesses.json
{
"witnesses" : [
{
"id" : "A",
"content" : "A black cat in a black basket"
},
{
"id" : "B",
"content" : "A black cat in a black basket"
},
{
"id" : "C",
"content" : "A striped cat in a black basket"
},
{
"id" : "D",
"content" : "A striped cat in a white basket"
}
]
}
witnesses.json (END)
The text was updated successfully, but these errors were encountered: