Why doesn't Maven find jfxrt.jar, although it is included in the JDK?

Hi,
Why doesn't Maven find jfxrt.jar, although it is included in the JDK?
My solution to build JavaFX apps with Maven is:
<dependency>
            <groupId>com.oracle</groupId>
            <artifactId>javafx</artifactId>
            <version>2.2</version>
            <scope>system</scope>
            <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
</dependency>It works, but I wonder why the Maven build process can't find it automatically, as any other Java dependency, too.
If I build without the dependency, it can't find javafx imports.
Since Java 7 Update 6 it is included in the JDK.

There is a long drawn-out thread on this (you don't need to read it):
Error initializing OC4J server (JDev 10.1.3 EA1) "JDK 7u6 JavaFX integration - Is jfxrt.jar supposed to be on the classpath?"
Short summary is that jfxrt.jar is in the jdk/jre as of 7u6, but not on the default classpath for the jdk/jre (as of 7u13).
This will change in a future release (e.g. I believe the latest early access builds of jdk8 do have jfxrt.jar on the default runtime classpath).
So for now, you will need to explicitly add jfxrt.jar to the classpath. There are various ways to do this, one is to use a system dependency and then use the maven ant run plugin to package your app as is done in this example: http://code.google.com/p/willow-browser/source/browse/pom.xml
<dependency>
  <groupId>javafx</groupId>
  <artifactId>jfxrt</artifactId>
  <version>${javafx.min.version}</version>
  <scope>system</scope>
  <systemPath>${javafx.runtime.lib.jar}</systemPath>
</dependency>
<plugin>
  <artifactId>maven-antrun-plugin</artifactId>
  <version>1.6</version>
  <executions>
    <execution>
      <id>create-launcher-jar</id>
      <phase>package</phase>
      <goals>
        <goal>run</goal>
      </goals>
      <configuration>
        <target xmlns:fx="javafx:com.sun.javafx.tools.ant">
          <taskdef
              uri="javafx:com.sun.javafx.tools.ant"
              resource="com/sun/javafx/tools/ant/antlib.xml"
              classpath="${javafx.tools.ant.jar}"/>
            <fx:application id="fxApp"
                name="${project.name}"
                mainClass="${exec.mainClass}"/>
            <fx:jar destfile="${project.build.directory}/${project.build.finalName}-launcher">
              <fx:application refid="fxApp"/>
              <fx:fileset dir="${project.build.directory}/classes"/>
            </fx:jar>
            <attachartifact
                file="${project.build.directory}/${project.build.finalName}-launcher.jar"
                classifier="launcher"/>
        </target>
      </configuration>
    </execution>
  </executions>
</plugin>Another way would be to make use of the zenjava javafx maven plugin:
http://www.zenjava.com/2012/11/24/from-zero-to-javafx-in-5-minutes/

Similar Messages

  • Why doesn't apple have a file of events that ties to the iCal program and the Address book file? By having that relationship it seems that you could call up all of the events tied to a customer while in the address book or likewise call up all of the even

    Why doesn't apple have a file of events that ties to the iCal program and the Address book file? By having that relationship it seems that you could call up all of the events tied to a customer while in the address book or likewise call up all of the events tied to a contact that was in the iCal program as a scheduled meeting. Even in the to do's you could easily look back at the events tied to an individual so as to bring yourself up to speed with what you were doing with the individual in mind.

        I definitely understand your concern and I apologize for all the frustration. Verizon Wireless has a strong customer commitment to delivering the best from our service and staff. I am disappointed to hear the service you received did not reflect this commitment.
    I definitely want to help get to the bottom of this and further assist you. Please reply to my direct message so I can access your account and further assist. I am sure we can get this resolved.
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?

    Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?

    I'll provide some Proof
    Link 1
    Link 2
    Link 3
    you are not the only person with this problem maybe it will come back in Mountain Lion who knows. 

  • Why doesn't Lion OSX 7.2 support Pando Calendar? Installed the Lion OSX7.2 and lost my calendar!

    Why doesn't Lion OSX 7.2 support Pando Calendar? Installed the Lion OSX7.2 and lost my calendar!

    Have you gone to the developers site? Do you have the latest version?
    If you're having problems with the software on Lion and you have the latest version you need to contact the developer.
    regards

  • How do i find out what numbers i have included on the find my phone app?

    how do i find out what numbers i have included on the find my phone app?

    Sorry, but what do you mean by "what numbers I have included"? Find My iPhone doesn't store nor go by phone numbers, if that's what you're referring to. It's done by the Apple ID you used to set up Find My iPhone on the device you wish to track, and the devices will be shown by name.
    You may need to explain further what it is you're asking or are trying to accomplish.
    Regards.

  • I received a macbook pro in april but it has not any optical drive although it was included in the order form. What should I do?

    i received a macbook pro in april but it has not any optical drive although it was included in the order form. What should I do?

    I now the place but it is my first time to work with mac and no body is here to help me and i should figure it out by myself. The slot looks closed with the similar color  as aluminum so i thought it is blocked. But in system info i saw that there is  a drive on my macpro so i test a cd to insert and .

  • Why doesn't my card reader work when I take it from the camera and put it in the reader? Nothing happens and it doesn't show up in finder.

    When I put my card into the reader, nothing happens. It doesn't show up in finder so I can't dismount it. The pictures on it aren't readeable all of a sudden, except for two of them, and that's all that would download to iphoto, but I had to connect the camera since the card reader doesn't resond.

    Hi bricknut dab,
    Welcome to the Support Communities!  Are you asking about the SD slot on your Mac, or is this an external card reader plugged into a USB port?  If it is the one on your Mac, the article below may be helpful.  Did you try more than one SD card?  You can use Disc Utility to erase and reformat the card if needed.
    About the SD and SDXC card slot
    http://support.apple.com/kb/ht3553
    I put the card in the slot, but it did not mount.  What should I do?
    Remove the card and insert it again. Sometimes, if you put the SD card into the slot too slowly, it may not mount properly.
    Can I reformat an SD card with Disk Utility?
    Yes. Using Disk Utility, you can partition and format an SD device as FAT32 (using the MS-DOS FAT setting) or Mac OS Extended. The Mac OS Extended format can only be used on Macintosh systems. Cards formatted to Mac OS Extended will not be recognized by non-Apple systems. Formatting cards larger than 32GB for use with digital cameras, GPS, and other devices may require formatting them with the exFAT file system. When in doubt, format the cards in the device you intend to use with the card.
    Cheers,
    - Judy

  • Why doesn't my Finder search work?

    Wanted to perform a search of text content in some PDFs. There are, say, 30 x 5-20 page PDFs sitting in a couple of folders, on a server I'm connected to. In Finder, I hit Apple F and then asked it to search the root folder those folders were sitting in, for one word that I knew was in one of the PDFs, specifying 'kind' as PDF. The title bar of the Finder window says 'searching FolderName' but even if I leave it there all day, nothing appears. Why not? It's also hard to know if it's actually doing anything because there's no 'in progress' symbol.

    Spotlight isn't indexing the server, so it won't find anything there.
    https://itunes.apple.com/ie/app/easyfind/id411673888?mt=12
    or
    http://www.macupdate.com/app/mac/30079/find-any-file
    couple of alternatives.

  • Why doesn't  iTunes find my music or app files anymore?

    Whenever I boot up the computer and run iTunes I find that my iTunes account is completely empty- no music, no purchases, nothing. The first time I didn't think much of it, but now I've reloaded all of my music several times and iTunes keeps resetting on a daily basis!!! Also, everytime I reload the music I end up with multiple copies of everything.  I only have about 6,000 songs but when it is done reloading (a couple hours later) I have over 22,000.  I have tried deleating itunes and re-installing it.  I have tried -adding a folder, -adding files -changing my preferences -keep media file organized and the -copy files to itunes media folder but it doesn't save any of these features.   I have also tried changing my configsys or system configuration - turning off all services and startups except MicroSoft and Apple.  I have searched the Internet and have not found any solutions that work. I am very frustrated and discouraged after wasting so much time on this.  

    You need to give a little more inforamtion about your set up.
    Do you have a default iTunes setup with your music in c:...My Music\iTunes\iTunes Music?
    Or are you using another drive or a network?
    The first thing you need to check is if your Music files are still where they should be.
    You can also check in Edit>>Preferences>>Advanced>>General for the location of your iTunes Music folder, what does it say, as is it correct?

  • Why doesn't javac find getPixels

    I took out the other code to simplify, it's importing about every package getPixels might be I think:
    import java.applet.*;
    import java.awt.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.image.DataBuffer.*;
    import java.awt.Image;
    import java.awt.image.*;
    import java.awt.image.SampleModel.*;
    import java.awt.image.ComponentSampleModel;
    import java.awt.image.PixelInterleavedSampleModel;
    import java.awt.image.Raster.*;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    public class M2 extends Applet
         private Graphics g;
         private DataBufferInt dbuffer=new DataBufferInt(3,2700);//TYPE_INT=3
         private int[]pieces=new int[3000];
    public void init(){setBackground(Color.cyan);}
    public void start()
         g=getGraphics();
         getPixels(0,0,60,45,pieces,dbuffer);
    public void paint(Graphics g)
         //g.setColor(Color.yellow);
         //g.fillRect(0,0,30,20);
                        }

    Find a class that does have getPixels. It will almost definietly be an instance method. Look up the Java Tutorials (to the left) and start reading from page one, and eventually move through the Graphics section. At that point search the API for Image and classes related to it...

  • Why doesn't my MacBook air (bought in Sweden) keyboard look like the ones in USA?

    Hello!
    I'm really curious about this. Why does my new MacBook Air bought 2013 in Sweden have different keyboard from the MacBook air keyboard in USA?
    Shouldn't it be the same keyboard. I mean it's still apple. Please help me find out this.
    The American version
    and this is how my keyboard looks
    Thank.
    Regards
    Dallia

    Dallia ~ A least it doesn't look like my Mom's keyboard:

  • Why doesn't my ical and address book no longer sync between the iphone4S and my MacBook?

    Can anyone explain why the new iphone doesn't sync back to my MacBook. My ical won't sync, nor will my address book when I make changes to either device? I just bought the phone today and no one at the Mac Store could provide any assistance. I was told that, "it's too new." and had to set up a call with tech support for next Tuesday. I need to work so if anyone could help with this that would be great!
    Thank you!

    I think my company updated Exchange on Friday and since then I cannot sync with Mac Mail, Entourage does not seem to be working either?
    Any fix found

  • Why can't I find/access my recent downloads and imessage with the new IOS software update?

    I just recently updated my phone to the new IOS 7 software. I had to do this using my computer. It updated ok but now when I try to find apps that I downloaded (from the computer again) I am unable to locate them. I did find one app that was downloaded but when I click install nothing seems to be happening. I have turned the phone off and on several times hoping it would reset but nothing. I am also unable to access imessage for some reason. Help!!!

    You can't update your iPad past iOS 5.1.1
    Many iPad 1 owners reported slow downs with iOS 5.
    Under the Settings app, General category under About, how much storage capacity does your iPad have left?
    You could try a hard restart or reset by holding down the sleep/on-off button and home button simultaneously.
    Once the screen goes black, wait about two seconds, then let both buttons go.
    See if this changes anything.
    Good Luck!

  • Why doesn't Lightroom appear in my list of installed apps, with the option to update it.

    All the other apps appear available to update, but with Lightroom I have to download it and do a fresh install each time.

    Sorry, re-reading the info, the path is correct - but it isn't perhaps as clear as it should be; might I suggest changing the wording to something like 'look for the opm.db file located at
    /AppData/Local/Adobe/OOBE/opm.db
    however - that doesn't solve the issue of Lightroom 5 not being listed in my installed apps!
    Cheers
    Sweens

  • Why doesn't a List update it's display when you change the dataprovider Array?

    Hi. I have a list and an array with more strings inside. If i
    remove some of the strings from the array and add some new strings
    then the list display doesn't update. How can i force the list to
    update?
    List1.dataProvider = Array1;
    Array1.pop();
    Array1.push("test");
    List Update??????

    Hi MaxMuld,
    Because it has to be ArrayCollection, not the Array.
    Documentation about Datagrid.dataProvider says that Array as
    provider will be converted to ArrayCollection. And ArrayCollection
    performs all the notifications if you add/delete items in it.
    If you still want to use Array you should do the following:
    var ar= new Array();
    ar.push(x)
    grid.dataProvider = ar;
    grid.dataProvider = new Array();
    ar.pop();
    grid.dataProvider = ar;
    But this is very inefficient.
    Dmitri.

Maybe you are looking for