sbt runs on command line but not VS code - scala

So I've been trying to run scala on vs code for nearly a week now with no luck. We have been recommended to use sbt to run our programs.
I'm running java version "1.8.0_301" on my build environment.
when running the sbt command on vs code I get project loading failed with this error:
[error] java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
What's weird is that I can run sbt on my command line with no problems!
I'm pretty new to this so any help would be greatly appreciated.
https://imgur.com/l2qzS01 (link to the vs code window after failed loading and scala running on terminal)
cheers!

This is an error that occurs with outdated sbt versions. Upgrade to the latest sbt version and you should be fine.
Unfortunately I don't recall exactly when this was fixed.

Related

jsdom in scalajs tutorial throws error on run with `?.`

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?

Failed to apply plugin in android studio

I am working on an app its work good. after i apply external plugin that return error Failed to apply plugin .
my build tool version 2.2.3
and compile version 24
Unfortunately, the suggestion of G.K. did not work!
Please run the following command in your terminal:
.gradlew clean --refresh-dependencies
This will grap the newest version of the Calldorado plugin that is causing this error. The newest version has a fix in it.

Error mvn gcloud:run JAVA

I've been trying hard to run & deploy my java project in google compute vm. I followed this tutorial: https://github.com/GoogleCloudPlatform/appengine-java-vm-guestbook-extras but always receiving this error:
[INFO] params['tls'] = docker.docker.tls.TLSConfig(
[INFO] AttributeError: 'module' object has no attribute 'docker'
[ERROR] Error: gcloud app xxx exit code is: 1
[ERROR] org.apache.maven.plugin.MojoExecutionException: Error: gcloud app xxx exit code is: 1
I'm running MacOS Yosemite 10.10.3. Last versions of docker, virtual box, etc.
Any ideas?
I don't have the reputation to comment, so I'm adding this as an answer. I'll edit once I have a real answer for you.
What version of gcloud do you have? Can you post the output of gcloud info? I think this may be fixed in the latest version of gcloud.
Once you have that information, try running gcloud components update and see if that helps.
Try to run this command in a shell, dollar symbol included
$(boot2docker shellinit)
You may find this useful
https://cloud.google.com/appengine/docs/managed-vms/getting-started
I had encountered the same error recently. You seem to be using an outdated plugin version for gcloud-maven-plugin (most probably 1.9.17 or 1.9.17a). Update the version to a version equal to or after 0.9.57 from here Gcloud Maven PLugin versions.

RoboVM not working on JDK 1.8.0 b112

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

gradle eclipse integration -

I'm using a eclipse 4.2 distribution and have installed the gradle eclipse integration plugin from springsource.
When I initially try to create a quick java project with the wizard I get the following error:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at C:\devtools\gradle-1.4\docs\userguide\gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Could not fetch model of type 'HierarchicalEclipseProject' using Gradle installation 'C:\devtools\gradle-1.4'.
When I run gradle build in the command line everything's fine.
Any ideas how i could get this to work?
Cheers
Since you can run gradle in command line successfully, you would want to try to use that gradle in the eclipse plugin.
Set Preference -> Gradle -> Gradle Distribution -> Folder to your own gradle distribution that runs fine.