I am trying to build using maven and getting this error:
[ERROR] package test.app;
[ERROR] ^
[ERROR] The type javafx.application.Application cannot be resolved. It is indire
ctly referenced from required .class files
[ERROR] 1 problem (1 error)
I have created a simple "OSGi Application Project" using the fx tooling on Kepler.
The get the same error when exporting the product using PDE's Product Export Editor.
The Application can be run in the IDE.
The problem is that in Java7 the jfxrt.jar is NOT on the classpath. To
fix this you need to install it into your .m2-repository.
If you look at the pom.xml in releng-project you'll find a comment that
you need to issue to get it installed into local repo (the path might be
different for you!). I think Daniel in another thread mentionned
something about system-dependency but I've never used this myself.
The other option is that you run mvn on JDK8 which has jfxrt.jar on the
classpath but this might cause you other troubles e.g. because the
eclipse compiler does not understand default-methods introduced in
collections, ... .
Tom
On 27.09.13 10:40, Erdal Karaca wrote:
> I am trying to build using maven and getting this error:
>
>
> [ERROR] package test.app;
> [ERROR] ^
> [ERROR] The type javafx.application.Application cannot be resolved. It
> is indire
> ctly referenced from required .class files
> [ERROR] 1 problem (1 error)
>
>
> I have created a simple "OSGi Application Project" using the fx tooling
> on Kepler.
> The get the same error when exporting the product using PDE's Product
> Export Editor.
> The Application can be run in the IDE.
>
> Java: 1.7.40
> Maven: 3.0.3
> Eclipse: 4.3
Tom, thanks for the info. It gave us the right hint. We have now a solution with system dependency that works great and is more self contained because adding javaFX to local repo is not necessary anymore: