sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.29k stars 1.06k forks source link

Error: package com.jfoenix.controls.base is not visible #1137

Closed DavidShahbazyan closed 3 years ago

DavidShahbazyan commented 4 years ago

Hello, First things first: Thanks for an awesome lib!!! Today I was trying to migrate my app from java 8 to java 11, but I have faced an issue related to com.jfoenix module. My app stopped compiling because the package com.jfoenix.controls.base is not accessible. I'm using the 9.0.10 version of jfoenix lib (the latest available one at this moment) Could you please, add an exports com.jfoenix.controls.base to the module-info?

P.S. - I have found some tricks on the internet that makes my app compile. One of them is by specifying --add-exports VM argument. But I suppose it would be better if the lib didn't force me to use any workarounds.

Thanks!

Regards, David

sshahine commented 3 years ago

Hello, Well yeah I agree with you on that, but unfortunately I don't think there is a way to access JavaFX internal api without adding those exports (as far as I know), I'm open to suggestions for this issue.

DavidShahbazyan commented 3 years ago

Hi, Hope you're doing well! Thank you for your response! Sorry for such a dumb questions, I'm new to Java 11 )) I'm afraid I didn't got the whole idea of your comment. Here is what I'm trying to do:

....
import com.jfoenix.controls.base.IFXValidatableControl;
....
private List<IFXValidatableControl> NODES_TO_VALIDATE = new ArrayList<>();
....

And my IDE complains that the com.jfoenix.controls.base is not accessible. I was thinking that this is because it is not declared in module-info file. Could you point me the right way, please?

Sorry for inconvenience, and thanks!

sshahine commented 3 years ago

Oh, sorry I think I misunderstood the issue. Well yeah I agree with that, I'll add exports com.jfoenix.controls.base to module-info. Also, one thing to notice, in the case of using pickers (JFXDatePicker,JFXTimePicker,..) you still need to add some exports #889

DavidShahbazyan commented 3 years ago

Hi, Hope you're doing well! I just wanted to check if there is a new release?

Thanks, David