0

I use the following import in my code:

import sun.awt.windows.WComponentPeer;

On Windows this class is located in rt.jar so I can build the whole app. On Mac there is no such class so I can't.

How to change the project to support cross-platform building? I use Gradle, maybe a dependency is needed?

SerVB
  • 129
  • 17
  • Don't import that. It'll only be available on Windows since it contains native Windows functionality. – Kayaman Jul 06 '18 at 09:57
  • @Kayaman , without `import` I can't use it :( – SerVB Jul 06 '18 at 10:06
  • And you shouldn't be using it, because it's not a cross platform class and it's not even meant for developers since it's a `sun.*` class. Either stop using it or forget running your code on anything but Windows. – Kayaman Jul 06 '18 at 10:07

0 Answers0