How to run a maven java fx project that includes jfoenix using javafx-maven-plugin

后端 未结 1 1505
孤街浪徒
孤街浪徒 2021-01-27 01:14

i was trying to create compile my application and create an executable file. as for now i see the best tool to use is javafx-maven-plugin.

i couldn\'t get it to work, s

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-27 01:41

    Based on the code you shared : https://github.com/Ealuthwala/javafx-export

    I edited and the POM so that it runs, and this is the output I see

    I am sharing the POM below, just use this POM and it should work.

    Apart from this you must use JDK 11.0.2 or lower. You need to change settings of your IDE to pick up JDK 11.0.2 or lower for this project.

    Because you are using features of JFoenix which will not work with a higher version of JDK. Reason is explained here : https://github.com/jfoenixadmin/JFoenix/issues/955

    With this you will be able to make this code run on mobile (64-bit android and iPhone ) using GluonVM, and Desktop, Linux, Mac, and web (using JPro), rasberry pie etc. So practically you cannot have any problem with this unless you have a very big reason for wanting to upgrade to Jdk 12. If you give time, may be a year, I am sure JFoenix team will fix it, if it is not done, and you really find JFoenix very useful you can either pitch in and contribute the fixes or use something else.

    
        4.0.0
        org.openjfx
        test
        1.0-SNAPSHOT
        jar
        
            UTF-8
            11 
            11 
        
        
            
                org.openjfx
                javafx-fxml
                11
            
            
                org.openjfx
                javafx-controls
                11
            
            
                org.openjfx
                javafx-graphics
                11
            
            
                com.jfoenix
                jfoenix
                9.0.9
            
            
                io.datafx
                datafx
                8.0.7
            
            
                io.datafx
                flow
                8.0.7
            
            
                org.kordamp.ikonli
                ikonli-javafx
                11.4.0
            
            
                org.kordamp.ikonli
                ikonli-fontawesome5-pack
                11.4.0
            
        
        
            
                
                
                    org.openjfx
                    javafx-maven-plugin
                    0.0.4
                    
                        org.openjfx.App
                        
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                        
                    
                
            
        
    
    

    0 讨论(0)
提交回复
热议问题