# \[Edited\] Kotlin cannot create non-final static methods

**URL:** <https://discuss.kotlinlang.org/t/edited-kotlin-cannot-create-non-final-static-methods/23869>\
**Category:** Language Design\
**Created:** [January 9, 2022, 1:23pm UTC](https://discuss.kotlinlang.org/t/edited-kotlin-cannot-create-non-final-static-methods/23869 "2022-01-09T13:23:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martijn](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@martijn](https://discuss.kotlinlang.org/u/martijn)\
**Post date:** [January 9, 2022, 1:23pm UTC](https://discuss.kotlinlang.org/t/edited-kotlin-cannot-create-non-final-static-methods/23869/1 "2022-01-09T13:23:12Z")

</div>

**Original post** :

Situation: I have to use a Kotlin-based library in a Java project. I must override a static getter method in a class that extends a class in Kotlin.

I realized that this is not possible since the method is final, and there is no way to modify the library Kotlin code to solve this.

Conclusion: since `@JvmStatic` annotations are meant for Java interoperability, I think they should generate static methods that are non-final.

**Update** :

Actually, I found out that adding `@JvmStatic` to a method in a companion object that is marked `open` works just fine! However, in IntelliJ, this warns

> ‘open’ has no effect in an object

which threw me off. I suppose this is something to be addressed in IntelliJ, and to go back one step, in the documentation of `@JvmStatic`.

---

<div class="post-metadata">

**Author:** ![TrevorHackman](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@TrevorHackman](https://discuss.kotlinlang.org/u/TrevorHackman)\
**Post date:** [January 10, 2022, 7:45am UTC](https://discuss.kotlinlang.org/t/edited-kotlin-cannot-create-non-final-static-methods/23869/2 "2022-01-10T07:45:01Z")

</div>

Interesting, could you share your code?
