I'm running:
IntelliJ Ultimate 2016.3
Homebrew 1.1.2
OS X 10.11.5 El Capitan
I ran brew install groovy which resulted in groovy being installed in /usr/local/Cellar/groovy/2.4.7/. Brew also added a symlink: /usr/local/bin/groovy -> ../Cellar/groovy/2.4.7/bin/groovy
When I open the groovy project in IntelliJ, it gives me an option to Configure a Groovy SDK. I haven't set this up yet, so I get a "Create" button, which launches finder. From what I can tell there's nothing that I can select to make IntelliJ happy. I've tried /user/local/bin/groovy, /user/local/Cellar/groovy, /user/local/Cellar/groovy/2.4.7, /user/local/Cellar/groovy/2.4.7/bin etc. No mater which I choose, IntelliJ doesn't accept the library and continues to tell me "Error: library is not specified".
Does anyone know how I'm supposed to go about telling IntelliJ where groovy is?
Install groovysdk:
brew remove groovy
brew install groovysdk
Set GROOVY_HOME, otherwise Intellij reports as broken installation:
export GROOVY_HOME=/usr/local/opt/groovy/libexec
Point IntelliJ to the installed directory, e.g.:
/usr/local/Cellar/groovysdk/2.4.7/libexec
brew install groovysdk
Right-Click on Project Root Folder or if a Config Wizard Pops up at the top of your windows we can click that link.
Select Add Project Framework Support
Scroll down and select Groovy
If it does not show in the list; it's because it already has the framework added.
If Groovy has not been added to IntellJ then Select Create...
browse /usr/local/Cellar/groovysdk//libexec/ e.g: /usr/local/Cellar/groovysdk/2.4.11/libexec/
Gotcha - It does show file browser that does not let you view your /usr/local file path, you need to press shift + command + g will open a dialog where you can type the path of any folder that you want to open
Done.
/usr/local/opt/groovy/libexec.
use brew info groovy to print help:
==> Caveats
You should set GROOVY_HOME:
export GROOVY_HOME=/usr/local/opt/groovy/libexec
I did this with Intellij IDEA 2016.3 on OS X.
I am able to configure this under Project Settings -> Global Libraries.
Add a new global library by clicking the + and select Java
Navigate to the location homebrew installed Groovy, /usr/local/Cellar/groovy/2.4.7 and select all the JAR files in the libexec/lib directory.
Set the name to groovy-2.4.7, or whatever works for you.
It is very easy to do:
Install groovy:
brew install groovy
Point IntelliJ to the following directory:
/usr/local/Cellar/groovysdk/<version>/libexec
You will see that intellij will get all the required dependencies
Because I could not select /usr in the open dialog, I used to 'go to folder' function of finder and created a favorite entry for /usr/local/opt/groovy/libexec
which worked.
Related
Currently, I have IntelliJ IDEA 2016.3 installed in my Ubuntu 16.04 for Java programming. I have installed it through the IntelliJ website and not the ppa. Upon launching it, I get an update available notification on bottom right corner and upon clicking update, it opens the IntelliJ IDEA webpage for downloading the latest IDE tar file. I know that in order to install it, I need to download the tar file, untar it inusr/local, and run idea.sh from the bin folder. Even after doing that, when I search for IntelliJ in the Unity Dash, I see the icon for the old 2016.3 version and upon clicking it, it opens the same old version.
So my question is, how can I update the entire existing IntelliJ platform and see it as the result upon search in the Unity Dash? Can I update it in the same way in which I can update the existing plug-ins and see them in effect upon restarting IntelliJ?
I recommend using Toolbox App for the seamless automatic updates.
If you have upgraded manually, use the Tools | Create Command-line Launcher and Create Desktop Entry to update the old ones.
I also suggest to use ToolBox but in case it is not an option, I just upgraded from IntelliJ 173 to 181 in Ubuntu 16.04 manually and I did it like this.
Download the new IntelliJ version's .tar.gz file from Jetbrains
website
Untar the file and put all of its content to the desired location. I put mine in /opt folder for example: sudo tar -zxf ideaIU-2018.1.tar.gz -C /opt
Go inside the new IntelliJ's folder and run the idea.sh script. Example:
cd /opt/idea-IU-181.4203.550/bin then ./idea.sh and follow the instructions (select the option to import your settings from your previous Idea's version).
At this moment you have two versions installed but you run the old one when clicking on the Idea icon from the launcher. The problem is that the file (with extension .desktop) that sets up the launcher's icon still points to your old version. You can change that.
The desktop file may be in ~/.local/share/application or /usr/share/applications. Mine was in ~/.local/share/application and its name was jetbrains-idea.desktop.
Edit jetbrains-idea.desktop file with your favorite editor and change the values that need to be changed. In my case I only had to change the values of "Icon" and "Exec" properties. Check the real path from your IntelliJ's installation folder (what we did in point 2 above). Example below of my modified .desktop file:
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/opt/idea-IU-181.4203.550/bin/idea.png
Exec="/opt/idea-IU-181.4203.550/bin/idea.sh" %f
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea
Save the file and check that its syntax with the command desktop-file-validate pathOfYour.desktopFile (no output means all is fine).
Update your system with the latest changes for .desktop files: sudo update-desktop-database.
Check that the icon from the launcher now launches the new version of IntelliJ. If it does not, log off and log on from Ubuntu. That should do.
You can delete the directory of your previous IntelliJ's version + its hidden directory in your home folder.
You may want to update the values of the executable file /usr/local/bin/idea (if it exists) to point to your new version.
In case anyone still needs an optional solution.
First of all, just install the new version IntelliJ as the first three steps of #Stephane B.'s solution
Download the new IntelliJ version's .tar.gz file from Jetbrains website
Untar the file and put all of its content to the desired location. I put mine in /opt folder for example: sudo tar -zxf ideaIU-2018.1.tar.gz -C /opt
Go inside the new IntelliJ's folder and run the idea.sh script. Example: cd /opt/idea-IU-181.4203.550/bin then ./idea.sh and follow the instructions (select the option to import your settings from your previous Idea's version).
At this moment you have two versions installed but you run the old one when clicking on the Idea icon from the launcher.
To start the new version intelliJ from the launcher:
In the new version IntelliJ, click Configure -> Create Desktop Entry. Now you can start new version from the launcher.
(Optional) You may want to delete the old one. sudo rm -rf /opt/idea-xxx-old-version-xxx
If you are an admin on your system, you are usually in the sudo group
# This will change the group of Intellij folder, subfolders and files to a
# likely existing admin group `sudo` that you will likely be apart of as an admin.
sudo chgrp -R sudo /opt/intellij-idea-community
# Add `+` `w`rite permission for `g`roup for the Intellij folder, subfolders and files
sudo chmod -R g+w /opt/intellij-idea-community
Now you should be able to run the update from the UI (Tested successfully on Ubuntu 14.04).
I have a problem running Gradle project in eclipse Neon.2.
I find out that there is a problem with JDK path.
Somehow my gradle in elipse always use some strange JRE as a Java Home, when it should use a path to a JDK. I double checked my settings in eclipse and system variables, but still i cant find the solution.
I searched for answers and find out that people suggested changing Gradle settings in elipse.
I did all the settings but it still doesnt work.
All the settings
Btw, if I manualy set the Java Home while creating Gradle project it all works fine. But it has to work on other computers so I cant really use that solution.
That works fine
Create/update gradle.properties in GRADLE_USER_HOME ( C:\users\<user>/.gradle or linux ~/.gradle) with
org.gradle.java.home=<path to jdk>
In Preference of Eclipse (main menu: Window -> Preferences), select
Gradle -> Arguments -> Java Home, select "Workspace JRE".
Then select one of your jdk in your workspace.
Specified VM install not found: type Standard VM, name jre7
Have you ever encountered this problem in Eclipse while building an ant file? Then this article is for you. Deleting and recreating the workspace is not the solution. There is an easy solution to fix this issue without recreating the workspace.
Right Click on build.xml
Go to "Run As" >> "External Tools Configurations..."
It shall open new window
Go to JRE tab
Select proper JRE if missing (sometimes jre tabs shows error mark on that.)
For more technical details or issue similar to this find my blog here.
In my case it happen as I have changed my JRE.
Solution :
Right click on your ant script > Run as > External tool configurations... > Go to JRE tab > select JRE
Hope this help.
Thanks,
Sagar Vyas
Best answer found at
It happened for me after Un-installing Java and installing new version.
All I have to do is in eclipse open Installed JREs from
Windows --> Preferences --> Java --> Installed JREs
Then Add new JRE information. Details can be found here
This is a preferred way tell projects which JDK container to use, especially true if two or more devs are using the same version controlled eclipse project folder.
Window/Preferences/Java/Installed JREs
List one or more JDKs installed on your computer. Eclipse defaults name to jdk1.X.X_XX you should keep it as is. Never link project build settings directly to use these names.
Window/Preferences/Java/Installed JREs/Execution Environments
List of common jvm environments such as JavaSE-1.6 and JavaSE-1-7 names. Click rows and choose jre instance on the right side panel. These names are common and all team members should already have them in Eclipse installation.
Step 1: This is where you may accidentally have nothing chosen if JREs were uninstalled or names changed in InstalledJREs setting. You may get
Specified vm install not found error dialog.
Step 2: Choose 2nd mouse on build.xml file/Run As/Ant Build... popup menu entry. Click on JRE tab and choose execution environment. This may have obsolete value from the previous jdk values.
Project Properties/Java Build Path/Libraries
Add Library.../JRE System Library/(x)Execution environment
Choose execution environment to be used for this project. Team members may not have exact _XX jdk build but they can use the same version controlled eclipse project settings. Execution environment mapping hides user specific details.
Just had this issue & the solution above does not work, atleast not for me.
Instead I went the solution provided here:http://www.javaworkspace.com/VMNotFound.do
Essentially you go to the directory C:\projects\WORKSPACE.metadata.plugins\org.eclipse.debug.core.launches
In there search for the string of the JDK that that eclipse is moaining about & change it to the name of your installed JDK that you want to use that eclipse knows about.
You can change what JRE the ant bulid file is launched with inside eclipse.
Right click on the ant file in the ant view and select "Run As"->"Ant..." from the context menu.
Then in the launch dialog select the JRE tab. Note the error message at the top if it can't find the JRE that it expects.
Select a JRE that you have installed or manage install a new one. You can also add vm arguments (enable logging or change memory alocation) if you need to in this dialog.
Just delete the below file
"<Your eclipse workspace location>\.metadata\.plugins\org.eclipse.debug.core\.launches\<projectname>.xml.launch"
link to post
The last answer is absolutely correct, however a fast track way is to delete the project reference from eclipse (make sure to keep unchecked delete source) and import your project folder again. This way the project configurations are reset by eclipse using the new jdk.
But a wonderful post it did help me.
After Java update ant build failed and the below steps fixed it .
Right Click on build.xml-Run As-External Tools
Go to JRE tab and check the box to use the JRE same as workspace.
Removed below file and build maven project again, worked for me.
.metadata.plugins\org.eclipse.debug.core.launches\.xml.launch"
(ant file)Run As--> External Tool Configuations,
go to JRE tab and choose JRE
I am using PyDev for Eclipse as my IDE and pip as my package management tool, running virtualenv.
Every time I want to use/include some new libraries or new dependencies in my project, I add them into the pip-requires file. The dependencies are installed in my virtual environment with no problem after running pip install -r pip-requires.
My Env:
Ubuntu 12.04
PyDev for Eclipse 2.7.1.2012100913
Python 2.7.3
Eclipse indigo
Update: My Pydev Setup:
Questions:
eclipse/pydev knows nothing about the new libraries being added in my virtual env. I had to manually add the .egg source folder into eclipse project's PYTHONPATH one by one in order to resolve all the unresolved imports which was very annoying! Can the python dependencies be resolved in a easier manner?
Update:
I found that if I use virtual env Env/bin/python as the interpreter as the screenshot indicates, some of the basic modules are not resolved in eclipse, eg. import copy, import json etc. should I use default /usr/bin/python as interpreter and just add virtual env site-package to the PYTHONPATH? so that I can resolve both standard python libraries(eg. json) and my own project dependencies?
Make sure your system PYTHONPATH include the site-packages folder when you choose python interpreter from your virtualenv. Just like the snapshot.
Then you don't need to add them one by one into PYTHONPATH. You will need to restart eclipse (Refresh doesn't work). New models will be added.
Update:
I checked the PYTHONPATH in the virtualenv. I found there are some other paths in the sys.path. They are the system default python installed location. These path includes the basic models, like copy and json.
PS: My environment is Max OSX 10.8. Please check the output of your own platform by print sys.path
/Users/username/.virtualenvs/test/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
/Users/username/.virtualenvs/test/lib/python2.7/site-packages/pip-1.1-py2.7.egg
/Users/username/.virtualenvs/test/lib/python27.zip
/Users/username/.virtualenvs/test/lib/python2.7
/Users/username/.virtualenvs/test/lib/python2.7/plat-darwin
/Users/username/.virtualenvs/test/lib/python2.7/plat-mac
/Users/username/.virtualenvs/test/lib/python2.7/plat-mac/lib-scriptpackages
/Users/username/.virtualenvs/test/lib/python2.7/lib-tk
/Users/username/.virtualenvs/test/lib/python2.7/lib-old
/Users/username/.virtualenvs/test/lib/python2.7/lib-dynload
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/Users/username/.virtualenvs/test/lib/python2.7/site-packages
I think this is the requirement of virtualenv. You need to add these paths into pydev system PYTHONPATH. Then you can use these basic modules.
From your questions I understood that you're manually adding the Python Egg packages to the path. Instead of doing this, you can just go to the Project Settings window, then open "PyDev - PYTHONPATH", navigate to the panel called "External Libraries" and add the whole site-packages folder of your virtual environment, usually /path/to/virtualenv/lib/site-packages/. This way you won't add the Eggs one by one for each packages. When you install a new package, just go to the Eclipse window and if the import is still not resolved, select the project and press the F5 key, to refresh the project.
Hopefully, that should work for you. Good luck.
This is how I go about setting up PyDev with a virtualenv:
Create a virtualenv at /home/anshumanb/.virtualenvs/myvenv
In Eclipse, Window > Preferences > PyDev > Interpreter - Python, I add a new interpreter. For the interpreter executable, I point it to the virtualenv's Python i.e. /home/anshumanb/.virtualenvs/myenv/bin/python
In the "Select folders to be added to PYTHONPATH" screen, I select all the paths starting with /home/anshumanb/.virtualenvs/myvenv AND
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk and nothing else.
(See this for why I select /usr/lib/python2.7, /usr/lib/python2.7/plat-linux2 and /usr/lib/python2.7/lib-tk)
When I'm back at the Interpreter - Python screen in Eclipse preferences, I hit Apply then OK
After this, whenever I install any packages into the virtualenv, I go back to the Interpreter - Python screen, hit Apply, select the interpreter that points to my virtualenv (and the one I just installed packages into) and hit Apply. PyDev then picks up any new packages installed in the virtualenv.
Note: I'm using PyDev 2.7.1 and Python 2.7.3 but on an Arch Linux box with Eclipse 4.2.1. But I don't think it'll make any difference.
I'm trying to launch a server on my tomcat 7 on my eclipse indigo EE
and I get the following error:
"'starting Tomcat v7.0 server at localhost' has encountered a problem.
The specified JRE installation does not exist"
I checked the build path configuration and on the libraries section I have the
JDK7 as JRE System Libraray and when I check "Installed JREs..." the correct
path is there - "C:\Program Files\Java\jdk1.7.0_01".
What else can be done? Many thanks.
p.s. - I'm also using maven 3.0.3
Double click on the server to bring up the Overview.
Click on Runtime Environment.
Select the JRE from the dropdown list. You may need to set this up by clicking on Installed JREs and clicking Add.
If the instructions above did not help you can do the following:
1- from the run menu choose "Run configurations..."
2- Choose your maven run profile and then click on the "JRE" tab.
3- Select "Alternate JRE" and from the drop down select "jdk1.7xxx" (or whatever jdk you want to use"
you can also select the workspace default jre.
I was facing the same problem and this helped.
Go to the build file.
Right click on it.
Do the following as per the screenshots
Window-->Prefenerces-->Server-->Runtime Environment; like this....
Edit your Apache,and select your jdk dir....
Go to Properties → Java Build Path → Libraries.
Here you will see a red cross on the library whose path is not correct.
Select this library, click the Edit button, and change it to the correct path.
Here is a solution with pictures
http://javahonk.com/specified-jre-installation-does-not-exist/
It worked after running "mvn install clean -P prepare"
For Eclipse MARS, for maven projects.
After you install the new JRE as explained (for instance here: http://javahonk.com/specified-jre-installation-does-not-exist/), don't use your old configuration, BUT create a new configuration.
Updated the Java , JRE. so I have faced this same issue, I have tried all this but i continued with this issue. then after that, i have removed the server from application and then added new server and with that i have mentioned new JRE version now its working fine.
Open eclipse and find the server tab and try to open it.
There click on Runtime Environment
Select the JRE from the dropdown list to set this up by clicking Installed JREs and Add.
If you use Maven, try:
EclipseMavenJRE_1
EclipseMavenJRE_2
Window-->Prefenerces-->Server-->Runtime Environment;
like this....
enter image description here
Edit your Apache,and select your jdk dir....
It worked after updating Server Runtime environment JRE .
At my case, I've changed the JRE installed at Eclipse and still the messages came out.
So,
1 - Right click at the JBoss Server > Open Lauch Configuration
2 - Select tab Classpath and click "Restore Default Entries"
3 - Close the window and Right click again the Jboss Server
4 - Select Properties > General
5 - Click two times 'Switch Location' (it returns to [workspace
metadata])
6 - Click Apply and Close
Afterwards, a new right click at Jboss Server > Clean, and the Jboss Server stopped the message.
Hope it helps.