# Kotlin-jdk-annotations.jar does not exist

**URL:** <https://discuss.kotlinlang.org/t/kotlin-jdk-annotations-jar-does-not-exist/991>\
**Category:** Uncategorized\
**Created:** [December 3, 2012, 1:32pm UTC](https://discuss.kotlinlang.org/t/kotlin-jdk-annotations-jar-does-not-exist/991 "2012-12-03T13:32:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OliverPlow](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@OliverPlow](https://discuss.kotlinlang.org/u/OliverPlow)\
**Post date:** [December 3, 2012, 1:32pm UTC](https://discuss.kotlinlang.org/t/kotlin-jdk-annotations-jar-does-not-exist/991/1 "2012-12-03T13:32:08Z")

</div>

hello,

I was having a try whether constructor params would accept a default value in conjunction with using delegates:

> open trait Base  
> {  
> &nbsp;&nbsp;abstract var count: Int
> 
> &nbsp;&nbsp;fun increment() {  
> &nbsp;&nbsp;count++  
> &nbsp;&nbsp;}  
> }
> 
> open class BaseImpl : Base {  
> &nbsp;&nbsp;override var count = 0  
> }
> 
> class Derived(b : **Base = BaseImpl()**) : Base by b {
> 
> }
> 
> fun main(args: Array\<String\>)  
> {  
> &nbsp;&nbsp;val d = Derived()  
> &nbsp;&nbsp;d.increment()  
> &nbsp;&nbsp;println(d.count)  
> }

This also compiled to my delight, but I got this runtime error:

> Kotlin: [Internal Error] java.lang.IllegalStateException: Path C:Dokumente und Einstellungenfoo.IdeaIC11configpluginsKotlinkotlinclibkotlin-jdk-annotations.jar does not exist.  
> &nbsp;&nbsp;at org.jetbrains.jet.utils.PathUtil.jarFileOrDirectoryToVirtualFile(PathUtil.java:138)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment.\<init\>(JetCoreEnvironment.java:97)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModule(KotlinToJVMBytecodeCompiler.java:110)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.java:134)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.java:132)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.java:54)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.common.CLICompiler.exec(CLICompiler.java:117)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.K2JVMCompiler.exec(K2JVMCompiler.java:181)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.jvm.K2JVMCompiler.exec(K2JVMCompiler.java:54)  
> &nbsp;&nbsp;at org.jetbrains.jet.cli.common.CLICompiler.exec(CLICompiler.java:47)  
> &nbsp;&nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I created the Kotlin project as usual: create a Kotlin file, then the IDE asks whether to choose “Set up ‘MyProject’ as JVM Kotlin module” or Javascript. So I select JVM and it creates a lib dir that contains kotlin-runtime.jar but no kotlin-jdk-annotations.jar. Question is whether the IDE missed to insert the kotlin-jdk-annotations.jar or whether I got something wrong.

By the way this solution

> class Derived(b : Base = BaseImpl()) : Base by b {
> 
> }
> 
> fun main(args: Array\<String\>)  
> {  
> &nbsp;&nbsp;val d = Derived()  
> &nbsp;&nbsp;d.increment()  
> &nbsp;&nbsp;println(d.count)  
> }

is absolutely good enough for me that I can live without statefull traits as this here also compiles:

> class Derived(b : Base = BaseImpl(), b2 : Base2 = BaseImpl2()) : Base by b, Base2 by b2 {
> 
> }

So in the end I’m not that happy with these [comments](http://blog.jetbrains.com/kotlin/2011/08/multiple-inheritance-part-2-possible-directions/#comment-1639) I made in the blog section. Should have spent more time thinking what to write. I won’t be upset if those comments get silently removed.

Regards, Oliver

---

<div class="post-metadata">

**Author:** ![OliverPlow](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@OliverPlow](https://discuss.kotlinlang.org/u/OliverPlow)\
**Post date:** [December 3, 2012, 1:35pm UTC](https://discuss.kotlinlang.org/t/kotlin-jdk-annotations-jar-does-not-exist/991/2 "2012-12-03T13:35:04Z")

</div>

Oops, I forgot: am using IC-123.23 and Kotlin plugin 0.4.254

---

<div class="post-metadata">

**Author:** ![OliverPlow](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@OliverPlow](https://discuss.kotlinlang.org/u/OliverPlow)\
**Post date:** [December 3, 2012, 3:23pm UTC](https://discuss.kotlinlang.org/t/kotlin-jdk-annotations-jar-does-not-exist/991/3 "2012-12-03T15:23:23Z")

</div>

I found the reason now: the problem occurs when using JDK1.6.0\_25 and doesn't when using JKD1.7.0\_09. The version of the Kotlin plugin is not the issue then. Created issue [http://youtrack.jetbrains.com/issue/KT-3125](http://youtrack.jetbrains.com/issue/KT-3125)
