SirNapkin1334
05/11/2021, 12:47 AMjava.lang.String#repeat(int)
compared to kotlin.text.repeat(CharSequence, int)
. When I run the code in IJ, it works fine, when I call the function from Java for testing purposes, it works fine, but when I compile the jar and run it via java -jar
, it throws a NoSuchMethodError
, saying that there is no method java.lang.String#repeat(int)
. Does anyone know the cause?kt
```fun cls(size: Int) = print(java.lang.String(
java.lang.String(" ").repeat(size * 2 + 3) + "[1F"
).repeat(size + 2))
ephemient
05/11/2021, 12:50 AMSirNapkin1334
05/11/2021, 12:52 AMephemient
05/11/2021, 12:53 AM(" " as java.lang.String).repeat(10)
SirNapkin1334
05/11/2021, 12:54 AMephemient
05/11/2021, 12:55 AMSirNapkin1334
05/11/2021, 12:57 AMephemient
05/11/2021, 12:58 AMSirNapkin1334
05/11/2021, 12:59 AM