not able to install Groovy in windows 10 - groovy

I am trying to install Groovy on windows 10. I have Java 17.0.4.1 installed and trying to install groovy 4.0.5 & here is the link (https://groovy.jfrog.io/ui/native/dist-release-local/groovy-windows-installer/groovy-4.0.5/) after installation I opened command prompt typed "groovy --version" its returning empty.
I have looked at the Environment variable under System variables GROOVY_HOME is created and also the Path.
this image is from the Path:
I am not able to understand why the "groovy --version" is giving empty. Please help me with this issue.

I also faced similar issue today !!
Below are my findings and solved my problem if these can help
My JDK installed in system : C:\Program Files\Java\jdk1.8.0_201
I set Environment Variable : JAVA_HOME and value : C:\Program Files\Java\jdk1.8.0_201
I installed using installer - groovy-4.0.7.msi
I set Environment Variable : GROOVY_HOME and value : %GROOVY_HOME%bin
groovy -version
Groovy Version: 4.0.7 JVM: 1.8.0_201 Vendor: Oracle Corporation OS: Windows 10
Apology I am not able to share screen shot. Hope this might help.

Related

Groovy - JAVA_HOME not set and cannot find javac

I am trying to install Groovy on windows using WSL.
After installing sdkman, I run
$ sdk install groovy
Downloading: groovy 3.0.9
In progress...
############################## 100.0%
Installing: groovy 3.0.9
Done installing!
Setting groovy 3.0.9 as default.
Then I want to check, if it works, but i got this.
$ groovy -version
groovy: JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME.
Do you know where the sdk installs groovy?
Should I install anything else?
How to set path to JAVA_HOME?
I found only very old (6-7 years) post on this topic.
Additionally, I want to use vscode as editor/IDE. Do you recommend any plugins?
If you have installed Java in host then you need to export the environment variable correctly or else you need to install Java in WSL.

SQLCL with Adoptopenjdk

I would like to understand some "magic", here is how to reproduce :
Get SQLCL here : https://www.oracle.com/fr/database/technologies/appdev/sqlcl.html
But SQLCL need jre 1.8 so get AdoptOpenJDK 8 here : https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot
When java_home is set and sqlcl in path :
c:\[...]> java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)
c:\[...]> sql
This application requires a Java Runtime Environment 1.8.0_220
Two solution i found :
Install latest official JRE 1.8.
Copy jre from adoptopenjdk next (and NOT IN) to the sqlcl folder.
Note : i installed openjdk in the default folder but sqlcl in a custom one, on the same drive.
How do you explain that ?
(I would like to use openjdk so don't realy like the first solution, and find the second one a little dirty...)
The explanation for the second solution is that SQLcl is kind of part of SQL Developer. As if the folder SQLcl is inside the SQLDeveloper folder. And there, there is a jdk/jre folder.

How to fix "groovy: JAVA_HOME is not defined correctly, can not execute" issue?

http://groovy-lang.org/install.html
I have tried to install groovy using (SDKMAN type) above link in ubuntu 16.04 but when i'm trying to verify the installed groovy version. groovy -version
I'm getting below error
groovy: JAVA_HOME is not defined correctly, can not execute:
Can anyone help me on this ?

OpenJDK 9 IntelliJ IDEA (Ubuntu) "Can't resolve Symbol"

I recently installed openJDK 9 under Ubuntu 17.10 and it seems like IntelliJ IDEA has trouble with it.
Whenever I create a new project IntelliJ can find the JDK, but it seems like it's not configuring it the right way. Here is how it looks like
when I create a HelloWorld.java example it looks like this
and it says 'Can't resolve symbol 'String''.
Everything works fine when I compile via terminal and even with Eclipse.
When I type 'java --version' it says
openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
Is there a way to fix this problem?
The problem is related to Debian packaging of openjdk-9 in the lib/jrt-fs.jar file. This file is compiled incorrectly.
This bug is reported here and there is a more complete Answer here.
If you insist to make use of openjdk you might wait for the new versions or try to build it from the source using the recommended options on the launchpad.

JAVA_HOME issue with Grails

I just installed Grails through sdkman, ie: sdk install grails
Evrything seems to have worked fine,
But when I type grails -version this error comes out:
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-1.7.0- openjdk-i386
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
I'm on linux mint Raffaela
I know this should be an error of JAVA_HOME pointing to the wrong place, but I can't figure out why, this set up works just fine with my Android Studio for example...
Any ideas?
Thanks in advance!
Check your path to java:
echo $JAVA_HOME
Looks like there are wrong path in gradle settings

Resources