How can I JSDK of Intellij on MacOSX - intellij-idea

How can I JSDK of Intellij 9.0 on MacOSX? I want to set it to JDK 1.5 on MacOSX.
I have tried reintall Intellij, but it somehow remember the JSDK of my previous installation.
Can you please tell me how can I reset it?
Thank you.

Not sure if you mean Java version IntelliJ runs under, or Java version IntelliJ uses for projects.
If it's the first:
On OS X applications are usually directories. This is true for IntelliJ.
Go into the IntelliJ 9.0.app folder
Go into Contents folder
edit Info.plist (you will need to have installed Apple's Developer tools)
There is a Java subsection that has the setting you need to change.
If it's the second, go to Project Structure -> JDKs and create whatever ones you want.

Depending on your OS X version, you may have no JDK 1.5 installed at all (Snow Leopard 10.6.x comes with no JDK 1.5). In this case IDEA will run under the first JDK it finds, even if it's 1.6 while Info.plist specifies 1.5. If you have both JDK versions installed, Info.plist should work fine, see the IDEA FAQ.
If you want to install JDK 1.5 on Snow Leopard, see another IDEA FAQ article.

Related

Difference between IntelliJ IDEA versions "Linux" and "Linux, without JDK"

When downloading IntelliJ IDEA, there are two options for Linux:
I assume the Linux (.tar.gz) version comes with a JDK and the Linux, without JDK (.tar.gz) version does not. However, when reading the documentation I see:
IntelliJ IDEA does not include an SDK. So, before you start writing your code, you have to download and install at least one SDK and define it in IntelliJ IDEA.
So what exactly is the difference between the two versions? And if one comes with a JDK, which JDK does it come with?
This is the JDK IntelliJ IDEA itself runs on. To quote a related support document:
Starting from IntelliJ IDEA 16 and the most recent versions of the lightweight IDEs, we are bundling custom JRE with Linux distributions, just like we've been doing for Mac. Our custom JRE is based on OpenJDK and includes the most up to date fixes to provide better user experience on Linux (like font rendering improvements and HiDPI support).
For your own projects you will probably want to use an official and supported Oracle JDK.

Is there a way to perform autosave in netbeans 8?

I wonder if there is a way to tell to the IDE to autosave any file if modified. I've searched the web but I haven't find anything. There was a module on NetBeans 7 but it is not available now on NB 8. Anyway it appears that the old plugin can be set to execute save all on a given interval. What I want is a feature to save when you modify something just like in Intellij IDEA.
Thanks
This plugin also saves when the file loses focus: Plugin
I would also prefer something like IntelliJ's Android Studio, but I don't think it exists for Netbeans.
I downloaded the below netbeans plugin. It will automatically save after every 1 second once installed. it was built for Netbeans 8.1 and not tested for the version 8.2 but it worked for me.
Netbeans 8.2 AutoSave Download Link
Install in Netbeans via Tools > Plugins > Downloaded and click on add "Add plugins..." button
In NetBeans 12.4 the module options can be changed from the section below and you don't have to download a plugin.
Tools > Options > Editor > Autosave section.
(also it is in version 12.5. I didn't find it in version 12.0)

IntelliJ IDEA Ultimate from 13.0.3 to 13.1.1 without losing current settings

I use IntellJ IDEA Ultimate Edition on Windows 7 machine.
I would like to upgrade from version 13.0.3 to 13.1.1 in a way that will keep all my existing settings and plugin setup.
Currently it's installed in JetBrains\IntelliJ IDEA 13.0.2 directory. Installation wizard gives an option to uninstall the existing version (that is not checked by default) and then suggests installing it into 13.1.1 directory.
What is the right way to install it as upgrade, so I do not lose anything?
You will not lose any settings by uninstalling.
The settings is in C:\Users\xxx\.IntelliJIdea13

How do I change the JVM used to run IntelliJ on Windows

I have two Java JDKs installed on my workstation, with jdk1.6.0_41 in my path, and jdk1.7.0_21 available as well, but not in the path.
How can I configure IntelliJ IDEA 13 to use a particular JVM? To be clear, I want to set the JVM used to run IntelliJ itself, not the SDK used for running my code. I am running Windows 7 Enterprise Edition and launch IntelliJ 13.0.2 by running idea64.exe
I have set JAVA_HOME to point to jdk1.7.0_21 but according to the About box it is using jdk1.6.0_41.
This FAQ on the JetBrains web site describes how to do this for Mac, but not for Windows.
This answer suggests using the IDEA_JVM environment variable for Ubuntu 12, but I have tried that and it isn't working.
I suspect you have another setting that is overriding your JAVA_HOME
From Jetbrains docs:
idea64.exe uses this JDK search sequence:
IDEA_JDK_64 environment variable
..\jre64 directory
system Registry
JDK_HOME environment variable
JAVA_HOME environment variable
With newer versions the environment variables are ignored. Instead there is a new action "Choose Boot Java Runtime". The easiest way to get to it is via "Find Action" Ctrl+Shift+A.
You can also edit the setting via the .jdk file in your user configuration directory, e.g. %APPDATA%\JetBrains\IntelliJIdea2021.3\idea64.exe.jdk. This is a plain text file containing only the path to the JDK.
It is not recommended to do this, and you should use the JDK that is bundled with IDEA.
CTRL+ALT+SHIFT+S to go to Project Structure
Under Platform Settings, go to SDKs.
Use the + green icon to add a new SDK and set it to that one.

Intellij project between Windows and Linux - use the 'default system provided' JDK?

I've got two dev workstations, one running Windows, the other running Linux. I work on a Java project using Intellij on both. Both platforms have the Oracle JDK 7 installed in the default locations.
For some annoying reason, every time I switch platforms, I need to update the project configuration to specify what JDK it should be using. In the project's "Project SDK" setting, there's a JDK selection which includes two entries - 1 for a JDK in c:\Program Files\Java\jdk_1.7 and the other for a JDK in /usr/lib/jvm/java-7-jdk/. If I open the project on Linux, I have to specifically set the Project JDK to be the second. If I save the project, close, commit, and then checkout and open on Windows, it complains it can't find the JDK, and I have to manually set it to the Windows version.
Why can't Intellij figure this out automatically? I appreciate that testing against multiple installed JDKs is a useful feature, but is there a way to tell a project to 'just use the default JDK'?
You need to have your JDK configurations to have the same name, lile 1.6 or 1.7. Project file references JDK by its name only so it will work out of the box in all IDEA installations on different operation systems, the only requirement is that there is JSDK defined under exactly the same name.