Netbeans 11 how to add a library to a project when "Libraries" node is missing? - openjfx

I am trying to run a simple java fx example with Maven on Netbeans 11 with openjdk 11. I followed the OpenJfx tutorial up to the creation of JavaFx as a global library.
But then when I want to add this global library to my project, the "libraries" node is missing in the project properties menu ?
How can I have this Libraries node present in the menu ? Or is there another way to add a global library to a project ?
Any help appreciated,

Indeed I was following the part of OpenJfx tutorial that creates an Ant project, whereas I was creating a Maven project.
If instead I use an Ant project, then the "libraries" node appears.
But the interesting part for Maven is further down. And there they write to create a Maven project from archetype.
Eventually it is working !

Related

Can't load the main class/runnable jar JavafX 8 project [duplicate]

i created a Javafx project using JDK 8 and when i tried to export it to a runnable .jar file, i got surprised that it doesn't run using CMD, and gives the following error :
"Javafx compenents are missing"
while it works perfectly during the compiling time(using the IDE) when i accessed the .jar files, i found it has just .class files (that i made), and the needed library files that haven't been exported (i made sure to select the "extract need library files extract required libraries into generated jar" option in Eclipse), is there a reason behind of this? and a way to solve it? thanks in advance
Ps: i tried this using Eclipse and Intellij IDE
I just wanna mention once again that I'm using JDK 8 where it has JavaFX library inside of it.
Did you try this?
There are detailed instructions on how to configure your IDE to run JavaFX with newer OpenJDKs (which do not come with JFX components in it).
It also explains how to create a new JavaFX Maven project from archetype, with all the necessary plugins to easily build your application while including the minimal Java components for it (using jlink).
This will ensure that anybody using your application will have those components.

How to create a JavaFX module in IntelliJ IDEA

I would like to integrate a JavaFX GUI in an existing IntelliJ IDEA Java project (java version 1.8.0_20).
Although I can create a JavaFX project from scratch (JavaFX plugin is enabled) in my IDE, I can't figure out how to create a module.
Do I need to define a new module SDK for a new Java module? Or does the type of the JavaFX module has to be IntelliJ Platform Plugin? I tried both without any success. Please help.
Many thanks,
Cristina
Update for Idea 2021.3
The previous information on this answer for Idea 13.1 is now outdated.
For Idea 2021.3, create a new JavaFX project using an Idea wizard:
New JavaFX project wizard.
From the main menu, select File | New | Project.
In the New Project wizard, select JavaFX from the list on the left.
I advise you follow the detailed instructions for creation and execution of JavaFX project at the new JavaFX project wizard link supplied.
A new JavaFX project created this way will be different from creating a new Java project using the same wizard. The new JavaFX project will be configured to use a build tool (e.g. maven or gradle). It will have the JavaFX module dependencies defined and will include sample code for a modular HelloWorld JavaFX FXML application. It is the perfect thing to use to get started with a new JavaFX application IMO.
If you want a new Idea module rather than a new project, then you just follow the same steps as above, but instead of selecting File | New | Project, you select File | New | Module, then select JavaFX from the list on the left as before.
Alternatively, you can create new modules in Idea by defining the modules in a Maven or Gradle project and importing the build tool project file for the project into Idea.
Prior answer for Idea 13.1
I don't think you can define a new JavaFX module in Idea 13.1. Note that there is not much difference between a JavaFX project and a non-JavaFX project in Idea, so you can just create a normal Java module and make a couple of manual tweaks to the module configuration and it should behave the same as if you created a JavaFX project. See the following answer for more details:
How to convert a normal java project in intellij into a JavaFx project
Okay this question is old and has been answered but let me add more to it. I came across the same problem and did a little workaround:
You first open the main project in IDEA (in which you want to add a JavaFX project module), then goto File -> New -> Project.
From there, you get the standard New Project dialog of IDEA, so select javaFX and proceed. Make sure the project location is where you want the JavaFX module to be created (which is why i prompted you to open the parent project in IDEA first). Open it in a new window and close it, doesn't matter.
Now, (Assuming that you only have the main project opened in IDEA) goto its File -> Project Structure and in the dialog, goto Modules and click add (+) -> Import module and then select the project you just created. Proceed through the wizard, overwrite the .iml and the JavaFX module should be added to your main project structure.

use CMake to generate a multiple-configuration Eclipse CDT project: failed

I have c++ projects developed in windows with VS2013, now I am trying to use eclipse in Linux.
I create a hello-word application and use CMake-GUI(2.8.11) to generate eclipse-cdt(4.4) project. The generated eclipse project can not have both the Debug and Release configurations : import the generated project into eclipse-cdt, and select the menu “Build Configurations->Set Active” : aha, it is grey! which means no way to switch between Debug and Release.
Why CMake can not generate a multiple-configuration eclipse project? Or I am doing something wrong.
I get some info from http://www.voom.net/use-cmake-with-eclipse/comment-page-1#comment-171974
Thanks.

Why does Eclipse load all plugins in a workspace?

I'm using Eclipse 3.6 for developing Eclipse plug-in. In the same workspace, I have 2 Plug-in projects: projA and projB. No mater which project was run, both two projects will be loaded in the new Eclipse instance. If I only want to load projA, I have to close projB, why?
I run the project like this: right click the project and "Run as--- Eclipse Application".
Have you defined the target platfom?
You can also edit your Run Configuration and choose the plugins to launch with.
The way you debug your project will start a new instance of Eclipse with all existing plugins installed(in your case,both project A and B are installed).This is typically called self-hosting in PDE.
If project A has no dependent package,just close other projects.

How to create OSGI project in IntelliJ Idea?

I am trying to create an OSGI project on IntelliJ Idea but so far couldn't make it. I can change the facet after creating a Java project but it isn't the one I want.
In eclipse, while I am creating the project ( Plugin Project ) I can select it to be an OSGI project thus IDE helps me to create required project structure.
But in IntelliJ Idea it is not - at least I couldn't find it -
Have a look to Osmorc. Its for OSGi development in Intellij. If you are familiar with Maven you can use a combination of Bnd Framework and maven-bundle-plugin. With the last one you are independend of the IDE you are using