How to update already installed IntelliJ IDEA on Ubuntu? - java

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).

Related

Supplied javaHome is not a valid folder in eclipse

I have migrated a workspace to a new machine with a different java distribution.
The old machine had java-11-openjdk-amd64.
The new one has only corretto.
Upon opening the old workspace on the new machine I get some problems, such as
Supplied javaHome is not a valid folder. You supplied: /usr/lib/jvm/java-11-openjdk-amd64
line 0 Gradle Error Marker
So in the workspace I deleted .metadata and I searched the workspace (and ~/.eclipse, ~/.gradle just in case) for references to the old version with
grep -r "/usr/lib/jvm/java-11-o"
There are no results.
I have made sure that no eclipse processes are running (ps -aux | grep eclipse) and restarted eclipse, but the errors remain. What else can I do before creating new project and manually copying the code?
Sounds like the right place to edit this is in the eclipse preferences, and/or that eclipse is picking this up from an erroneously set JAVA_HOME environment variable.
Window > Preferences > search the filterbox for 'installed' to get to 'Installed JREs', remove any entries that don't seem right and add your coretto install here.
Next check Window > Prefernences > Gradle > Arguments > Java Home, and fix things here. Most likely you can just select 'workspace JRE' and that should fix the problem.
If that doesn't work out, there's always the option of adding to your ~/.gradle file a single line with:
org.gradle.java.home=/path/to/coretto
I received an update to my VM and the previous Pref>Gradle>Arg>Java Home no longer existed. I cut and pasted in one that did... Unfortunately, this did not work. I had to come through Eclipse and use the file navigation to get to the new Java Home I wanted to use. (Then do a Gradle>Refresh Gradle Project to get it to take).

not able to access JDK path in intelliJ in Jetstream XSEDE cloud

I am having issue when trying to associate my intelliJ project with JDK in JetStream Xsede cloud. Whey trying to access the directory through intelliJ, I can see a locked folder icon which don't allows to access it.
Steps that I followed to set the JDK in intelliJ:
Open project structure (CtrlAltShifts)
Go to Project Setting->project
Click on the new Button under Project SDK
Please let me know if any further information are required to recreate the issue.
I resolved this issue by performing
chmod 777 /usr/lib/jvm in the terminal.
Once I run this command, the lock design disappears, and the directory becomes accessible.
Thanks.
Prashant

How do I tell IntelliJ about groovy installed with brew on OSX

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.

How do you make Git work with IntelliJ?

I am going to use Git version control by IntelliJ Community Edition in order to make branches of the programs I intend to develop. I am striving to accustom myself to its functionality and I come accross obstacles.
I follow the instructions of the web-page http://wiki.jetbrains.net/intellij/Using_Git_Locally and although I do what it orders, when I reach Image5 I find an empty list under Default.
It is possible that it does not matter I thought, so I continued the procedure.
However when I come to most important section of Committing Changes to Master (Revision 1) the list is also empty and the commit changes does not detect any changes to my project (see Image13 and Image 14).
Apart from that, I receive a message when I open the project once more indicating that the Git execution path is not correct. But how can I get knowledge of what execution path should be appropriate so as to insert it?
Does anybody know a decent order of instructions (on a web site or by his won experience) which can guide me to how I can take advantage of Git functionality to incorporate it to my work? It is crucial for me to put my work through.
You need to specify the executable path of Git in the Git Settings, as mentionned in the per-requesites:
The Git integration plugin is enabled and the location of the Git executable file is correctly specified on the Git page of the Settings dialog box.
As long as you see "a message indicating that the Git execution path is not correct", the rest of the instructions won't work.
Path to Git executable
In this text box, specify the path to the Git executable file.
Type the path manually or click the Browse button to open the Select Path - Git Configuration dialog box and select the location of the Git executable file in the directories tree.
See "Where is git.exe located?" for the path of Git on Windows.
with Git for Windows:
C:\Program Files\Git\mingw64\bin
OR
c:\path\to\PortableGit-2.6.2-64-bit\usr\bin
OR
c:\path\to\PortableGit-2.x.\mingw64\bin
With GitHub Desktop:
%USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin\git.exe
Update 2020, three years later:
As noted by Daniel Connelly in the comments
IntelliJ now lets people install it through the path specified in the help above (just look for the "Download Now" button on the Git menu).
If you download Git from the website, a version that IntelliJ does not support will be installed.
GitHub for Windows on Windows 7 currently installs Git in a path similar to this:
C:\Users\{username}\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\bin\git.exe
The guid after PortableGit_ may well be different on your system.
On unix systems, you can use the following command to determine where git is installed:
whereis git
If you are using MacOS and did a recent update, it is possible you have to agree to the licence terms again. Try typing 'git' in a terminal, and see if you get the following message:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
On Window machine install any version of Git. I installed
Git-2.14.1-64-bit.exe
. Got to search program and search for git.exe. The file can be located under
C:\Users\sd\AppData\Local\Programs\Git\bin\git.exe
.
Open Intelli IDEA>Settings>Version Control>Git. On Path To Git executable add the path. Click on Test button. It will show a message as
Git executed successfully
Now click on Apply and Save. This will solve the issue.
.
git.exe is common for any git based applications like GitHub, Bitbucket etc. Some times it is possible that you have already installed another git based application so git.exe will be present in the bin folder of that application.
For example if you installed bitbucket before github in your PC, you will find git.exe in C:\Users\{username}\AppData\Local\Atlassian\SourceTree\git_local\bin
instead of C:\Users\{username}\AppData\Local\GitHub\PortableGit.....\bin.
For Linux users, check the value of GIT_HOME in your .env file in the home directory.
Open terminal
Type cd home/<username>/
Open the .env file and check the value of GIT_HOME and select the git path appropriately
PS: If you are not able to find the .env file, click on View on the formatting tool bar, select Show hidden files. You should be able to find the .env file now.
Literally, just restarted IntelliJ after it kept showing this "install git" message after I have pressed and installed git, and it disappeared, and git works

