Jeff Tycz
03/14/2021, 4:08 AMError: Could not find or load main class MainKtI followed the Creating your first java application article on the jetbrains site so I dont know what the problem is. I created a StackOverflow question with more details
mbonnin
03/14/2021, 3:44 PMmbonnin
03/14/2021, 3:45 PMmbonnin
03/14/2021, 3:46 PMargs: Array<String>
with args: List<String>
I don't think that'd be an issue but maybe the jvm expect a List?mbonnin
03/14/2021, 3:46 PMjavap
to make sure the main method is thereJeff Tycz
03/14/2021, 4:27 PMbuild/classes/kotlin/main/com/mypackage/
in the IDE there is a MainKt.class
file and it looks like this
public fun main(args: kotlin.Array<kotlin.String>): kotlin.Unit { /* compiled code */ }
mbonnin
03/14/2021, 4:30 PMMainKt
class is in the com.mypackage
package?mbonnin
03/14/2021, 4:31 PMmainClassName = 'com.mypackage.MainKt'
mbonnin
03/14/2021, 4:31 PMmbonnin
03/14/2021, 4:37 PMJeff Tycz
03/14/2021, 4:38 PMtasks.jar {
manifest {
attributes 'Main-Class': 'MainKt'
}
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
and deleted my other artifact coniguration and I dont get that error anymore but now I get a NoClassDefFoundError
for the Mqtt library I am using but still runs fine in the Intellij