How to execute sbt on Windows to open the interactive shell? - windows

Whenever I type the word sbt in my cmd I get the following message:
Any help will be appreciated!

The sbt script you use is meant only for Unix environments like Linux or Unix-like environments for Windows like cygwin or mingw.
Please note that you're on Windows so you need the sbt scripts for Windows.
Download the sbt installer for Windows from http://www.scala-sbt.org/download.html. You may consider using Typesafe Activator since it's "a browser-based or command-line tool that helps developers get started with the Typesafe Reactive Platform."
As noted in Under the Covers in the official documentation of Typesafe Activator:
Activator applications use sbt under the covers. This means that
anything you can do in sbt you can do with an application in
Activator. For instance, sbt plugins can easily be added to
applications in Activator just like they would normally be added.
I highly recommend Typesafe Activator.

I use https://chocolatey.org/ to install, so once you follow the instruction and have choco installed, simply run choco install sbt in admin powershell [choose from Windows + X]
Once that is done, open another powershell and simply run sbt.
I am running on Windows 10, and do remember to choco install jdk8 as well.

Related

Why I couldn't run same installed app on IDE integrated terminal even I could run on default terminal

I just switch to try develop on Linux for a while.
But one thing I couldn't understand how to solve it, as I mentioned in topic.
I'm going to develop a project that need Java SDK, then I installed the SDK with command:
#bash
sudo apt install openjdk-17-jdk-headless
After installation finished, I could run command java -version and javac -version to see the result of installation and it looks OK.
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1)
OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
And then when I open IDE (Intellij IDEA) and it has feature of integrated terminal. (see picture)
But when I try to test java -version it was shown the error:
bash: java: command not found
As you can see from picture, I run java -version on terminal it return output properly, but when I run the same command java -version, it output with error message, like it couldn't find the java SDK that I installed.
Could anyone help me to describe the reason and solutions to solve the issue?
P.S. This is same on VS Codium.
I found the answer.
Solution:
Install the IDE app with the file from official website instead of using package manager of OS.
Description:
The cause is I installed the IDE via Package Manager of OS (here I'm using Pop_OS, install via Pop!_Shop)
And its package manager has some strict rules for security purpose.
I'm not sure, Pop_OS using which package manager, but I'll raise Flatpak as reference: https://docs.flatpak.org/en/latest/sandbox-permissions.html
And on blacklisted directories, my installed java command is under /usr/bin/ which is in blacklist.

Finding Groovy on Mac OS after installing it via SDKMAN

I am using Mac OS and have installed groovy via SDKMAN. It says that groovy is installed however I do not know where it has been installed or how to open it and if I need to install an environment to open it in. Any help would be hugely appreciated.
When you install groovy (or other tool) via sdkman, it defines an environment variable: _TOOL_HOME in this particular case it will be GROOVY_HOME.
Run:
echo $GROOVY_HOME
in terminal and you will know the place where it's installed.

How to run eclipse on bash on Ubuntu on Windows?

I have eclipse installed on my windows machine, but I can't seem to use it with bash so I installed eclipse on the bash terminal by using "sudo apt-get install eclipse". It installed fine, but I can't figure out how to launch the eclipse GUI from the linux subsystem so I can use it like the windows version. I tried using Xming and exporting DISPLAY, but that didn't work. Any ideas?
from what i understood from the link below, you require to update .bashrc to direct the GUI display to a X Server process. I installed xMing to run X Server from Windows 10. i also had to install gtk components that allowed me to run sublime text GUI from within WSL.
https://medium.com/#pck/how-to-use-sublime-text-3-from-command-line-with-ubuntu-bash-terminal-in-windows-10-subsystems-for-aa2ad59d088c
hope this helps
IMHO you should not install eclipse by apt but simply get your desired eclipse product from from https://www.eclipse.org/downloads/packages , download and unzip it to your wanted location and just start eclipse.
Reasons:
I do not know any Linux distribution containing a newer eclipse bundled, so you are always having older versions being slower and having less features
You can update your eclipse installation directly inside eclipse Check for updates
You can have multiple installations at same time
If you want to get rid of a eclipse installation just remove the folder and you are done.
But of course you can also use bash directly in Windows with Eclipse.
Please look at
https://stackoverflow.com/a/62724163/2590615 or take a glimpse at You Tube Video about Bash Debugging with Bash Editor eclipse plugin on a Windows 10 machine
PS: I am the maintainer of the mentioned eclipse plugin

Where are Typesafe Activator downloaded files and where is Scala installed? Macbook OSX

I am new to scala and use Macbook for short time and yesterday I downloaded Typesafe Activator, installed it and executed command: activator and activator ui
Then, many files has been downloaded but I wonder: where are they?
I am searching for, for example, Scala files but can find it.. Or they were not downloaded at all?
I have done the research but found nothing
will appreciate your help, thanks
What exactly are you trying to achieve?
If you need system global scala and sbt binaries, you can use homebrew like this:
brew install scala and/or brew install sbt.
Don't forget to brew update and brew doctor before :)
Activator itself just downloads jar and then runs it via OS X's preinstalled java, so no "scala files" was downloaded :)
After downloading activator you can create template projects via activator new [project-name] [template-name], list of available templates is available either in Activator Web UI or via activator list-templates command. After creating project under [project-name] dir you will have script activator there which itself runs sbt. You can use it just like usual local sbt installation.

Running SonarQube on Solaris using Jsvc

The SonarQube 5.0 documentation states that in order to install SonarQube on AIX, HPUX or Solaris, one must install Java Service Wrapper, which is licensed software.
Is it possible to do this using some free/open source alternative?
There's a Jsvc library by Apache that is used to accomplish the same functionality. I wonder if anyone has successfully managed to use it.
We haven't documented it yet, but with SonarQube 5.0+, you can start SonarQube using a simple Java process.
Just open a terminal and run:
java -jar <sq_install_dir>/lib/sonar-application-5.0.jar
This should allow you to run SonarQube on Solaris without needing to install anything else.

Resources