I am working on the Scala JS Tutorial located at: https://www.scala-js.org/doc/tutorial/basic/index.html which also links to the Repo: https://github.com/scala-js/scalajs-tutorial
So far I get through Step 5. The sample works well when you do:
sbt
~fastLinkJS
So when I run the run command that is where I have problems ( Starting Step 6 ). Node if you are using the Github Repo, make sure you update build.properties SBT version to 1.7.1 ( thats the version I have ).
When I then use the RUN command from within SBT, it will give the error I run into. So i can confirm it is reproducible.
I was not sure if it is also related to my machine. My statics are below:
uname -a:
Darwin HQSML-1689569 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
node --version:
v12.4.0
sbt -version:
sbt version in this project: 1.7.1
sbt script version: 1.7.1
scala -version:
Scala code runner version 3.1.3 -- Copyright 2002-2022, LAMP/EPFL
Is this a current bug? Is this a ScalaJS thing? I was curious if it has lagged behind in comparison to javascript or something and it just fails to understand what the ?. statement means. Nothing is wrong with the jsdom module from what I can tell when looking at the JS itself, so i am thinking it is related to the Interpreter or something?
I have openjdk, scala and sbt, all installed via brew. I'm trying to
get setup to work on the scala track on exercism. I'm having no
troubles with Java or anything that uses the JVM like clojure, but
when I try to test my installation of scala by running the test for
the exercism hello example:
$ sbt test
I get a bunch of errors that seem to start with this:
java.io.IOError: java.lang.RuntimeException:
/packages cannot be represented as URI
My installed versions are as follows:
$ java --version
openjdk 13.0.1 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.1+9, mixed mode, sharing)
$ scala -version
Scala code runner version 2.13.1 --
$ sbt --version
sbt version in this project: 1.3.8
sbt script version: 1.3.8
I've looked and seen this error in a few questions but not seen a way to fix it.
I solved the issue by installing a java version of 1.8 and set JAVA_HOME towards this version.
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home"
I've got the same issue on IntelliJ IDEA and solved it with
Settings > Build, Exec... > Build Tools > sbt > JRE > set to 1.8.
JAVA_HOME has not resolve it in my case
In my case, in Intellij IDEA, I had JAVA_HOME as well as sbt JRE from the previous answer set to 1.8, but I completely forgot about the Project SDK, which was set to an incompatible version.
Ctrl + Alt + Shift + S > Project Settings > Project > Project SDK
Setting this to 1.8 as well as language levels of modules to 8 fixed my issues.
Intellij :
open Settings -> Build, Execution, Deployment -> Scala Compiler -> Scala Compile Server, then change the JDK to the one your project used. This solution solved my problem.
IntelliJ:
Go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> sbt
Make sure Use sbt shell for build is checked
I found this S/O answer solves my issue:
This is a Scala compiler bug. Please upgrade to the latest Scala point release, 2.12.16.
I have installed sbt plugin version 1.0.4 and I’m trying to import a starter scala project built on Scala 2.12.4. When i try to the import that project, the IntelliJ external model list doesn’t show sbt.
Where am i going wrong?
Thank you in advanced.
Im using a macbook air on OS X El Capitan 10.11.16.
Remove and install the Scala plugin again works for me.
Perhaps try with the latest version of the IntelliJ and the SBT plugin. Hope this helps!
https://plugins.jetbrains.com/plugin/5007-sbt
I have an issue and after many attempts don't know how to resolve it.
I have Java/Maven project with JDK 6 and installed Maven 3.2.5 in Eclipse Luna
Now I'm trying to run clean install command to create ZIP package but getting the following error message:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ABC: Fatal error compiling: invalid target release: 1.7
Does someone has this issue before and how do you resolve it.?
Could you help me please?
Thanks in advance.
The project you are attempting to compile specifies that the generated bytecode should be for Java 1.7. To do that you have to have a JDK7 or later.
Either change the project to specify 1.6, or upgrade your Java to 1.7. (There is really no reason to still stay on Java 1.6, it is old and obsolete now.)
I'm running Eclipse with RoboVM plugin and I wanted to try IOSDemo sample project described on robovm.org (http://www.robovm.org/docs.html). When creating the project in Eclipse and running it I got following error message.
An internal error occurred during: "Launching IOSDemo".
java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class soot.toolkits.scalar.LocalSplitter
I found out that it's related to JDK version (I'm running JDK 8.0 ea, build 112). When running on JDK 1.7.0_45 and building the project on cmd line it builds and runs OK.
Is it known problem, is there any workaround or fix? Thanks
This is most probably due to a bug [1] in the recent early access builds of Java8. It looks like the bug was resolved a few days ago but as far as I can see the fix didn't make it into the b113 build. Please use the latest Java7 release or an earlier Java8 EA build until a Java8 build is available with this fix included.
[1] https://bugs.openjdk.java.net/browse/JDK-8026394