This site requires JavaScript, please enable it in your browser!
Greenfoot back
sandhsf
sandhsf wrote ...

2024/2/18

Why can't Greenfoot 3.8.2 export jar files?

sandhsf sandhsf

2024/2/18

#
Why can't Greenfoot 3.8.2 export jar files?
nccb nccb

2024/2/19

#
Here's the reasoning, but I'd be happy to listen to everyone's intended use for it to see what everyone wants from this feature. Running a Greenfoot scenario requires a working Java installation and all the JavaFX libraries, and the Greenfoot common classes and the scenario bits. We can bundle the latter two into a JAR, which is what we always used to do. The Java installation is not impossible if you ask your intended user to install it, as it will go on your PATH so Greenfoot doesn't need to know where it is. The problem is the JavaFX installation. We cannot easily bundle this in the JAR because it involves many libraries, some of them native libraries (DLLs, on Windows). So instead we have to rely on users installing JavaFX themselves and feeding the location in a very long command-line (as happened in recent Greenfoot). But JavaFX has no standard install path, so if you want to give it to someone on another machine you either need them to put it in exactly the same directory, or you have to edit all the entries on the command-line to match their machine. Given all this complexity, if you really want to share your scenario, it seems much easier to ask them to install Greenfoot (one item, vs Java+JavaFX) and send them the GFAR. We accidentally broke the export in Greenfoot 3.7.1 or 3.8.0 through 3.8.1 I believe, and no-one complained so we figured it was not seeing much usage and removed it rather than putting development time into fixing it, but a few people have complained since we removed it, so it seems it was considered useful. I have a feeling there may be other items to the export that are considered a benefit besides simply being able to run the scenario on another machine: is it the hiding of the Greenfoot interface, or users not being able to view/edit the source code?
You need to login to post a reply.