JavaFX not found by IntelliJ - intellij-idea

On my previous laptop, I could easily create a JavaFX app from IntelliJ's JavaFX template. Although I have a new better computer, If I repeated the process, IntelliJ would tell me the JDK does not have JavaFX.
Keep in mind that I'm a starter, so I would appreciate it if you could give me answers that do not involve maven or gradle.
I've tried Oracle JDK 11, Zulu OpenJDK 8 and OpenJFX 11.
This solves part of my problem, however, the problem is that I cannot add the JavaFX JDK as JDK. If I try to add the lib folder as a library it says some components are missing.

Related

Problem in running a project with aspectJ in IntelliJ IDEA 2022.2.3 (Community Edition)

I am trying to run a project with aspectJ, rather than Java, in IntelliJ IDEA. I had done it before by simply putting "aspectj-1.9.6" in a "Lib" folder and setting the folder "as Library". But I tried it again today and it is not working. I think it might be because I have updated my IntelliJ to version "2022.2.3". I saw in this link that for intelliJ version "2021.1", one should select "ajc" as the project compiler in IntellJ. But it seems that there is no such compiler option in IntelliJ version "2022.2" (as I looked at this link and also searched in this link).
I also tried to install and enable "AspectJ weaver" plugin, but I encounter the following error: "Plugin 'AspectJ weaver' failed to initialize and will be disabled. Please restart IntelliJ IDEA.". Someone has had the same problem in this post, but the answer doesn't work for me, as it refers to this link, which is not compatible with IntelliJ version 2022.2.3:
So, I wonder whether aspectJ is not supported any more in IntelliJ?
Does any one has any suggestion that I could use it with this version of IntelliJ? I do really appreciate any help.
Thanks in advance
IntelliJ IDEA is compatible with AspectJ. I am running the plugin on 2022.2.3 without any problems. But I use IDEA Ultimate, you use Community. Did you notice this in your screenshot?
Compatible with IntelliJ IDEA Ultimate

How to build jar with javafx in openjdk12

I'm trying to build jar for javafx desktop application. Working in IntelijIdea, jdk 12,using javafx12, link javafx sdk, write VM-options in menu run-edit configuration. In IDE all working correctly, my app launches and works. But when I try to create artifact and then build it to jar all brokes. IDE tell, that fx:deploy isn't there. Then my app don't work even in IDE.
I got stuck here.
Can you, please, help, how to build this javafx to launch it without IDE?
p. s. Know, that in jdk8, where javafx still includes, it's easier, but is it really no other way to create independent from IDE javafx, than using jdk8?
Built GUI with swing, created artifact and then built it to jar.
There wasn't problems.
But I don't want swing...
actual error: "Error. Java FX Packager: Can't build artifact - fx:deploy is not available in this JDK.
Will be really greatfull for tricks or tips with that.

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.

Can't find C/C++ IntelliJ IDEA Plugin

I'm trying to add a c/c++ plugin to IntelliJ IDEA, so I went to plugins and searched for it but couldn't find it.
Did they remove it and replace it with their new IDE cLion? Is it no longer supported or what?
Looks like the version of your IntelliJ IDEA is newer than what the C/C++ plugin supports. If you look at the plugin page you can see that builds from 139.1 until 142 are compatible. And if you look here you can see that build 141 is IntelliJ 14.1 and IntelliJ IDEA 15 is numbered 143. So my guess is you are using IntelliJ IDEA 15 or 16 EAP and therefore the plugin is not shown when you search for it.
Simply download the cpp plugin of the old 14 version located here:
https://plugins.jetbrains.com/plugin/1373-c-c-
Then edit the file CppTools/META-INF/plugin.xml and replace the "until-build" value in line 5 to something like until-build="170.0"
And this works perfectly :)
One should really note that the "C/C++" plugin available in the IntelliJ Plugin Repository is actually not developed by Jetbrains, but by a third party called AdvancedTools, and has long not been updated. I'm not sure if that is related to the release of CLion, e.g. IntelliJ bought out the plugin to serve as the foundation of CLion or whatnot.
As listed in the CLion FAQ page, there is currently no official standalone plugin for C/C++ editing available for IntelliJ IDEA. Just as with some other products such as Jetbrains AppCode, Jetbrains are currently keeping CLion as an exclusively paid product, without a free community edition, as indicated in this forum post.
The post also confirmed that a plugin for IntelliJ IDEA might be coming in the future, but is currently (Jan 2018) not a priority for JetBrains.
So yeah for now the only way to get decent C/C++ support within the IntelliJ ecosystem is to use/buy JetBrains CLion.
Download latest version of c/c++ extension from link: https://plugins.jetbrains.com/plugin/1373-c-c-
then open that CppTools.zip inside META-INF folder open file plugin.xml modify line five until-build="" from your own intellij idea build. Go to Help --> About in Your Intellij idea.
plugin.xml file screenshot:
Now Go to File --> Settings --> Plugins --> Install plugins from Disk, browse ypur edited/ modified CppTools.zip.
I faced this problem before and i figure out that the software i install it was old and not update, so try to see the plugin version and see is that plugin version compatible with your intellij-idea, if not check update for the intelli-idea ,the developers fix many problems in every update ,then download it.
you can check compatibility from this page.
Here
Click on Preferences -> Plugins -> Browse Repositories and search for it

Why does IntelliJ import extra libraries from JDK 1.6 for a simple hello world program?

I'm new to Java and IntelliJ and I am just doing a simple "hello world" program. IntelliJ has about 10+ libraries from JDK 1.6 added to my project even though I'm not importing anything in my classes that would seem to need them. I created a new project from scratch.
Some of the libraries are alt-rt.jar, charsets.jar, deploy.jar, dnsns.jar, javaws.jar, jce.jar, jsse.jar, localedata.jar, etc.
Can anyone explain why those libraries were added? Can I remove those libraries from the Module Settings/SDK with no ill effect?
They will be in the classpath anyways as they are part of the standard library. I'm not sure what will happen if you remove them, but you definitely don't need to do that.
These libraries aren't imported in your project, intelliJ has just parsed these jar to see what were the accessibles classes (for auto-completion) with the default classpath.
They won't be packaged with your project.
Plus as your JDK (or any SDK for what it worth) is defined for intelliJ and not for your project only, every project you will create in the future will use the already parsed data from your JDK.