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

FileNotFoundException when opening default gv.words.temp.filename on Windows #22

Open
dcronkite opened this issue Feb 23, 2023 · 0 comments

Comments

@dcronkite
Copy link
Contributor

The default bin/create_indexes.bat runs into a FileNotFoundException when running GenerateVariants (see https://github.com/lhncbc/metamaplite/blob/827a5c1f7a0174247ea499117d82745af827c628/bin/create_indexes.bat#L58-L60) as the default value for wordsFilename is /tmp/words.txt.tmp:
https://github.com/lhncbc/metamaplite/blob/8aae39319a4a4b40a013180bf6cde09b172c78a8/src/main/java/gov/nih/nlm/nls/metamap/dfbuilder/GenerateVariants.java#L226-L227. It appears Java on Windows is unable to resolve the /tmp directory.

I was able to workaround the issue by adding the system property gv.words.temp.filename to the command line as just words.txt.tmp:

java -Xmx4g "-Dgv.words.temp.filename=words.txt.tmp" -cp %projectdir%\target\metamaplite-%MML_VERSION%-standalone.jar ^
     gov.nih.nlm.nls.metamap.dfbuilder.GenerateVariants ^
     %MRCONSO% %IVFDIR%\tables\vars.txt

Can this be added the create_indexes.bat script? Or, /tmp be replaced by something like System.getProperty("java.io.tmpdir")?

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

No branches or pull requests

1 participant