NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to make a library with JavaFX classes in NetBeans?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ibbibby



Joined: 31 Jan 2012
Posts: 5

PostPosted: Tue Jan 31, 2012 3:56 pm    Post subject: How to make a library with JavaFX classes in NetBeans? Reply with quote

I want to create a Java library that contains JavaFX classes, to be used by JavaFX applications, but I can't get this to work right.

If I create it as a JavaFX Application project, it always runs the Application class of the library instead of the Application classes of the JavaFX applications that include it

If I create it as a Java Class Library, and then change the platform to "Default JavaFX Platform" in order to allow access to the JavaFX classes, NetBeans tells me that it can't find the Default JavaFX Platform, and all the JavaFX references in the library fail.

So, how can I make this work? Also, is this a bug in NetBeans? It sure seems like one, at least the second part.
Back to top
CondraBocky



Joined: 16 May 2012
Posts: 1

PostPosted: Wed May 16, 2012 10:45 am    Post subject: Reply with quote

We've also been searching on this problem for a while. Seems javafx doesn't generate the correct code for your main startup project.

The problem is next, in your "project.properties" file (you will find this in the tab 'files' in the netbeans navigation) he generates the line "main.class=com.javafx.main.Main" or something similar change it to "main.class=[path to runfile]" for example "main.class=partymanager.fuifganger.runtime.RuntimeClass" if you do that and then run the project you will see it's working.

We found out the problem yesterday and solved it today. I know your post is dated back 4 months ago, but we hope it'll still be useful for you or other people. Smile

Grtz from Nick De Bock and Michiel Van Hecke
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo