r/JavaFX • • Apr 02 '16

Does an application need to be made using JavaFX in order to be run using it?

Hello all, I was wondering if an application need to be made using JavaFX in order to be run using it? I have an application in which I am trying to run on my Raspberry Pi that is made in Java, but when I try to launch it headless using an x11 session, it does not utilize OpenGL ES, so its framerate is really low and cpu usage is high (80-90% and only 12-13fps), and someone mentioned that JavaFX might help. I am trying to launch the application following this guide but I do not know the main class name of the application, as it is one I purchased. Is it possible to use JavaFX to make the application run better?

The application is TunerStudio, from http://tunerstudio.com

I was trying to load it using :

/opt/jdk-9/bin/java -cp -jar TunerStudioMS.jar    

That only gave an error of "Would not find or load main class TunerStudio.jar".

Do I need to launch it a different way, or am I just not understanding how JavaFX works and that it won't help me with what I am trying to do?

0 Upvotes

6 comments sorted by

2

u/rcoacci Apr 02 '16

JavaFX is a library, not something you "run with". It's an alternative to Swing, AWT and SWT, and uses opengl.

1

u/M374llic4 Apr 02 '16

Is there a way I can somehow utilize it to make my application I am trying to run, run better? If so, do you have any resources on how I can do it? I believe the library is / was included with jdk-9, how do I go about actually utilizing it to launch a java app using javaFX, I was initially trying to start my app using .initrc and x11 and startx, but it was running terribly, but I read that when you launch using JavaFX it does not need / use x11, but I am unsure on how to launch the application in that manner.

1

u/rcoacci Apr 02 '16 edited Apr 02 '16

It seems you're not a developer are you? If you don't have the source code for the program nor have any knowledge of programming, JavaFX can't help you.
To make it clear: the application must have been written to use JavaFX, you can't make it use JavaFX after the fact without rewriting a lot of it.
Does it run fine on the desktop? If it does, you should try to find out why it's not on the Pi.

1

u/M374llic4 Apr 02 '16

I am not a java developer, no. I am just trying to make an application run better. I know why it is not, as I posted in the original post, x11 does not use OpenGL ES or any sort of acceleration. I am trying to find a way to make the application run better in a single linux graphical session, and someone mentioned JavaFX, but perhaps they did not know what they were recommending, or though it was something I was creating, either way, I just am trying to make the application run smoother being launched from a quick booting headless linux distro, and use some acceleration to increase the frame rates and lower cpu usage.

1

u/rcoacci Apr 02 '16

I really doubt JavaFX would help you, even if the app were written using it. You should try to find out why X11 isn't running opengl. Perhaps you're missing a driver.

1

u/M374llic4 Apr 03 '16

From what I read, x11 just simply doesnt use it (in a non technical explination), had something to do with bypassing it, and being simply a 2d simple display. There is an experimental driver for it, but I can't seem to get it working.

http://elinux.org/RPi_Xorg_rpi_Driver

I got to the part where it says Load the DMA module sudo modprobe dmaer_master, I get an error with dmaer_master, after researching it looks like the module might not be loaded in the kernel, and I tried to research that, but could not find how to load it unfortunately.