java.lang.NullPointerException with JDK 11

86 vistas
Ir al primer mensaje no leído

Gabe Lafontant

no leída,
4 nov 2019, 3:03:49 p.m.4/11/2019
para scala-functional
I think I _know_ what the source of my issue is but want to ask if anyone else has seen this problem. Prior to purchasing the book, I had installed scala on my local machine. My JDK version is 11 and the scala version I have installed is 2.12.7. I followed the steps in the wiki: 

```
$ chmod a+x ./sbt
$ ./sbt
```

When I execute the last command I receive the NullPointerException. I think this is due to my machine have JDK 11 installed and I should uninstall it and revert to JDK 8. I think the version of Scala in the book is not supported by the JDK version I have. My analysis is based on these findings:

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html

Once I got back to an older version of the JDK I think I should be fine. Does that make sense?

Jeremiah Malina

no leída,
2 jun 2020, 5:41:33 p.m.2/6/2020
para scala-functional
I experienced this as well on Xubuntu 20.04 where I had JDK 11 installed. I found this and was able to install JDK 8 and switch to it: https://linuxconfig.org/how-to-install-java-on-ubuntu-20-04-lts-focal-fossa-linux

sbt runs and code compiles now

Erik van Oosten

no leída,
3 jun 2020, 5:13:03 a.m.3/6/2020
para scala-fu...@googlegroups.com
If you want to run on JDK 11 you will need to make sure you have a reasonably recent scala version installed. These work: 2.11.12, 2.12.11 and of course 2.13.2. It wouldn't hurt to use a recent sbt version as well.

Kind regards,
    Erik.

--
Erik van Oosten
https://day-to-day-stuff.blogspot.com/
Op 02-06-20 om 23:39 schreef Jeremiah Malina:
--
You received this message because you are subscribed to the Google Groups "scala-functional" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-function...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/scala-functional/69bcd325-40ca-4e3f-afce-ea096a9be810%40googlegroups.com.

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos