I get an error when executing this script. What am I doing wrong?
C:\data\weatherlink>java -jar wlk-converter.jar
Valid files found:
C:\data\weatherlink\2022-01.wlk
C:\data\weatherlink\2022-02.wlk
C:\data\weatherlink\2022-03.wlk
C:\data\weatherlink\2022-04.wlk
C:\data\weatherlink\2022-05.wlk
C:\data\weatherlink\2022-06.wlk
C:\data\weatherlink\2022-07.wlk
C:\data\weatherlink\2022-08.wlk
C:\data\weatherlink\2022-09.wlk
C:\data\weatherlink\2022-10.wlk
C:\data\weatherlink\2022-11.wlk
C:\data\weatherlink\2022-12.wlk
Exception in thread "main" java.lang.NumberFormatException: For input string: "C:\data\weatherlink\2022"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:668)
at java.base/java.lang.Integer.parseInt(Integer.java:786)
at dev.disaverio.wlkreader.service.WlkReader$Companion.readMonthlyFile(WlkReader.kt:23)
at dev.disaverio.wlkconverter.service.Service.printMonth(Service.kt:27)
at dev.disaverio.wlkconverter.MainKt.main(Main.kt:38)
Looks like the tool is not compatible with Windows. It expect forward slashes, but when the jar is used on Windows paths are separated with backward slashes. I created a PR to fix this.
I get an error when executing this script. What am I doing wrong?
C:\data\weatherlink>java -jar wlk-converter.jar Valid files found: C:\data\weatherlink\2022-01.wlk C:\data\weatherlink\2022-02.wlk C:\data\weatherlink\2022-03.wlk C:\data\weatherlink\2022-04.wlk C:\data\weatherlink\2022-05.wlk C:\data\weatherlink\2022-06.wlk C:\data\weatherlink\2022-07.wlk C:\data\weatherlink\2022-08.wlk C:\data\weatherlink\2022-09.wlk C:\data\weatherlink\2022-10.wlk C:\data\weatherlink\2022-11.wlk C:\data\weatherlink\2022-12.wlk Exception in thread "main" java.lang.NumberFormatException: For input string: "C:\data\weatherlink\2022" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Integer.parseInt(Integer.java:668) at java.base/java.lang.Integer.parseInt(Integer.java:786) at dev.disaverio.wlkreader.service.WlkReader$Companion.readMonthlyFile(WlkReader.kt:23) at dev.disaverio.wlkconverter.service.Service.printMonth(Service.kt:27) at dev.disaverio.wlkconverter.MainKt.main(Main.kt:38)
C:\data\weatherlink>