webcoder
webcoder

Reputation: 73

Build a JAVAFX 2.0 library

I am using Netbeans 7.1 and JavaFx 2.1 (developer Preview). I added the runtime and sdk to the Default JavaFX Platform and compiled - no problem.

I want to create a custom control, so I started to develop a JAVAFX-application and added my control,skin and behavior classes.

After that I added a new project (JavaFx-Application) and removed the Application-class from my first project, because I want my first project to be a library.

I referenced the library (project) in my Application-project (Test-project) and when I build and run it I get the following message:

Error: failed to msvcr100.dll java.lang.UnsatisfiedLinkError: Native Library D:\javaFx\javafx_sdk-2_1_0-beta-b14-windows-i586-21_feb_2012\javafx-sdk2.1.0-beta\rt\bin\msvcr100.dll already loaded in another classloader

Also the code works and the program runs

Any ideas?

Kind regards Matthias

Upvotes: 1

Views: 1151

Answers (1)

Sergey Grinev
Sergey Grinev

Reputation: 34478

Your JavaFX project for control uses com.javafx.main.Main as main class to start JavaFX infrastructure. If you open your library jar you can find it in the Manifest file. You don't need that for library project.

Try creating regular Java project with files for your control. You can link SDK/rt/lib/jfxrt.jar to make project compile.

Upvotes: 1

Related Questions