How do Mac and Linux find the JFX runtime?

I've been searching the documentation without success for the answer to what ought to be a simple question -- how do I point Mac or Linux at the 2.2 runtime? It's no problem if I'm running in an IDE (NetBeans, e(fx)clipse), where I can tell the IDE where I unpacked the SDK. But what if I want to run a jar file, such as produced by the ant tasks?
You'd think this would work (on Linux, where I unpacked the SDK into /opt):
java -cp /opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar:. -jar MyProgram.jar But it doesn't -- I get a popup saying "This application requires a newer version of the Java runtime. Please download and install the latest Java runtime from java.com. Then restart the application" (I'm running with 1.7.0_05-b05 from Oracle).
The only thing at all close I find in the Linux installation instructions is it says to unpack the samples as a subdirectory of the SDK, wherever I happened to put it, and then I should be able to run the examples with a simple "java -jar filename.jar". But even that's not quite true -- it only works if I first cd to the samples directory. But it's a start, so I tried...
cd /opt/javafx-sdk2.2.0-beta/rt
java -jar ~/dist/MyProgram.jarThat succeeds in finding the runtime, but my program doesn't work, because it doesn't find my dependent libraries. So I tweaked the command a little bit:
cd /opt/javafx-sdk2.2.0-beta/rt
java -cp ~/dist/MyProgram.jar -jar ~/dist/MyProgram.jarThat actually works. But it can't possibly be the right answer -- you shouldn't have to run a javafx program with the runtime directory as your working directory.
And even that doesn't work on Mac. There, Java knows how to find the runtime that's installed with JDK 7 update 5 for Mac. But if I want to test a program with the 2.2 runtime, what do I do? Setting -classpath on the command line still uses the 2.1 runtime. And if I try the trick of connecting to javafx-sdk2.2.0-beta/rt first, it doesn't work at all -- it doesn't find my libraries, and it throws up a "java quit unexpectedly" window after getting a segfault.
So what's a developer to do? Am I supposed to use the native packaging procedure instead?

JavaFX 2.2 is first version where Linux/Mac are supported as runtime (and not just SDK).
However, you need to install JavaFX Runtime that is part of JRE 7u6 (you can get beta from jdk7.java.net or wait for FCS version of it).
Installing JRE is the only way to get JavaFX runtime installed on Mac and Linux (and eventually on Windows too).
rt folder in the SDK is "private" copy of the runtime. It is not supposed to be used to run arbitrary JavaFX applications by default.
You can still force to use it as
java -Djavafx.runtime.path=/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar -jar MyProgram.jar
or
java -cp ~/dist/MyProgram.jar:/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar com.javafx.main.Main
Note that if you use "-jar" then "-cp" is ignored by java launcher. This is not JavaFX specific behavior.
JavaFX specific part is that properly packaged JavaFX main jar file will include copy of launcher class (com.javafx.main.Main)
and this is what will be run when you double click on jar or use "java -jar". Launcher will try to locate JavaFX runtime to use,
it knows how to find runtime in the SDK if it is sample located in the SDK itself and it also knows how to find installed version of runtime.
If JavaFX is not found then it will show you message you observed.

