Problems to resolve javafx

190 Views Asked by At

I try to build an eclipse project with my ant script. I also use ant4eclipse to import the project. It works fine until it tries to resolve the following entry from my .classpath file:

…
    <classpathentry kind="con"path="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER"/>
…

ERROR:

BUILD FAILED
C:\Users\bob\.jenkins\jobs\BuildTest\workspace\trunk\build.xml:159: The following error occurred while executing this line:
C:\Users\bob\.jenkins\jobs\BuildTest\workspace\trunk\build.xml:70: org.ant4eclipse.lib.core.exception.Ant4EclipseException: Exception whilst resolving the classpath entry '[EclipseClasspathEntry: path: at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER entryKind: 0 outputLocation: null exported: false]' of project 'test123': '

No 'jdtClassPathLibrary' defined for library entry 'at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER'.
To resolve this problem, please define a 'jdtClassPathLibrary' element inside your ant build file:

<ant4eclipse:jdtClassPathLibrary name="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER">
  <fileset dir="..."/>
</ant4eclipse:jdtClassPathLibrary >

if I follow the suggestion by using

C:\Program Files\Java\jdk1.7.0_55\jre\lib

as fileset dir I get the error above. And jfxrt.jar exists.

Does anyone have an idea, how to solve the trouble?

1

There are 1 best solutions below

2
On

The error is because ant4eclipse can find the classpath entry of at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER but is unable to find the definition of that container

Now you have to specify the fileset tag so as to define the jar files which make up the container. In your case jfxrt.jar exactly as the error message says

<ant4eclipse:jdtClassPathLibrary name="at.bestsolution.efxclipse.tooling.jdt.core.JAVAFX_CONTAINER">
  <fileset dir="..."/> // the location to the jar
</ant4eclipse:jdtClassPathLibrary >