sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.27k stars 1.05k forks source link

JFonix Graphics does not run? I'm stuck plz help me. #1193

Open ahmeedev opened 3 years ago

ahmeedev commented 3 years ago

JFonix JFXTEXTFIELD OR PASSWORDFIELD working well, but as i use ProgressBar it gives me error. (in gradle project)

error is:

Caused by: java.lang.IllegalAccessError: class com.jfoenix.skins.JFXProgressBarSkin (in unnamed module @0x6ca7a6d6) cannot access class com.sun.javafx.scene.NodeHelper (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.scene to unnamed module @0x6ca7a6d6

sshahine commented 3 years ago

Hello, Well you are missing some opens and exports, you can check my other repo JFXBase for the required exports.

Regards,

ahmeedev commented 3 years ago

@sshahine Bro, I love you. You solved my Problem... Thanks a lot.

ahmeedev commented 3 years ago

@sshahine One more thing, Can you guide me, how to use github libraries directly in my gradle project? How it is possible? OR their is any way of converting the github repository in .jar file.

sshahine commented 3 years ago

So github is only used to host the source code of libraries, to get the jar build of a certain library you need to either install it from Maven/Gradle centrals or build it yourself and add it to your project.

ahmeedev commented 3 years ago

I pick it.. thanks for guidance.

On Wed, 24 Mar 2021, 12:40 PM Shadi Shaheen, @.***> wrote:

So github is only used to host the source code of libraries, to get the jar build of a certain library you need to either install it from Maven/Gradle centrals or build it yourself and add it to your project.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/sshahine/JFoenix/issues/1193#issuecomment-805577724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4HPKEQ2UQLZQ6MLWP6LS3TFGJPVANCNFSM4ZETTTFQ .

aminchawrash commented 3 years ago

@sshahine bro i have some problem but i don't know how use your repo please help me aminchawrash333@gmail.com or you bro @ahmadbintariq4u

ahmeedev commented 3 years ago

@aminchawrash You need to add some extra exports as VM Options.. Here is my Gradle file. Here you can also know much about other libraries... pick the export and your exceptions will be done.

plugins { id 'java' id 'application' id 'org.openjfx.javafxplugin' version '0.0.9' }

group 'org.groupaplha' version '1.0'

repositories { mavenCentral() mavenLocal() jcenter() google() }

String library = 'C:\Users\inahm\Desktop\atcollectionboutique\Libraries'

def javaFXVersion = "15.0.1" dependencies {

// implementation "org.openjfx:javafx-base:${javaFXVersion}:win" // implementation "org.openjfx:javafx-controls:${javaFXVersion}:win" // implementation "org.openjfx:javafx-graphics:${javaFXVersion}:win"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
compile 'com.jfoenix:jfoenix:9.0.10'
compile 'io.github.typhon0:AnimateFX:1.2.2'
compile files(library + '\\fontawesomefx-8.1.jar')
compile files(library + '\\AnimateFX-1.2.0.jar')
compile files(library + '\\TrayNotification.jar')
compile files(library + '\\mysql-connector-java-8.0.17.jar')
compile files(library + '\\javafxblur.jar')
compile files(library + '\\activation.jar')
compile files(library + '\\mail.jar')
compile files(library + '\\techsoftemail.jar')
compile files(library + '\\controlsfx-11.0.1.jar')

// compile files(library + '\commons-collections-3.2.1.jar') // compile files(library + '\commons-digester-2.1.jar') // compile files(library + '\commons-javaflow-20060411.jar') // compile files(library + '\commons-logging-1.1.1.jar') // compile files(library + '\core-3.3.0.jar') // compile files(library + '\core-3.3.0-javadoc.jar') // compile files(library + '\jasperreports-6.2.0.jar') // compile files(library + '\jasperreports-fonts-6.2.0.jar') // compile files(library + '\jasperreports-javaflow-6.2.0.jar')

// compile files(library + '\jakarta-regexp-1.4.jar') // compile files(library + '\javax.inject-1.jar') // compile files(library + '\jcommon-1.0.23.jar') // compile files(library + '\jfreechart-1.0.19.jar') // compile files(library + '\core-2.3.0.jar') // compile files(library + '\jasperreports-fonts-6.17.0.jar') // implementation files(library + '\itext-2.1.7.js5.jar') // compile files(library + '\JasViewer.jar') // compile files(library + '\log4j-1.2.15.jar')

implementation files(library + '\\scenicview.jar')

compile 'org.jfxtras:jmetro:11.6.14'

implementation 'org.kordamp.bootstrapfx:bootstrapfx-core:0.4.0'
implementation 'org.apache.commons:commons-text:1.4'
implementation 'eu.hansolo:Medusa:8.3'

implementation 'net.sf.jasperreports:jasperreports:6.17.0'
implementation 'win.zqxu:jrviewer-fx:0.1.1'

// implementation 'com.itextpdf:itext7-core:7.0.2' // implementation 'com.lowagie:itext:2.1.7.js2' }

test { useJUnitPlatform() }

javafx { version = "15.0.1" modules = ['javafx.controls', 'javafx.fxml', 'javafx.graphics','javafx.web', 'javafx.fxml', 'javafx.swing'] }

application { mainClass = 'com.atcollection.main.Main' } run { applicationDefaultJvmArgs += [ // "--add-opens", "javafx.graphics/javafx.css=ALL-UNNAMED", "--add-opens", "javafx.base/com.sun.javafx.runtime=ALL-UNNAMED", "--add-opens", "javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED", "--add-opens", "javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED", "--add-opens", "javafx.base/com.sun.javafx.binding=ALL-UNNAMED", "--add-opens", "javafx.base/com.sun.javafx.event=ALL-UNNAMED", "--add-opens", "javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED", "--add-opens", "javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED", "--add-exports", "javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix", "--add-exports", "javafx.controls/com.sun.javafx.scene.control=com.jfoenix", "--add-exports", "javafx.base/com.sun.javafx.binding=com.jfoenix", "--add-exports", "javafx.base/com.sun.javafx.event=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.stage=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.scene=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.scene.text=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.geom=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.util=com.jfoenix", "--add-exports", "javafx.graphics/com.sun.javafx.scene.traversal=com.jfoenix",

"--add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED",

"--add-exports", "javafx.graphics/com.sun.javafx.scene=org.controlsfx.controls", "--add-exports", "javafx.graphics/com.sun.javafx.scene.traversal=org.controlsfx.controls",

// For VersionInfo "--add-exports=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED", // For ReflectionUtils "--add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED",

"--add-exports=javafx.controls/javafx.scene.control.skin=com.jfoenix", "--add-exports=java.base/java.lang.reflect=ALL-UNNAMED", "--add-exports=java.base/java.lang.reflect=com.jfoenix", "--add-exports=javafx.controls/com.Sun.javafx.scene.control.behavior=com.jfoenix", "--add-exports=javafx.graphics/com.sun.javafx.stage=com.jfoenix", "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix",

"--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED",

"--add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED", "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" + "=ALL-UNNAMED", "--add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED", "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" + "=com.jfoenix", "--add-exports=javafx.controls/com.sun.javafx.binding=com.jfoenix", "--illegal-access=warn", "--add-opens=javafx.controls/javafx.scene.control.skin=com.jfoenix", "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", "--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior" + "=com.jfoenix", "--add-exports=javafx.controls/com.sun.javafx.scene.control=com.jfoenix", "--add-exports=javafx.base/com.sun.javafx.binding=com.jfoenix", "--add-exports=javafx.graphics/com.sun.javafx.stage=com.jfoenix", "--add-exports=javafx.base/com.sun.javafx.event=com.jfoenix",

]

}

louhy commented 2 years ago

Ugh. There has to be a better way than adding 1,000 --add-exports. That's disgusting.