romainguy / kotlin-explorer

Desktop tool to quickly explore disassembled Kotlin code.
Apache License 2.0
818 stars 24 forks source link

Can't use on Windows #72

Open salah-8 opened 1 month ago

salah-8 commented 1 month ago

Hi, when I click "Build & Disassemble" on Windows, I got this error:

exception: java.nio.file.InvalidPathException: Illegal char <:> at index 71: C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlin-stdlib-jdk8.jar:C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlin-stdlib.jar:C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlin-annotations-jvm.jar:C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlinx-coroutines-core-jvm.jar:C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\annotations-13.0.jar:C:\Users\moham\AppData\Local\Android\Sdk\platforms\android-35\android.jar
    at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:177)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
    at java.base/java.io.File.toPath(File.java:2387)

So i changed the : to ; in the code from the joinToString function. But now when I click "Build & Disassemble" I get this error:

error: source entry is not a Kotlin file: C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlin-stdlib.jar
error: source entry is not a Kotlin file: C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlin-annotations-jvm.jar
error: source entry is not a Kotlin file: C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\kotlinx-coroutines-core-jvm.jar
error: source entry is not a Kotlin file: C:\Users\moham\kotlin-compiler-2.0.0\kotlinc\lib\annotations-13.0.jar
error: source entry is not a Kotlin file: C:\Users\moham\AppData\Local\Android\Sdk\platforms\android-35\android.jar

Can you please tell me how to make it work properly on Windows?

romainguy commented 1 month ago

Unfortunately I don't have a Windows development machine and can't do any testing. It looks like we just need to replace the use of : with ; in the commands we execute, and there's a constant provided by the Java APIs for this.