JVM: could not open

Error - JVM - BlackBerry 9800
Simulator
--------------------------------------- JVM: could not open
C:\Users\Bayron.Tellez\Downloads\eclipse-java-helios-win32\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
My friend installed Eclipse with the Blackberry simulator. I'm assuming it was a portable installation because at no point we were prompted to install.
Now, he zipped it up and copied it to my machine when running I receive that error above. Obviously it's because it's trying to look for something on my friends directory. How can I change it to my path?
My path is:
C:\Eclipse\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
Where do I change this?
I would suggest not running eclipse from a copy of someone else's installation. This will probably contain lots of installation-specific files which are unlikely to match your machine.
Why not install it yourself, then install the Blackberry Java Developer plugin? It's available at http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp
You can change the early installed paths of all .cod files from xml.manifest
[Eclipse Installed Path]\plugins\net.rim.ejde.componentpack7.1.0\components\simulator\[BlackBerry simulator version].xml.manifest
Eg:
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator\9800.xml.manifest
Then remove the [BlackBerry simulator version].xml.manifest.bin file.
Now it should be work.
You may also want to check file Settings.rc,
found in the folder
PATH\plugins\net.rim.ejde.componentpack4.6.1_4.6.1.49\components\bin
first you have a path to your eclipse installation, and then corresponding Simulator you are trying to run.
hope this helps,
Use notepad++ to replace all occurrances of old directory into new directory in the eclipse directory.
Start the eclipse, and click clean simulator button.
That should be all.
Though it is not advisable to run a copy of eclipse, there is a very simple way for one to solve such a problem: it is by running the clean.bat file that is in the simulator folder of the specific component pack version folder. The path to that file would look like this: PATH\plugins\net.rim.ejde.componentpack[BlackBerry version]\components\simulator\clean.bat
I think that would do.
Still, installing a new version is the best option.
It will be better you install it yourself frsh rather than copying it from friends machine.
But you can give it a try.
Goto your eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29 directory and check do on of these files contain this path:
plugin.properties
plugin.xml
META-INF/eclipse.inf
.options
Or else you could grep for problem path in your plugin directory and replace same with updated path.
This error occurse cause your simulator have previously loadded application. Removing them solve your problem.
How to remove installed Java programs on the simulator?
Quote from Reset and clean the blackberry simulator:
Are you sick of having a million icons on your BlackBerry simulator for every HelloWorld and demo project you have every tested? Try this to remove old programs from the simulator and start with a clean ribbon. From the command line browser to your rim jde directory, switch to the simulator sub directory and run clean.bat. This program takes longer than you would expect (about 30 seconds or so on my 3 ghz machine).
UPDATE
Also delete all [app name].cod|cso|debug|jar files from simulator folder Also make sure projects you don't want on simulator are not active and are not in build configuration.

Categories

Resources