clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
plexus 2019-06-17T14:40:01.205700Z

Is there anyone here knowledgeable in clojure.lang.Reflector who can weigh in here? we're a little stumped... https://clojureverse.org/t/weird-java-interop-issues/4395/12?u=plexus

ghadi 2019-06-17T14:41:28.206100Z

com.sun.media.sound.PortMixer is not a public class @plexus

ghadi 2019-06-17T14:41:41.206500Z

there are two levels of "public"-ness in Java 9+

ghadi 2019-06-17T14:42:07.207100Z

to call something you need 1) a public class

ghadi 2019-06-17T14:42:57.208100Z

2) if that class comes from a Java module (I think this one does) the module needs to mark the package as exported

ghadi 2019-06-17T14:43:04.208400Z

you have 1 but not 2, I suspect

plexus 2019-06-17T14:43:31.209Z

but this only relates to calls through reflection? You can still call it when properly type hinted?

ghadi 2019-06-17T14:43:38.209300Z

there is likely a public interface that you should be typehinting to

ghadi 2019-06-17T14:43:51.209500Z

not the concrete class

plexus 2019-06-17T14:44:02.209800Z

<del>it works when type hinting to the concrete class though</del>

plexus 2019-06-17T14:44:46.210400Z

I take that back, you are absolutely right.

plexus 2019-06-17T14:46:17.210600Z

thanks a lot!

ghadi 2019-06-17T14:46:44.211300Z

np, if you see com.sun it's almost always an impl of a public interface