0

I had javaFX installed on Eclipse and it was working as intended. I have decided today to upgrade java at Version 7 Update 45, download Eclipse Kepler (4.3.1) and reconfigure everything to work.

I uninstalled the previous java version I had, installed the 7.45 and downloaded Kepler. I created user library, adding the external javaFX jar file. I created a new program with just a stage and it is working within Eclipse. I exported it to a runnable jar file by packaging required libraries into generated JAR. It pops up the message "Could not find main method from given launch configuration", it creates the jar and it is not working.

I assume I did a mistake at the user library I created. I added the jfxrt.jar file as external jar from folder \Java\jdk1.7.0_45\jre\lib . While I was browsing java folder content, I saw another version of jfxrt file at java\jre7\lib directory. I added it that instead of the first one and it pops up the same error.

I have searched around and didn't find any answer.

Thank you

John

2 Answers 2

2

Your way of exporting is not the correct one for javafx applications! You have to use the javafx packaging tool coming which javafx! See http://docs.oracle.com/javafx/2/deployment/packager.htm BTW why not using e(fx)clipse which provides you all this stuff for free. See http://www.eclipse.org/efxclipse/index.html

Sign up to request clarification or add additional context in comments.

2 Comments

Ok, I managed to get it. I downloaded the "All in one downloads" from the efxclipse page you suggested and it finally works. I export the project as stated above and I am done. Problem solved, thank you.
Then please set the answer to ok
0

After you choose export from Eclipse and then "Runnable Jar", the next page in the dialogue on the top has a combo box (a drop down list) called "Launch configuration". From your description it looks like you have selected the wrong launch configuration.

3 Comments

It doesn't allow me to go to next page in the dialogue. The 'Next' button is gray as it always were. I included a link of the situation. i41.tinypic.com/2zfk9di.png
Thats fine. Is "Hello (1) - Test" the correct launch configuration ? Is that what you use to run your program in Eclipse ?
Yes, it is. The program is as you see it in the picture, only the .setTitle and .show methods used just to launch a stage. I don't know why it has the (1) in the class name so I created a new one. It doesn't show the number in the parentheses when I create the jar but the results are exactly the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.