Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Kotlin does not work. Unable to programming

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

Kotlin does not work. Unable to programming

  • Quote

Post by Yczo » Sun Sep 05, 2021 11:33 am

Hi, (Thanks in advance)

my first chance was install the Kotlin plugin on eclipse cdt.

Hello World did work:

Code: Select all

fun main(param: Array<String>) {
	println("Hello World")
}


But when I tried to enlarge it to work with val and var:

Code: Select all

fun main(param: Array<String>) {
	println("Hello World 2")
	
	val one: Int = 1
	val two: Int = 2		
	var res: Int = one + two
	
	//println(res)
}
I got the next report:

Code: Select all

ERROR: Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Int'. Check your module classpath for missing or conflicting dependencies (10, 21)
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

My second chance was idea-community (IntelliJ-IDEA).

When I tried to execute it, I got:

Code: Select all

Error occurred during initialization of VM
java.lang.UnsupportedClassVersionError: com/intellij/util/lang/PathClassLoader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2214)
	at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1450)
	at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1430)
I thought, the issue could be on my jvm version

Code: Select all

$ eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-8  system-vm
  [2]   openjdk-bin-8 
I got the same error in icedtea-8 as in the openjdk. Both are the version 8.

Although I have the 11 version installed, it's not displayed by eselect. I wonder why.

Code: Select all

[I] dev-java/openjdk-bin
     Available versions:  
     (8)    8.292_p10^s ~8.302_p08^s
     (11)   11.0.11_p9-r1 (~)11.0.12_p7
       {alsa cups examples +gentoo-vm headless-awt selinux source}
     Installed versions:  8.292_p10(8)^s(12:24:15 05.09.2021)(alsa cups -examples -headless-awt -selinux -source) 11.0.12_p7(11)(12:19:45 05.09.2021)(alsa cups -gentoo-vm -headless-awt -selinux -source)
     Homepage:            https://adoptium.net
     Description:         Prebuilt Java JDK binaries provided by Eclipse Temurin

[I] dev-java/openjdk-jre-bin
     Available versions:  
     (8)    8.292_p10 ~8.302_p08
     (11)   ~11.0.11_p9 (~)11.0.12_p7
       {alsa cups +gentoo-vm headless-awt selinux}
     Installed versions:  11.0.12_p7(11)(12:19:39 05.09.2021)(alsa cups -gentoo-vm -headless-awt -selinux)
     Homepage:            https://adoptium.net
     Description:         Prebuilt Java JRE binaries provided by Eclipse Temurin



Should I install the oracle-jvm?

Any help will be welcomed
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Re: Kotlin does not work. Unable to programming

  • Quote

Post by fedeliallalinea » Sun Sep 05, 2021 1:54 pm

Yczo wrote:Although I have the 11 version installed, it's not displayed by eselect. I wonder why.
Because gentoo-vm use flag on dev-java/openjdk:11 is masked, you can umask it using /etc/portage/profile/package.use.mask
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
papas
Tux's lil' helper
Tux's lil' helper
Posts: 141
Joined: Mon Dec 01, 2014 8:55 pm
Location: Athens

  • Quote

Post by papas » Mon Sep 06, 2021 4:08 pm

You dont need to change your system vm, you can download any jdk you want and set your ide to use it. Any library you need you can add it to your project. I use netbeans and intellij with jdk 14.
Top
Post Reply

3 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic