jbang icon indicating copy to clipboard operation
jbang copied to clipboard

jbang-catalog fails to load class

Open harshmadhani opened this issue 3 years ago • 1 comments

Describe the bug I am trying to run jbang-catalog over a project. It ran fine for the first time, but failed to find the Main class for the next time.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/quarkusio/jbang-catalog
  2. Run catalog_check_updates.java
  3. It will run for the first iteration. Next iteration it will fail with below error
    Error: Could not find or load main class [%4$s] Caused by: java.lang.ClassNotFoundException: [%4$s]

Expected behavior It should give similar output with each run

Additional context Environment : Fedora 35 JDK version : openjdk version "11.0.14.1" 2022-02-08

Attached log.txt and jbang jar

harshmadhani avatar Apr 07 '22 12:04 harshmadhani

@quintesse looks like quoting somehow gets messed up and Stores bad string in jar so it works the first time command line but on second run jt takes main class from the jar it is not the same.

maxandersen avatar Apr 07 '22 14:04 maxandersen