HanSolo / javafinder

JavaFinder is a little tool that helps you finding all installed Java versions in a given path
Apache License 2.0
16 stars 0 forks source link

does not generate valid json for Windows paths #3

Closed ltorok closed 1 year ago

ltorok commented 1 year ago

Backslashes not are escaped.

Example: "search_path":"C:\Program Files\Java\" (wrong) -> "search_path":"C:\Program Files\Java\" (good)

HanSolo commented 1 year ago

Right…the windows problem again 😜 Thx for the heads up 👍🏻😁

HanSolo commented 1 year ago

Should hopefully now be fixed in 17.0.21 :)

ltorok commented 1 year ago

Now is better, but is still not good. If is used default search path for Windows, then in json is this: "search_path":"C:\Program Files\Java" - above, my first comment. Maybe bug in eu.hansolo.javafinder.Main in method findJava(final String[]) -> for set search_path.

HanSolo commented 1 year ago

So what exactly is the problem with that? The missing backslash at the end or are there still single backslashes?

ltorok commented 1 year ago

IMHO are there still single backslashes. See lines below

https://github.com/HanSolo/javafinder/blob/db18a9435c078c90d7bfe93a4df43b24963157b4/src/main/java/eu/hansolo/javafinder/Main.java#L146

and

https://github.com/HanSolo/javafinder/blob/db18a9435c078c90d7bfe93a4df43b24963157b4/src/main/java/eu/hansolo/javafinder/Main.java#L159

HanSolo commented 1 year ago

Will take a look tomorrow…today is Java BBQ 😁 Thx for reporting, appreciated 👍🏻

HanSolo commented 1 year ago

Ok, found some time to fix it, should now work in version 17.0.23

ltorok commented 1 year ago

In version 17.0.23 is ok now. Thanks.