Z
Z
Zeldan2013-12-07 07:41:22
Java
Zeldan, 2013-12-07 07:41:22

Idea/Kotlin reflection problem?

When running even a primitive hello world:

package hello

fun main(args : Array<String>) {
    println("Hello, world!")
}

crashes like
Exception in thread "main" java.lang.ClassNotFoundException: 
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:190)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)

Version Idea 13.0 build 133.193, plugin from turnip 0.6.1673, when creating a project in lib, a jar nickname is pumped out, this usually happens when the classpath is not registered, but I checked, everything is fine there.
Tested on both Linux and Windows.
Maybe someone knows how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dom Topor, 2013-12-09
@Zeldan

I tried to reproduce your error and it worked in 2 cases:

  1. If in the word main we replace the English letters a or i with Russian counterparts
  2. If you run a script that is in the hello package with default_packagee
To correct the error in the first case, it is enough to replace Russian letters with English ones.
And in the second case, you need to press the key combination Ctrl + Shift + F10 and select hello.HelloPackage
If nothing works, try removing the hello package and run the program again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question