JavaFx won't download on my MacBook Pro for Eclipse Oxygen - java

I have an assignment for my school that I have to submit that needs you to create a Java application that involves recursion, file read, and javaFx. I have a 15 inch MacBook Pro with an i7 processor. When I try to use JavaFx in a class in Java, I always get errors saying that javaFx.application.Application or javaFx.scene.Scene cannot be applied to a type. Basically, my Java oxygen application cannot run javaFx. I've tried multiple YouTube videos on how to download plugins from oracle and the Java oxygen marketplace. I told my instructor and he hasn't gotten back to me yet. Everytime I download a possible plugin like e(fx)clipse/2.0.0/ (or something like that), Java oxygen sends a message that it cannot complete the operation because new software has already been installed. I kept searching oracle for the latest JDK but javaFx still won't download. I was just wondering if it had to do with me having an Apple and not Windows computer or is there something else I can try. Thanks for your help!

Just go here and download the Mac version of the JDK and install it.
http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
That is all which is technically needed to run a JavaFX application. You should also download and install the latest version of Eclipse (Photon) because it fixes some problems with the latest Java.
http://www.eclipse.org/downloads/index-developer.php
If you like you can also install e(fx)clipse from the marketplace but it is not needed to write JavaFX applications.

Related

Convert JavaFX GUI Maven app to M1 mac compatible app

I have written JavaFX app with Maven, now I want to convert it to executables. I was successful at generating .exe file for Windows using launch4j-maven-plugin, for mac I'm using appbundle-maven-plugin, it generates .app, but it doesn't work (for M1), saying JRELoadError, I think it's because of my cpu architecture as I'm not using x86 one, I've tried with few versions of jdk, including one that I use to launch it in IntelliJ.
So my complete question is this: How to get M1 mac compatible .app from Java GUI Maven project? (I prefer to have as a Maven plugin if possible).
You could earn yourself a few bonus points by giving this https://github.com/dlemmermann/JPackageScriptFX little framework a try. I don't have an M1 Mac, so I cannot try it myself but in principle this should work with maybe a few tweaks. You may have to upgrade to the latest EA builds of Java 18 and also JavaFX 18 because there have been some recent bug fixes.
Disclaimer: I am biased because I developed this framework together with Dirk.

NetBeans: "Failed to automatically set-up JavaFX Platform"

I have been troubleshooting this error for the past few days - and have hit a brick wall. I am running NetBeans v11.3, and Ubuntu Bionic (v18.04.4).
I have installed Java versions 8 and 11 (openjdk) along with source code.
I have also installed javaFx versions 8 and 11 with source code.
I have even gone to "Tools -> Java Platform Manager" and ensured that v8 and v11 of Java are properly installed along with the appropriate "Platform Sources".
But I still get the error mentioned when I try to create a new JavaFX project.
Any help would be very much appreciated.NetBeans JavaFX project create error
I have never tried to use JavaFX on openJDK, try out with Oracle JDK, as far as I know this is the best choice for using JavaFX, also try to edit the default platforms to match the appropiate system paths

NetBeans 8.2 create not project

I am sure it is simple problem, but I am new to Java and PHP, I want to learn Java, I bought a book, I have also a couple of books as PDF from internet, at the Beginning of the book there is always intructions, how you can install for example NetBeans to start programming. I have installed jdk 8 and NetBeans 8.2.
The problem is, when I start NetBeans, the Buttons for creating new Project not function and is not reacting on my click. I have installed all plugins. I have searched the internet. I have found, that I should click create new Project, I will get a dialogue, then I should choose the desired project. But it shows nothing when I click that button, it simply does not react. Please help me.
It might have been caused by JDK 9. You could have changed the JDK 9 to previous version and it would have worked.
For that you would have to go to:
\NetBeans 8.2\etc
Then you can edit: netbeans.conf . Just change the directory for JDK from 9 to previous version if it is installed. (or install JDK 8 and then do the same process)
I have uninstalled the NetBeans 8.2, which I downloaded it alone from NetBeans website, after that I have downloaded it as a complete package together with Java SDK from Java website, now it functions wonderful
Netbeans 8.2 is bundled with Oracle JDK 8. Just download the installer for your platform and install it. I have tested the installer with Windows 10 and it works like a charm.

Programming Kinect using Java on Win 7 64

I have Kinect for xbox. I have installed Kinect SDK.
I am trying to program Kinect using Java in Eclispe IDE. I have tried several tutorials. I have installed:
openni-win64-1.5.4.0-dev.msi
nite-win64-1.5.2.21-dev.msi
SensorKinect092-Bin64-v5.1.2.1.msi
sensor-win64-5.1.2.1-redist.msi
and it didn't work, when I run NiSimpleRead it open and then close immediately.
also I have tried to install all above but win32 and it also didn't work.
I have installed ZigFuOpenNI.exe and the problem still exists.
I have tried the tutorial installation of J4K library using the instructions in this site:
http://research.dwi.ufl.edu/ufdw/j4k/eclipse.php
and also it is not working it seems that there is problem with jogl and gluegen-rt native libraries because when I open the folders in the Package Explorer they are empty, but I am following the instructions correctly.
In my case, Kinect only works with Processing 2.2.1. I have tried the examples in this program using SimpleOpenNI and it works.
My question is how can I connect Kinect to Java in Eclipse.
I would be very much appreciated for helping me.

Java GUI in NetBeans on Mac OS X 10.8

I'm currently studying a module at university about programming in java.
The IDE we are using is NetBeans and I am using Mac OS X 10.8
We have just started making a application that utilises a GUI.
I am following a worksheet and have followed it exactly.
Currently I am stuck because when I run my application the project builds fine but the GUI does not open when I run it.
My Project is built up of multiple packages and classes and I have set the GUI class as the main class.
Even more confusing to me is that I copied the project over to my Window 7 VM and it built and ran fine and the GUI came up.
Can anyone help as to why the GUI does not open on OS X and if there is a solution.
EDIT:
I get the following exception when I try to run my app on a Mac: http://pastebin.com/cySzY5Wr
Netbeans builds you application for a specific version of Java. However when you run the applicaton it will fail to run because the executables are of a previous version. To change the target JDK/Java Version in Netbeans you need to:
Go into the Project Properties(Right click on the project and select properties).
Then select the Libraries tab and check the JDK version. On OSX it should be JDK6 unless you've installed JDK7 from Oracle.
Then select the Compile tab(under Build) and check that the version that Netbeans is compiling for is the same or less than the JDK you are using.
You might also want to check the version of Java that you are running in the system(as this will be the version that is used when you double click on the .jar file.). You can do this by opening up Terminal.app(or search in Spotlight) and typing java -version.

Categories

Resources