ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
76 stars 28 forks source link

Support compiling and running under Java 8 & 9 #21

Closed ausbin closed 6 years ago

ausbin commented 6 years ago

Use some ugly reflection hacks to get this to compile and run on both Java 8 and 9. Oracle made some annoying changes to the JavaFX API that means we have to use reflection in a lot of cases here, unless I'm missing a better approach (I am not a Java guru by any means).

Some of this is ugly as heck, so I understand if you don't want to merge, but personally I'm gonna keep using this because Java 9 actually supports HiDPI on Linux and I want to be able to see what I'm doing

ausbin commented 6 years ago

mr. roi says no reflection

ra4king commented 6 years ago

Yeah sorry, I would really prefer having no reflection at all. Without these changes, this means CircuitSim does not even run on Java 9 correct?

ausbin commented 6 years ago

It does, you just can't compile on Java 9 or edit ROMs/RAMS

ra4king commented 6 years ago

How does it run on Java 9 but not compile? And the memory view window doesn't show up at all?

ausbin commented 6 years ago

When you compile on Java 9 the compiler can't locate any of the com.sun stuff. But when you run it after having compiling on 8, it just fails locating that stuff at runtime

"that stuff" is com.sun.javafx.scene.control.skin.TableHeaderRow and om.sun.javafx.scene.control.skin.TableHeaderRow