Similar Messages

  • How corba client and server find Naming service

    hello
    i want to ask how corba client and server find the Naming service ?
    10x

    By using a well-known port (I think the default for JavaIDL's NS is 1049) on a well-known address (localhost).
    As these values are not really standard, you can specify them when starting the server and client (+-ORBInitialPort 1050 -ORBInitialHost localhost+). See the documentation .

  • I partitioned my MacBook Pro and installed Windows 8 in it.....now I can't find my partition when I pressed option key when booting up.....so how can I do to find the partition to boot...I can see it in the disk manager in Mac....any ideas? thanks..!..

    I partitioned my MacBook Pro and installed Windows 8 in it.....now I can't find my partition when I pressed option key when booting up.....so how can I do to find the partition to boot...I can see it in the disk manager in Mac....any ideas? thanks..!..

    Hi LamboMong,
    just try this:
    http://refit.sourceforge.net
    install, reboot twice and choose the Windows-Partition on next startup.
    (The apple-bootloader doesn't display all bootable harddisks.
    With rEFIt you can boot from all partitions/harddisks on your computer.)
    I hope that will solve your problem.
    Daniel Fernau

  • How do I move a back up to another external drive and how does the Mac Book then find the new back up?

    how do I move a back up to another external drive and how does the Mac Book then find the new back up?
    I currently have the back up on a Time Capsule, I want to move it from the Time Capsule to another external hard drive.

    Did you read the link to the Pondidni website?  You will have to select the Time Machine HDD for the new MBP and the old one in System Preferences>Time Machine:
    Ciao.

  • I want to copy fotos to a mass storage external HD, but my emac only allow me to copy from the HD to the mac and not from the mac to the HD, how can I do it? thanks in adavance for your help

    I want to copy fotos to a mass storage external HD, but my emac only allow me to copy from the HD to the mac and not from the mac to the HD, how can I do it? thanks in adavance for your help

    The external HD might be set to Read Only on your eMac.  Try this:
    If the external HD shows on your desktop, single click the HD to highlight it.  From the Finder Menu bar at the top of the screen, click on File, pull down and click on Get Info.  At the bottom of window that opens, under Sharing and Permissions, you might see something like:
    System:  Read & Write
    Admin:  Read & Write
    User X:  Read Only
    User X being your user account.
    Good luck.

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • I have 2 computers (1 Pc and 1 MAC) and 1 Iphone.The I phone is synchronised with the PC. I want to synchronised it also with my MAC, without erasing all my music and files. Someone can help me to find the answer ?

    I have 2 computers (1 Pc and 1 MAC) and 1 Iphone.The I phone is synchronised with the PC. I want to synchronised it also with my MAC, without erasing all my music and files. Someone can help me to find the answer ?
    i have already try the copy/paste thing with the ID of the file "iTunes Music Library.xml" it didn't change a thing. each time I relaunched Itunes, the ID is the first I have in the MAC.
    I have more than 5 000 files of music. I don't want to recreate one by one all my playlits.
    Many thnaks for your answers.
    Constance

    You can sync iphone with one and only one computer at a time.  If you sync to another, it will erase the current content and replace with content form the new computer.  There is no way around this.
    Put everything on one computer and sync from there.
    BTW, you posted in the Home Share forum.  Your question seems to have nothing to do with home share.

  • How do you connect a Mac and PC to the internet?

    I have a high speed internet cable modem and wish to grant simultaneous access to the internet for both my G5 and PC. I purchased a router and tried to network through that, but it did not work. I am considering trying a wireless router -will this work?
    Is it even possible to route a Mac and PC to the same cable modem?

    I purchased a router and tried to network
    through that, but it did not work. I am considering
    trying a wireless router -will this work?
    Is it even possible to route a Mac and PC to the same
    cable modem?
    Yes, it is possible. How easy it is depends on your ISP.
    Some cable ISP providers program your cable modem to talk to no machine other than the one with which you 'registered' with them. That is, the machine the modem was connected to when internet service was installed.
    Remove that machine and connect another, no internet.
    If thats the case, then you get around it by whats called MAC address cloning. In the advanced router setup, there should be a tab for that very action. Go there, then enter the MAC address of your primary machine.
    (You may also have to set DNS and domain names in the basic router setup.)
    I know the Linksys web site provides detailed instructions for configuring their routers for a couple of large ISPs.

  • I have an ipod that is synced with an old PC, and now I have a Mac and I want the ipod to sync the photos on it with the Itunes on my Mac, but it says it was synced with another ipod.  How can I accomplish this?

    I have an ipod that is synced with an old PC, and now I have a Mac and I want the ipod to sync the photos on it with the Itunes on my Mac, but it says it was synced with another ipod.  How can I accomplish this?

    Is it the same user/iTunes account or...?
    Syncing to a new computer should give you the opportunity to replace the exisiting contents with the new.

  • I uploaded a video from a flashdrive to my Mac and it compressed the video to lower quality and shrunk it in size. How do I get it to the original size?

    I uploaded a video from a flashdrive to my Mac and it compressed the video to lower quality and shrunk it in size. How do I get it to the original size?

    It changed the Aspect ratio of the video, as if it had been shot on a phone instead of a camera. When first looking at the footage it was in landscape aspect but when I transfered it to a memory unit to put on a different computer it uploaded it in a different ratio

  • I just got a Mac and I use the same internet connection as my mom and my brother, who has an iPad. He can click on something that has my name and then Macbook Air, and is able to see everything on my computer screen. How do I fix this?

    I just got a Mac and I use the same internet connection as my mom and my brother, who has an iPad. He can click on something that has my name and then Macbook Air, and is able to see everything on my computer screen. How do I fix this so he cant see what i am doing on my computer?

    No, I made sure nothing was checked for that section when i found out he could see my screen. At the top it says "computers on your local network can access your computer at: blah blah". I think thats how hes doing it but i dont know how to fix it.

  • I'm new to Mac's and I find the display's just slightly too small. I'd like to increase the size for all my program. Is there a single setting that I can change?

    I'm new to Mac's and I find the display's just slightly too small. I'd like to increase the size of my display for all my programs. Is there a single setting that I can change as a default setting?

    You can drop the resolution a little, but it makes everything blurry.
    OS X isn't as friendly like Windows is to give some UI adjustment, one of many major complaints about the platform that has gone unheeded for years now.
    As a lifelong Mac user who's eyes are going due to age, I'm really liking Windows 7 more and more every day.
    If you use Firefox, NoSquint and Theme Font & Size Changer add-ons, with a nice persona that makes better contrast, tweak the FF toolbars, you can at least make your web surfing tolerable on Mac's.
    Also you can set a Control key in System Preferences > Universal Access plus a scroll wheel mouse, if you need to zoom in/out certain areas of OS X, however for a pernament UI scale solution there is none that's practical, unless you have a large room, a projector and a smooth wall.
    A larger monitor won't work up close neither, however dropping the resolution and sitting back a bit might sharpen the images a bit.
    The UI really needs to be adjustable and it's not.

  • I am trying to run a CDrom on my Mac, and I get the following message: bdf.classic or bdf.osx not supportebdf.classic or bdf.osx not supported d anymore.  How can I fix this.

    i am trying to run a CDrom on my MAC and I get the following message: bdf.classic or bdf.osx not supported anymore.  How can I fix this and run my CDrom?

    I don't think you can fix it. Those messages imply the programs on the CD are older ones for PowerPC Mac (discontinued in early 2006) and does not have the code a current Intel-based Mac requires.

  • I bought the Adobe Exportpdf license and cannot find the link how to use it

    I bought the Adobe Exportpdf license and cannot find the link how to use it

    Hi Pedro,
    To use the ExportPDF service, simply visit http://exportpdf.acrobat.com and click 'Sign in' at the top right corner.  Enter your Adobe ID (email address) credentials to log into the service.  As ExportPDF is web-based, you simply utilize the tool through your web browser.  After you're logged in, you should see the ExportPDF interface, with a button saying 'Select PDF file..' to get the process started.
    You may also access ExportPDF via Adobe Reader by choosing File > Save as Word or Excel Online.
    Please let us know if you have any questions.
    -David

  • How do I delete an account from my Mac and not change the itouch?

    how do I delete an account from my Mac and not change the itouch?

    What does this mean: "I don' t have an image"?
    If you are in the Mail app yo can just delect the message and select delete. See chapter 12 of the users guide
    iPod touch User Guide iOS 6

Maybe you are looking for

  • JDeveloper takes a long time to open

    When I initially open JDeveloper with an application set to open, it can take over 15 minutes to load. If I don't have an application that opens as default, JDeveloper opens quite quickly. Are there any settings that we can adjust to get the open tim

  • How to synch ipad, iphone4s, macbook pro "message"

    "messages" doesnt show up on my list on MacBook Pro to synch with ipad and iphone. Why? and what can I do? thanks

  • Flickering mouse cursor/black bar on iMac 27"

    I recently bought a refurb 27" iMac (mid-2010) and did a DIY upgrade to add a SSD in addition to the regular hard drive. I tested the system before cracking it open and everything seemed fine. After the install, I started noticing that the mouse curs

  • Installation file (package) with adobe air sdk

    I made an installation file with adobe air (javascript, html via AIRSDK) , but when it's packed and I run the file, it sends an error message "This application cannot be installed because this installer has been mis-configured. Please contact the app

  • Adobe dowloaded my pictures to Revel but I can't find them?

    Where are my pictures that adobe said they downloaded to Revel and how do i access the site as I don't see Revel on my PC I am really new at this so I am not sure what to do as I thought the would be on my P.C. but I can't find the site rebel on my c