Skip to content

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

@dcronkite

Description

@dcronkite

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")?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions