如何 read/write from/to 与 Kotlin/Native 控制台?
How to read/write from/to console with Kotlin/Native?
我最近尝试使用 Kotlin/Native 将 CLI 工具从 JVM 转换为本机可执行文件。我收到以下错误(这是有道理的):
> Task :compileKotlinMain FAILED
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (4, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (5, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (6, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 14): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 27): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 20): Unresolved reference: InputStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 38): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (16, 57): Unresolved reference: BufferedReader
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 80): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 100): Unresolved reference: BufferedReader
Java 支持的控制台 I/O 的替代方案是什么?有图书馆吗?
谢谢。
我最近尝试使用 Kotlin/Native 将 CLI 工具从 JVM 转换为本机可执行文件。我收到以下错误(这是有道理的):
> Task :compileKotlinMain FAILED
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (4, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (5, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (6, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 14): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 27): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 20): Unresolved reference: InputStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 38): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (16, 57): Unresolved reference: BufferedReader
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 80): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 100): Unresolved reference: BufferedReader
Java 支持的控制台 I/O 的替代方案是什么?有图书馆吗? 谢谢。