Fork me on GitHub
#clojure-dev
<
2019-06-17
>
plexus14:06:01

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

ghadi14:06:28

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

ghadi14:06:41

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

ghadi14:06:07

to call something you need 1) a public class

ghadi14:06:57

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

ghadi14:06:04

you have 1 but not 2, I suspect

plexus14:06:31

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

ghadi14:06:38

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

ghadi14:06:51

not the concrete class

plexus14:06:02

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

plexus14:06:46

I take that back, you are absolutely right.

plexus14:06:17

thanks a lot!

ghadi14:06:44

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