Skip to content

Windows preamble should not use %1 #24

@jacobmorzinski

Description

@jacobmorzinski

I tried to use lein-bin on Windows (creating a .bat file), and encountered a bug:
The preamble tries to launch java -jar %1 "%~f0" %*

Using java -jar %1 causes errors because %1 is not the batch(jar) file. Example:

C:\path>runme.bat hello world
Error: Unable to access jarfile hello

The error happens because java -jar %1 expands to java -jar "hello", and "hello" is not the batch(jar) file.

What should happen: the argument to -jar should be "%~f0" because %0 is the name of the batch file itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions