andrewoma/kotlin-scripting-kickstarter

Error with class `scripts.helloworld.HelloworldPackage` not being found

Closed this issue · 4 comments

I'm having a problem with using this kickstarter environment, and opened an issue to see if you or anyone else might have encountered this.

{~/code/kotlin-scripts} (master)$ ./gradlew check copyToLib
:compileKotlin UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileTestKotlin
:compileTestJava UP-TO-DATE
:processTestResources
:testClasses
:test
:check
:copyToLib UP-TO-DATE

BUILD SUCCESSFUL

Total time: 8.289 secs
{~/code/kotlin-scripts} (master)$ export PATH=$PATH:`pwd`/kotlin
{~/code/kotlin-scripts} (master)$ helloworld.kt
Error: Could not find or load main class scripts.helloworld.HelloworldPackage

I understand this is some sort of problem with the Java CLASSPATH, but I wasn't quite able to grok how exactly it is set in this environment. Could you provide any pointers towards debugging this situation?

Sorry, it seems I haven't updated the script runner to work with the new package structure introduced in 1.0.0-beta.

Kotlin now generates a class called scripts.helloworld.HelloworldKt - I'll try and fix it shortly

Should be fixed by d7b4ed9

That seems to have fixed it.

Thanks a lot for the fix, and also for the project!

No worries - I'm glad you found it useful.