John Jai wrote:The error straight forwardly implies javafx is not present in the project's class path. You should rather try the HelloWorld application provided in the tutorial link you posted.
And follow the steps from scratch to the HelloWorld program.
John Jai wrote:Class path should point to a location where your class files (or jar files) are present. Is there a lib folder parallel to the bin in the Java FX installation? Does that have jar files?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:I moved this thread to JavaFX forum.
I dont think Eclipse has a plugin for JavaFX 2.0 yet, but this post would help you to configure your eclipse.
And the link you have mentioned is for older verion of JavaFX.
You can download Netbeans 7.1 beta from here which comes with JavaFX 2 support.
Note that JavaFX 2.0 is not compatible with older versions. So when you are searching use the version number.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:Did you visit the link I provided in my reply for configuring Eclipse?
You should be using JavaFX 2.0 and above version. Older versions are not supported anymore.
Shikha Upadhyaya wrote:
But there is this error in the line 11 of the code I posted in the first post of this thread-
What do I do?
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:Have you installed the JavaFX SDK?
Mohamed Sanaulla wrote:I think its missing the runtime related files. Not sure though. Try installing runtime again.
Shikha Upadhyaya wrote:
But I would like to stress upon one observation here. When I click on File > New > JavaFX project, a window "New JavaFX project" opens. In that window I can see an error message- A valid JavaFX SDK was not detected.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:If you have JavaFX SDK then you have the runtime as well.
I dont think Eclipse supports New JavaFX project as I am not sure if Eclipse has a plugin to support JavaFX 2.0. You must be creating a usual Java project and then follow the JavaFX sample code - Am just thinking loud here, not tried it.
But on Netbeans 7.1 beta you can create a new JavaFX project and proceed with the development - I have tried this though.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:You can try creating a usual Java project and then add the javafxrt jar as mentioned here and then try to create the sample application. Also uninstall the javaFX plugin which you have installed for Eclipse.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:I used Eclipse Helios to run JavaFX application and it works. I didnt install any JavaFX plugin for Eclipse.
Also I created a simple Java project and then added the following:
I also added the jfxrt.jar to the External jars for the project.
I was able to run the application.
Also please use the tutorials from this page as they are relevant for the latest release of JavaFX
Oh then *Eclipse Indigo* is the problem!!
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Mohamed Sanaulla wrote:I dont think it should be the problem.
What is the version of JRE you are using when you are trying to run the application? What matters here would be the JavaFX library and the runtime and the compatible JRE version.
Shikha Upadhyaya wrote:
Mohamed Sanaulla wrote:I dont think it should be the problem.
What is the version of JRE you are using when you are trying to run the application? What matters here would be the JavaFX library and the runtime and the compatible JRE version.
When I created the project I had checked JavaSE 1.6 as the execution environment JRE in the New Java Project window.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|