Kotlin And Java In The Same Project Using Eclipse IDE
I posted a similar question regarding gradle but this question is without gradle or maven.
I can not get Kotlin working properly using Eclipse IDE. This works great using IntelliJ, however many developers still use Eclipse. I have installed the Kotlin Eclipse plugin and does not work. I have downloaded the Kotlin standard library and runtime library and added them into the project. Still not working. All I get in eclipse when I have Java and Kotlin is cannot be resolve to a specified type.
I'm not using maven or gradle because I couldn't get it working with those two either.
If I mix Java and Kotlin in the same source folder I get this error.
"The type error.NonExistentClass cannot be resolved. It is indirectly referenced from required .class files"
I'm using Eclipse Neon. If anyone can help me that would be awesome, I've been trying for quite some time now and not getting anywhere. :(

eclipse kotlin
add a comment |
I posted a similar question regarding gradle but this question is without gradle or maven.
I can not get Kotlin working properly using Eclipse IDE. This works great using IntelliJ, however many developers still use Eclipse. I have installed the Kotlin Eclipse plugin and does not work. I have downloaded the Kotlin standard library and runtime library and added them into the project. Still not working. All I get in eclipse when I have Java and Kotlin is cannot be resolve to a specified type.
I'm not using maven or gradle because I couldn't get it working with those two either.
If I mix Java and Kotlin in the same source folder I get this error.
"The type error.NonExistentClass cannot be resolved. It is indirectly referenced from required .class files"
I'm using Eclipse Neon. If anyone can help me that would be awesome, I've been trying for quite some time now and not getting anywhere. :(

eclipse kotlin
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
1
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53
add a comment |
I posted a similar question regarding gradle but this question is without gradle or maven.
I can not get Kotlin working properly using Eclipse IDE. This works great using IntelliJ, however many developers still use Eclipse. I have installed the Kotlin Eclipse plugin and does not work. I have downloaded the Kotlin standard library and runtime library and added them into the project. Still not working. All I get in eclipse when I have Java and Kotlin is cannot be resolve to a specified type.
I'm not using maven or gradle because I couldn't get it working with those two either.
If I mix Java and Kotlin in the same source folder I get this error.
"The type error.NonExistentClass cannot be resolved. It is indirectly referenced from required .class files"
I'm using Eclipse Neon. If anyone can help me that would be awesome, I've been trying for quite some time now and not getting anywhere. :(

eclipse kotlin
I posted a similar question regarding gradle but this question is without gradle or maven.
I can not get Kotlin working properly using Eclipse IDE. This works great using IntelliJ, however many developers still use Eclipse. I have installed the Kotlin Eclipse plugin and does not work. I have downloaded the Kotlin standard library and runtime library and added them into the project. Still not working. All I get in eclipse when I have Java and Kotlin is cannot be resolve to a specified type.
I'm not using maven or gradle because I couldn't get it working with those two either.
If I mix Java and Kotlin in the same source folder I get this error.
"The type error.NonExistentClass cannot be resolved. It is indirectly referenced from required .class files"
I'm using Eclipse Neon. If anyone can help me that would be awesome, I've been trying for quite some time now and not getting anywhere. :(

eclipse kotlin
eclipse kotlin
edited Jul 4 '16 at 22:38
asked Jul 4 '16 at 22:26
user6186835
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
1
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53
add a comment |
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
1
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
1
1
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53
add a comment |
3 Answers
3
active
oldest
votes
Add Kotlin Nature fixes the issue. Click on your project and Configure
Kotlin -> Add Kotlin nature
This partially fixes the issue, though eclipse plugin is still buggy and auto import function still doesn't work for me.
If you're having any issue, make sure you have kotlin_bin folder added in your project. Also make sure that ALL kotlin files have the correct package name sometimes when you rename packages or move files around kotlin classes may not get updated.
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure Kotlin -> Add Kotlin nature
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
add a comment |
Got similar issue solved by adding a new Kotlin file to a Kotlin/Java mixed project. Adding the file caused Eclipse 2018-09 (4.9.0) to add kotlin-stdlib.jar and kotlin-reflect.jar to classpath and everything started working.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38192921%2fkotlin-and-java-in-the-same-project-using-eclipse-ide%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Add Kotlin Nature fixes the issue. Click on your project and Configure
Kotlin -> Add Kotlin nature
This partially fixes the issue, though eclipse plugin is still buggy and auto import function still doesn't work for me.
If you're having any issue, make sure you have kotlin_bin folder added in your project. Also make sure that ALL kotlin files have the correct package name sometimes when you rename packages or move files around kotlin classes may not get updated.
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure
Kotlin -> Add Kotlin nature
This partially fixes the issue, though eclipse plugin is still buggy and auto import function still doesn't work for me.
If you're having any issue, make sure you have kotlin_bin folder added in your project. Also make sure that ALL kotlin files have the correct package name sometimes when you rename packages or move files around kotlin classes may not get updated.
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure
Kotlin -> Add Kotlin nature
This partially fixes the issue, though eclipse plugin is still buggy and auto import function still doesn't work for me.
If you're having any issue, make sure you have kotlin_bin folder added in your project. Also make sure that ALL kotlin files have the correct package name sometimes when you rename packages or move files around kotlin classes may not get updated.
Add Kotlin Nature fixes the issue. Click on your project and Configure
Kotlin -> Add Kotlin nature
This partially fixes the issue, though eclipse plugin is still buggy and auto import function still doesn't work for me.
If you're having any issue, make sure you have kotlin_bin folder added in your project. Also make sure that ALL kotlin files have the correct package name sometimes when you rename packages or move files around kotlin classes may not get updated.
edited Jun 19 '17 at 20:44
Johannes Rudolph
28k1293152
28k1293152
answered Jul 6 '16 at 9:06
user6186835
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
add a comment |
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
It seems Kotlin plugin does not (re)-generate .class files for .kt files unless we run one of the .kt files. Is there a way to get around this issue? In an existing Spring boot application, I was trying to add a new controller in Kotlin
– Wand Maker
Jun 19 '18 at 4:14
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure Kotlin -> Add Kotlin nature
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure Kotlin -> Add Kotlin nature
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
add a comment |
Add Kotlin Nature fixes the issue. Click on your project and Configure Kotlin -> Add Kotlin nature
Add Kotlin Nature fixes the issue. Click on your project and Configure Kotlin -> Add Kotlin nature
answered Apr 10 '17 at 8:55
user2718311user2718311
112
112
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
add a comment |
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
As of eclipse photon, I don't actually see this as an option on my projects.
– aaiezza
Dec 11 '18 at 18:53
add a comment |
Got similar issue solved by adding a new Kotlin file to a Kotlin/Java mixed project. Adding the file caused Eclipse 2018-09 (4.9.0) to add kotlin-stdlib.jar and kotlin-reflect.jar to classpath and everything started working.
add a comment |
Got similar issue solved by adding a new Kotlin file to a Kotlin/Java mixed project. Adding the file caused Eclipse 2018-09 (4.9.0) to add kotlin-stdlib.jar and kotlin-reflect.jar to classpath and everything started working.
add a comment |
Got similar issue solved by adding a new Kotlin file to a Kotlin/Java mixed project. Adding the file caused Eclipse 2018-09 (4.9.0) to add kotlin-stdlib.jar and kotlin-reflect.jar to classpath and everything started working.
Got similar issue solved by adding a new Kotlin file to a Kotlin/Java mixed project. Adding the file caused Eclipse 2018-09 (4.9.0) to add kotlin-stdlib.jar and kotlin-reflect.jar to classpath and everything started working.
answered Nov 14 '18 at 16:45
SuulaSuula
3613
3613
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38192921%2fkotlin-and-java-in-the-same-project-using-eclipse-ide%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please try to modify and then save Kotlin source file. Also could you please check that there are some class files under "Kotlin Runtime Library/kotlin_bin" folder? (like on the screenshot: prnt.sc/bp5eym)
– Mikhail Zarechenskiy
Jul 5 '16 at 16:52
Mikhail Zarechenskiy, thanks for answering back. I looked, and there are no class files under "Kotlin Runtime Library/kotlin_bin here's a screenshot. prnt.sc/bpetrg how do I fix this problem? I've tried removing the plugin and adding the plugin back and configuring my build paths but still haven't had any luck. :( The project I am using is found here github.com/Vult-R/Astraeus-Java-Framework
– user6186835
Jul 6 '16 at 8:18
1
how mature is the Kotlin support for Eclipse?
– ycomp
Jan 14 '17 at 6:53