Groovy and grails jdk issue - java

I wish I could give you guys more information on what's going on, but I really have no idea. I am trying to install groovy and grails tools suite from springsource and I am having trouble configuring it to work properly. I have the most up to date JDK, and the preferences show it, but I still get warnings and it does not build. I have posted some pictures below to show what is going on.

on your GGTS go to window
select java
select installed JREs
add-> Standard VM
jRE home select directory up to C:\Program Files\Java\jdk1.6.0_18
select jdk1.6.0_18 from installed JREs

I faced a similar issue (I am sure it is the exact issue) - Here are the steps to ensure it works correctly, I struggled with initially but this got it going.
Install JDK from http://www.java.com ,in a directory where there are NO SPACES in the path
Set JAVA_HOME to your JDK installation
Ensure %JAVA_HOME%\bin; is in your PATH variable.
On the command prompt run java -version, it should give you the path where JDK is installed
Install STS Springsource Tool suite.
Run your STS and create a new grails project and run it.
Let me know if that does not work.

It might be that you are launching Eclipse with a JRE even though you have a JDK installed as one of the compilers in your workspace. To find out if you are launching with a JRE or JDK, go to Help -> About GGTS -> Installation details -> Configuration
Look for the -vm option and make sure it is a JDK not a JRE.

Related

IntelliJ terminal jdk setting

I have a project in IntelliJ Idea that uses jdk 8. In my system I have many jdk installed for development. Every time I create a new terminal window inside IntelliJ, the latest system jdk (jdk 10) is used and not the project one (jdk 8 in this case) and I have to switch manually. Of course I realise the error only after some build which requires jdk 8 does not work properly.
Is there a possibility to set the jdk used in IntelliJ terminal?
Check Preferences->Tools->Terminal do determine the used shell implementation.
Change the shell path or change your environment settings with the used shell to take effect e.g. for setting JAVA_HOME and PATH.
You can even use the "shell integration" flag to load a custom rc config file. Please check the IntelliJ documentation for this.
You are not able to use the configured projects JDK in a dynamic way. If you need this, please file an enhancement request to Jetbrains.
You need to change the SDK version in project structure. You can change it through IntelliJ navigation top bar, by following this path:
File > Project Structure > Project tab > Project SDK
I repost the answer of #yole from the comments. It is not possible.
For anyone else who stumbles on this question, here is how I resolved a similar issue:
Maybe this is just my company's security*, but when a JDK is installed with an .exe, something like the following path is created and added to the root of the %path% variable:
C:\Program Files\Common Files\Oracle\Java\javapath
On that path you'll find a 'java' executable for the installed version of java.
The fix was to simply uninstall that version of java, via the system settings.
* I mean that I was unable to see the 'true' path variable, may have been my company's security.

Issue JDK creating a scala project in Intellij

I have installed the JDK jdk-8u144-windows-x64.exe in my computer in order to set up the tool IntelliJ to play with Scala, well before move forward to IntelliJ installation I ensured the JDK in my computer:
running path:
the running a java version:
Then, I installed the IntelliJ and the Scala plugins, so when finally I'M going to create my first project my laptop configuration is not mapping the JDK:
I tried to add the required environment just clicking on new and go thru the path where I installed the jdk but it doesn't go thru either.
Please, guys, I'm a bit nooby with Scala and IntelliJ, could you please guide me a bit. I tried to follow the instructions in this link but it is not going thru. https://www.scala-lang.org/documentation/getting-started-intellij-track/getting-started-with-scala-in-intellij.html
thanks
Make sure you have set environment variable JAVA_HOME to your java directory, IntelliJ detects JDK using that environment variable, or you can browse the path of java installation directory using "New" button beside jdk and select it.

The specified JRE installation does not exist

