Open dcronkite opened 1 year ago
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.
bin/create_indexes.bat
wordsFilename
/tmp/words.txt.tmp
/tmp
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:
gv.words.temp.filename
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")?
create_indexes.bat
System.getProperty("java.io.tmpdir")
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 forwordsFilename
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 justwords.txt.tmp
:Can this be added the
create_indexes.bat
script? Or,/tmp
be replaced by something likeSystem.getProperty("java.io.tmpdir")
?