JavaFX with winUSB

Hi
Has anyone tried successfully to interface to a USB device using winUSB?
Alex

I see that WinUSB is the Microsoft API for USB on Windows, then you can use it with JNI or JNA.
JNA sounds to be the simpliest solution.

Similar Messages

  • Want to integrate JavaFX with JSF

    Hi all,
    I am developing a web application in JSF. I want to integrate it with JavaFX. Is it possible to do so? If possible then how can I achieve it?
    Thanks in advance,
    JSF GEEKS

    Actually I found the same code for integrating JavaFX with JSF, which you have linked, but I show it afterwards. Anyways, thanks for your kind support.
    The other interesting thing I found is, interaction between JavaFX and JSF.
    You can interact between JavaFX and JSF like the following way.
    You just give the id in the script in which you have defined the parameters of applet to run in browser with JSF or any language like this;
    <ui:script id="js" type="text/javascript">
        javafx(
                  archive: "Your_JAR_File.jar",
                  draggable: true,
                  width: 550,
                  height: 370,
                  code: "package_name.Main",
                  name: "Name_of_Application/package_name",
    id: "myJavaFX"
        </ui:script>Then uin the header part of your page (acually in <head>), you write another script something like below;
    <script language="javascript" type="text/javascript">
    function changeColor() {
    myJavaFX.script.line1=myJavaFX.Packages.javafx.scene.paint.Color.WHITE;
    myJavaFX.script.line2=myJavaFX.Packages.javafx.scene.paint.Color.LIGHTBLUE;
    </script>Here line1+ & line2 are the variables of JavaFX script/program. So here, by this example I am changing the value of variables of JavaFX script to change the colors. myJavaFX {color:#333333} {color}is the id of the applet which I have given in the first script to generate and run the applet in browser.
    so here I give you what I understood. Hope it helps.
    Thanks,
    JSF GEEKS
    Edited by: jsfgeeks on Sep 17, 2009 10:59 AM
    Edited by: jsfgeeks on Sep 17, 2009 11:02 AM
    Edited by: jsfgeeks on Sep 17, 2009 11:03 AM
    Edited by: jsfgeeks on Sep 17, 2009 11:04 AM

  • Javafx with jinternalframe

    Has anyone use javafx with jinternalframe from swing?
    how was it? everyting works? Cuz I m having problems

    Javafx programs may contain either:
    - multiple stages or
    - one stage, multiple scenes or
    - one stage, one scene, and multiple groups (or layouts)
    Below is an example of the second option.
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.layout.*;
    import javafx.stage.Stage;
    import javafx.scene.Group;
    public class SceneX extends Application {
         * @param args the command line arguments
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage primaryStage) {
            final HBox gr1 = new HBox();
            final HBox gr2 = new HBox();
            primaryStage.setTitle("Hello World!");
            Button btn1 = new Button();
            btn1.setText("Go to page 2");
            gr1.getChildren().addAll(new Label("First    "), btn1);
            final Scene sc1 = new Scene(gr1, 300, 250);
            final Scene sc2 = new Scene(gr2, 300, 250);
            btn1.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent event) {
                    primaryStage.setScene(sc2);
            Button btn2 = new Button();
            btn2.setText("Go to page 1");
            gr2.getChildren().add(btn2);
            btn2.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent event) {
                    primaryStage.setScene(sc1);
            primaryStage.setScene(sc1);
            primaryStage.show();
    }

  • JavaFX with external libraries

    Hi,
    I would like to get some help about compiling a JavaFX code with external libraries. I've searched around a lot, but cant find the solution.
    Basically I have a JavaFX application, that uses images (they are under the src/ folder as they suggest it) and uses external .jar files, AND these jar files uses other external files (not jars). I want to run the application in desktop mode first, so now I am interested in a solution that makes it work on PC.
    I am using Netbeans to develop and run (works everything fine when running from IDE), and using javafxpackager to compile, when I want to run without the IDE.
    When I compile with Netbeans, the generated jar and jnlp files can run ONLY from the dist/ folder, if I copy it somewhere else in my winchester, it does not start.
    I have find something about "signing jars", so I have to make the jars signed to be able to run them AND to be able to link to the image files that the application uses.
    So I have 2 problems/questions with this situation:
    - I have to use external jars and those jars uses external files, but when I start the app, it seems its __DIR__ variable is not set correctly, but I've read that I have to make the application "signed" to solve this problem, but
    - if I make the JavaFX signed, it requires that all other jars have to be signed? (it sounds logical of course)
    So, my final question is, do I have to make the application (and all other jars) signed, to be able to use external jars and files or not (if I want to run as a desktop application)?
    And if I have to make them signed, then will the relative linking work correctly?
    So whats the best way to make it work (using external files and jars)?
    Thanks for any help, and sorry for the long post (and for my bad english) :)
    Cheers
    kojak

    kojak wrote:
    When I compile with Netbeans, the generated jar and jnlp files can run ONLY from the dist/ folder, if I copy it somewhere else in my winchester, it does not start.Unfortunately JNLP requires the base location to be stored in the JNLP file. While that supposedly makes JNLP distributed stuff more secured, it also make them cumbersome and time-consuming to use.
    Futhermore, JNLP files generated by NetBeans reference a local web server that only runs when NetBeans is on.
    That explains why you just simply cannot move the app to the location you want. I you move them, you have to open them (any text editor) and modify the codebase field (possibly the homepage's href too).
    If you want to use only 1 single JNLP, all your JARs references in that JNLP need to be signed with the very same certificate (certificate A).
    Unfortunately, this is not good most of the time as some external lib (generally the ones coming from Sun/Oracle) are already signed and you cannot resign them.
    The other option is that you can make your main JNLP reference other sub-JNLP that are placed at the same location. Each of these sub-JNLP can reference 1 or more JARs that are signed with a different certificate (1st JNLP used certificate B, 2nd JNLP used certificate C, etc.).
    An example adapted from my own main JNLP:
    <resources>
        <java version="1.6+"/>
        <jar href="http://<intranet web server>/<my main JAR file>" download="eager" main="true"/>
        <extension href="http://dl.javafx.com/1.3/javafx-rt.jnlp" name="JavaFX 1.3.x Runtime"/>
        <extension href="http://<intranet web server>/l2fprod-7.3.jnlp" name="l2fprod-7.3"/>
        <extension href="http://<intranet web server>/JFXtras-0.7.jnlp" name="JFXtras-0.7"/>
        ...and JFXtras-0.7.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://<intranet web server>" href="JFXtras-0.7.jnlp">
        <information>
            <title>JFXtras-0.7</title>
            <vendor>JFXtras</vendor>
            <homepage href="http://code.google.com/p/jfxtras/"/>
            <description>Additionnal controls for JavaFX</description>
            <offline-allowed/>
        </information>
        <security>
           <all-permissions/>
        </security>
        <resources>
           <jar href="lib/JFXtras-Common-0.7rc2.1.jar" main="false" download="eager" size="1309380"/>
           <jar href="lib/JFXtras-Controls-0.7rc2.jar" main="false" download="eager" size="1453233"/>
           <extension name="MigLayout-3.7" href="MigLayout-3.7.jnlp"/>
           <extension name="SwingWorker-1.2" href="SwingWorker-1.2.jnlp"/>
        </resources>
        <component-desc/>
    </jnlp>Both JARs files in that particular JNLP can be signed with a different certificate from the one of the main jar, same wit the JARs listed in the 2 sub-JNLPs that are referenced here.
    Note: of course, currently, JARs provided by JFXtras are note signed, so I end having to sign them myself anyway, but you get the idea.
    Unfortunately NetBeans does not generate such setup so you'll have to find a tool or develop something that does that for you.
    Perhaps you should try to post your question in the web start forum Java Web Start & JNLP as well but be prepared to face the all knowledgeable and always helpful but not very user-friendly and definitely not patient with new comers Andrew Thompson.
    Note that I've never used external files so I do not know if signing the JAR would fix that particular issue (I do not think so).
    Overall I do not like Java Web Start, as said before, it's cumbersome, time-consuming to use, poorly documented, with basically very little to no packaging/helper tool, prone to failure if you make the slightest mistake in the JNLP(s) definition (having a nebulous documentation of its feature does not help) and they've introduced a stream of bugs and errors with each sub-release of Java 6 for the past year and the half that makes programmer's life a hell and JWS a joke compared to other deployment technologies used by competitors.

  • JavaFX with AspectJ

    Hello,
    I'm working on a project which is on one hand very GUI oriented, and on the other hand needs very strong and maintainable code.
    One of the features I need to implement is monitoring user activity during run-time. After some discussion, it was decided integrating AspectJ into the code would be the best solution, instead of placing Observer design-patterns all over the place.
    Only one trouble remains: the project uses JavaFX for GUI :(
    Since AspectJ uses a Weaver, we thought it might be possible to first run the AspectJ weaver on our Java code, and then run the JavaFX normally. (No need to have aspects inside of the JavaFX)
    However, we have no idea how to do just that!
    Does anyone have any idea how to do this? We're a group of developers, and we work via SVN on eclipse - so we pretty much need this solution to integrate into eclipse, so we can run and debug the program normally.
    I think that if we can solve this, we can manage creating an executable later on, but if you have any tips on that front it would be welcome.
    Thanks in advance!!

    The NetBeans 6.5 support is planned only before SDK 1.0
    See issue [137990 |http://www.netbeans.org/issues/show_bug.cgi?id=137990] Missing required dependency with nightly NetBeans 6.5 build

  • JavaFX with Database

    i need your help.
    i have a question. plz answer me.
    when i use table or tree in JavaFX using "Letters", i could see these on the web page(get the information from "words")
    (ProjectName->mouse right button click->choose Properties->choose RUN->click RuninBrowser comboBox)
    but, when i make a table and tree using Database, i cannot see these on the web page.(get the information from DB)
    what's the problem?
    JavaFX doesn't support this?

    I am not sure I fully understood the question, so excuse me if I doesn't address it.
    Mu guess is that you made a JavaFX program accessing a database at a given URL, and you try to use this script in the browser, without result.
    The issue is probably that the database is located in a different server than your Web page with the applet, so standard Java security kicks in.
    You need to sign the applet to let it access resources on different server.
    HTH.

  • JavaFX with LibGDX, or Xith3D?

    Just curious if FX is compatible with any of these?  I thought I saw something on FXExperience about Xith3D and a new port for JavaFX8, but I don't think so.
    I heard you can add a LibGDX object to a Scene though.
    Not too sure which is better, both seem good but I would like to work with FX, as Xith says it works with either Swing or AWT..... 
    I want to create some 3D Goodies, but the 3D API is still very new, and there are soo many bugs that need to be fixed.  I like helping out with reports, but it's very overwhelming, and time is passing by.
    I like that LibGDX is for Mobile and WebGL though!
    Thoughts?

    In your javafx applications you can use standard java, so you can write any kind of project. JavaFx use special storage API. If you need something else u have to use java and maybe better on server side.

  • JavaFX with RTL lang?

    have visual component of JavaFX support RTL(right to left) language?
    Which property do that on textBox for example?

    The NetBeans 6.5 support is planned only before SDK 1.0
    See issue [137990 |http://www.netbeans.org/issues/show_bug.cgi?id=137990] Missing required dependency with nightly NetBeans 6.5 build

  • JavaFX with TreeGrid

    Good morning, I'm new here on the forum and am having some difficulties to test TreeGrid with JavaFX.
    To do this, I'm calling a html file in javafx, which aims only draw TreeGrid.
    The way I'm doing the TreeGrid returns the following error:
    [0]: Empty xml received from server from
    [0]: Can not load XML based TreeGrid
    [0]: Unknown style
    [0]: Empty xml received from server from
    In tag <bdo> I'm passing the values and Layout_Data Data_Data fixed and Upload_Format = 'json'.
    Looking at it, I thought the files and Text.xml DEFAULTS.XML were not being found, so I got to add the values Text_Url = "Grid / Text_xml" and Defaults_Url = "Grid / DEFAULTS.XML" but still giving error (have also verified the existence of these files).
    [0]: Empty xml received from server from Text_Url = 'Grid / Text.xml'
    [0]: Can not load XML based TreeGrid
    [0]: Unknown style
    [0]: Empty xml received from server from Defaults_Url = 'Grid / DEFAULTS.XML'
    So I would like to do with you as this can be fixed or if it really is possible to use TreeGrid with JavaFX.
    Thank you.

    In tag <bdo>I googled the bdo tag because I had never heard of it:
    http://www.w3schools.com/tags/tag_bdo.asp
    It is for specifying the direction of bidirectional text.
    bidirectional text is currently not supported in JavaFX, so it is unlikely to be supported in a html page hosted in WebView.
    Empty xml received from server fromYou were trying to load the html file from an internal jar resource, not hosted on a server, so that won't work unless the html file/javascript loaded has some absolute reference to a server and you actually have a server to return valid xml comsumable by whatever javascript control you are using.
    As other parts of your app are implemented in JavaFX, one approach you might want to consider is using the built-in Tree and Grid controls in JavaFX to achieve what you want rather than embedding javascript/html in WebView.

  • HowTo: Compilie JavaFX with Ant (without netbeans build-impl.xml)?

    Howdy, see subject :)
    Cheers!

    Here's a cleaner solution....
    1. Download and install the SDK on your machine
    2. Copy the SDK installation files into your project (I copied c:\Program Files\JavaFX\javafx-sdk-1.0 to ./Resources/JavaFX/. in my project) - this is used for compilation only and not packaged with distro.
    You might want to now uninstall the SDK for accurate testing
    3. Configure Ant (as below).....
    Since I put my JavaFX SDK in my project under ./Resources/JavaFX/javafx-sdk1.0 you will see this occur in the config below.
    <?xml version="1.0"?>
    <project name="MyJavaFXProject" default="compile" basedir=".">
      <path id="javafx.classpath">
            <fileset dir="./Resources/JavaFX/javafx-sdk1.0/lib">
                <include name="**/*.jar" />
            </fileset>
      </path>
      <taskdef classname="com.sun.tools.javafx.ant.JavaFxAntTask" name="javafxc">
            <classpath refid="javafx.classpath" />
      </taskdef>
      <target name="compile" depends="prepare" description="compile java and fx source">
            <javac srcdir="./Source/Java" destdir="./build/classes" includes="**/*.java"/>
            <javafxc srcdir="./Source/Java" destdir="./build/classes" includes="**/*.fx" executable="./Resources/JavaFX/javafx-sdk1.0/bin/javafxc.exe">
                <classpath refid="javafx.classpath" />
            </javafxc>
      </target>
      <target name="prepare" description="create build directory for compiler output">
        <mkdir dir="./build"/>
        <mkdir dir="./build/classes"/>
      </target>
      <target name="clean">
        <delete includeemptydirs="true">
          <fileset dir="build" includes="**/*"/>
        </delete>
      </target>
    </project>Hope this helps someone, and p.s.... if you are a maven user.. perhaps you can repackage the JavaFX SDK and install it in a Maven repository.

  • JavaFX with iPad and other Tablets...

    Hi,
    can i run JavaFX code on iPad4 and iPhone ?? on other tablets like Nexus - Galaxy ...
    How can i make programming on iPad -iPhone using Java and JavaFX ??
    it seems that no intersection between iPadiPhone and Java ..? Really ??
    Many thanks

    jsmith wrote:
    A tablet you built yourself using a Raspberry Pi or Beagleboard (using embedded JavaFX preview releases) => Yes.Lol, now that's a complete list :) I'm going to start listing "stuff you built yourself" too.
    >
    no intersection between iPadiPhone and Java ..?CorrectThe blame is of course to be placed upon Apple and all their rules (yay lets all program Objective C and basically be forced to resort to low level C also, because I say so), and Google for basically ripping Java for their own purposes and thus breaking up what could have been a thing of beauty. Hopefully in a couple of years Dalvik will be as good as the JVM built into Java 5 :/

  • Javafx  with JDIC

    when I run it on netbean ,it's run work
    but run the test.jnlp show error
    java.security.PrivilegedActionException: org.jdesktop.jdic.init.JdicInitException: java.lang.NullPointerException
         at org.jdesktop.jdic.init.JdicManager.loadLibrary(Unknown Source)
         at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
         at test2.Main$JMFComponent.set$center(Main.fx:521)
         at test2.Main.<clinit>(Main.fx:596)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(Unknown Source)
         at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: org.jdesktop.jdic.init.JdicInitException: java.lang.NullPointerException
         at org.jdesktop.jdic.init.JdicManager.init(Unknown Source)
         ... 18 more
    Caused by: java.lang.NullPointerException
         at java.io.File.<init>(Unknown Source)
         ... 19 more

    Show Error
    Java Web Start Error: Use of native libraries requires unrestricted access to system
    can you tell me detail method .
    My JNLP
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="file:/D:/" href="test2.jnlp">
    <information>
    <title>test2</title>
    <vendor>kevnlin</vendor>
    <homepage href=""/>
    <description>test2</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <property name="jnlp.packEnabled" value="true"/>
    <property name="jnlp.versionEnabled" value="true"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="test2.jar" main="true"/>
    <jar href="lib/jbm-core-client.jar"/>
    <jar href="lib/jbm-jms-client.jar"/>
    <jar href="lib/jbm-transports.jar"/>
    <jar href="lib/jnp-client.jar"/>
    <jar href="lib/netty.jar"/>
    <jar href="lib/customizer.jar"/>
    <jar href="lib/jmf.jar"/>
    <jar href="lib/mediaplayer.jar"/>
    <jar href="lib/multiplayer.jar"/>
    <jar href="lib/sound.jar"/>
    <jar href="lib/jboss-javaee.jar"/>
    <jar href="lib/jnpserver.jar"/>
    <jar href="lib/jboss-logging-spi.jar"/>
    <jar href="lib/jbossall-client.jar"/>
    <jar href="lib/jdic.jar"/>
    </resources>
    <resources os="Windows">
    <nativelib href="\lib\jdic2.jar"/>
    <nativeli href="lib/jdic_native.jar"/>
    </resources>
    <application-desc main-class="com.sun.javafx.runtime.main.Main">
    <argument>MainJavaFXScript=test2.Main</argument>
    </application-desc>
    <update check="background">
    </jnlp>

  • JAVAFX with JDK 6

    Hi,
    I  created a javafx application in eclipse as java environment jdk 6.
    When i make as executable jar and running outside eclipse the jar throwing an error as
    Exception in thread "main" java.lang.RuntimeException: Application launch error
            at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:122)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.win.WinApplication._invokeLater(Ljava/lang/Runnable;)V
            at com.sun.glass.ui.win.WinApplication._invokeLater(Native Method)
            at com.sun.glass.ui.Application.invokeLater(Application.java:338)
            at com.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:620)
            at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:173)
            at com.sun.javafx.application.PlatformImpl.runAndWait(PlatformImpl.java:212)
            at com.sun.javafx.application.PlatformImpl.tkExit(PlatformImpl.java:320)
            at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:421)
            at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
            at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
    Please help me out how can i resolve this error.
    Sandhya...

    JDK 6 is no longer supported. You should use Java 7 if at all possible.
    How are you building your jar file? Is it directly from Eclipse (File -> Export -> Java -> Runnable Jar File) or are you doing an FX Build using ant or javafxpackager as described here?

  • Can i integrate JavaFX with JMS

    I am to develop an application using JMS, but i am quite not sure whether its fine if i develop the GUI in JavaFX. I would like to know if i can have both JMS and JavaFX working together.

    Heyy,
    so what do i need to download from the link u sent me.
    i opened the page u linked..
    on that u clicked on download..so i was redirected to another page.
    over there i clicked the second link among the 5 that were listed..
    the following one:
    http://www.exadel.com/web/portal/download/flamingo?p_p_id=EXT_10_INSTANCE_3Rbk&p_p_action=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=2&p_p_col_count=4&_EXT_10_INSTANCE_3Rbk_struts_action=%2Fext%2Frepository%2Fview&_EXT_10_INSTANCE_3Rbk_file_name=SeamBookingDemoFlamingoJavaFX.zip&#p_EXT_10_INSTANCE_3Rbk
    and this file contains just the plugins and features, theres no such example 'push' in this i guess..
    so where am i to find that
    Thanks,
    - romil

  • How to packaging javaFX with ICON

    Hi
    I have successfully generated native application for javaFX, however I don't know how to package application ICON to native package.
    I already able to see icon when I run it in netbeans.
    Regards,
    Hua Jie

    Look at the output from the javafxpackager call - it prints all kinds of helpful messages that tell you how to customize (search for the word icon). On Mac it told me to put add the image: package/macosx/MyApp.icns. On windows it told me to add the image package/windows/MyApp.ico. I don't know about linux.
    I've been running javafxpackager from the command line - I find that the package directory needs to be in the same directory I run from (though maybe I just need to set the -classpath arg).

Maybe you are looking for

  • Error While Calling a EJB

    Hai,         I had created a java class that includes the EJB in it The code is given below  : Properties props = new Properties();           try                props.put  (Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextF

  • Flex 3 and CF - can't hit flex2gateway

    I'm trying to setup Flex 3 to work with CF using Flash Remoting and I'm stuck getting the flex2gateway to work. I have CF 8 installed as a standalone server integrated with IIS. I'm getting a 500 error when I view http://localhost/flex2gateway in a b

  • ITunes locking up iMac

    So, I've been fighting with my iMac for about a month now. Issue is that iTunes and/or the Finder locks up. Applications that I already have open seem to continue to function but if I leave my iMac on and come back to it, iTunes either won't open (ic

  • How do I get my iPad to recognize Air Port?

    My computer and iPhone use the same air port but the iPad doesn't. What's the cause and how do I get to? Frank

  • Stubborn geocoded photos

    Hello! I have some places recorded in My Places (menu > Window > Manage My Places). Geocoded photos won't show up on the geocoded coordinates, but are showing up on the nearest My Places point. I deleted all recorded My Places and some pictures jump