I was working on a piece of code in eclipse that was working fine when I stopped work about 8 months ago, when I tried running it today (with no changes made to the files/java installs as far as I know of) I got the above error from eclipse.
I have tried the solution from Eclipse: The specified JRE installation does not exist to no avail. I reinstalled JRE 8 and set jre1.8 as the default system library in the program but am still having the same issue. It persists whether I use jre1.8, jdk1.7, or an executable environment.
Any ideas would be appreciated. Thanks
First of all Eclipse requires JDK, JRE is not enough.
Go to Preferences > Add > Standard VM > Directory and add the path of the JDK Home you want to use.
Then add the JRE Library to your Project Build Path (select Java Build Path after right clicking your project)

Google App Engine JSP can't deploy: java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE

this is hopefully something simple but... Eclipse has been working relatively fine for everything except deploying to GAE.
I can run my GAE app locally, but when I try to deploy to google, I get this message:
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I have set the build path to JDK.
It also happens when trying to deploy the same project from more than one system (win7 and win8) so I suspect the problem is to do with the project itself. This particular project is existing and already running on google for years.
Interesting that this error only shows up when I have .jsp files in my app to deploy. If I remove the jsp files, it deploys without error. (kinda need the jsp files tho)
thanks
link to image of my build path
I had the same problem and was able to deploy successfully after forcing Eclipse to use
the JRE within my SDK directory (Win 7 64bit). To force Eclipse to use a particular JRE see this. It seems that the JVM that Eclipse uses, the JVM that app engine spawns, & the JVM that appconfig uses should all be the same. Hope this helps w/ your situation as well.
I tried setting my project jre to be the same as my eclipse jre according to AlohaCode's answer. This was insufficient for me. The answer was in my classpath, there is java.exe in C:\windows\system32 which was BEFORE my java home variable.
The solution is to put the java home path before the C:\windows\system32 entry.
I found the answer here: 2FL5sJ">https://groups.google.com/forum/?fromgroups=#!msg/google-appengine-java/RyFybJWUhU4/78UE_2FL5sJ
In Eclipse, go to: Window->Preferences->Java->Installed JREs , add->Standard VM TO JDK PATH\JRE. and If you had a JRE checked previously uncheck it and check this jre
The given advice solved my problem. The -vm argument cannot be the first line.
-vm
C:\Program Files (x86)\Java\jdk1.7.0_51\bin\javaw.exe
Setting -vm in eclipse.ini did not help. All other settings were seemingly pointing to the JDK. Out of desperation, I uninstalled all JREs from my system, leaving only the JDK. The consequence was that Eclipse would not start as the JDK bin directory was not on my PATH (Windows 8 here). Adding this in environment system variables got Eclipse to start. Thereafter I could deploy to app engine.
Removing the JRE file located in my C:/Program Files(*86)/Java folder , reopening the eclipse IDE resolved the issue.
I had Java JDK installed in my C:/Program Files/Java folder which was not detected earlier.

Problem in setting up eclim on ubuntu

I downloaded eclim, and according to the installation guide
it requires Eclipse Helios 3.6.x.
So, I went and installed that version of Eclispe manually because it is not at Ubuntu's repositories.
What happened next was that, when I tried installing eclim, it said that it cannot recognize the eclipse version that I have.
Do you have any suggestions of how to resolve this issue?
The Eclipse that you install manually is not usually on the path that Eclipse is installed to when using the software center. I had this problem too while trying to install eclim.
There are two ways to fix it.
You can specify where the new Eclipse is installed to from your manual installation. For example, I manually installed Helios to $HOME/eclipse. When the installer gets to the point where it asks for eclipse's path, I specified it as /home/username/eclipse, replacing username with my name of course. That should find the helios installation, and not the installation in /usr/lib/eclipse.
The second way to do it is to manually make and install eclim from the repositories. The guide for this is here, http://eclim.org/guides/development.html#development-build. That will work you through building eclim from the development build, which may be better anyway as there may be new features not in the release version. Be sure to specify the eclipse home files in the Ant command, like so, ant -Declipse.home=/where/you/installed/eclipseto
Hope this helped, and merry days using eclim. It's really great.

Categories