Closed arcostasi closed 4 years ago
I'm not Roi, but I have to agree he's elegant. In fact, experiencing his elegance in person the first time was so intense that it felt like I had sprinted full-speed into a brick wall of Egyptian magnificence
I am sorry about the current build process being difficult, not my finest work (#26).
How does this strategy compare to #63? In particular, I'm curious if #63 works on Windows since I haven't tried it. But I think I like your strategy here better because it doesn't seem to depend on third-party gradle libraries or jlink
Hello Austin,
I added the Badass J Link Plugin in current gradle.build, following the strategy #63 and the follow message was displayed:
FAILURE: Build failed with an exception.
What went wrong: Could not determine java version from '14.0.2'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
gradlew jlink --debug
10:54:36.212 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: C:\Android.gradle\native 10:54:36.237 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 10:54:36.238 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 10:54:36.238 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 10:54:36.238 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 10:54:36.239 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not determine java version from '14.0.2'.
I believe that I need to make some more modifications to work with this plugin.
Anyway, thank you for your attention!
Wow! Hello Anderson and thank you for the praise, it means a lot! Figuring out the new Java module system and Gradle has proven to be too much during my busy work schedule so I'm eternally glad you looked into it here!
I spent some time to set this up and get IntelliJ to run the binary. I had to make 1 more change: the main class cannot extend Application otherwise the --module-path
param is required and I couldn't get Gradle or IntelliJ to include it automatically. I created CircuitSimRunner that just launches the CircuitSim application. Everything now works, both in IntelliJ and command-line!
Thank you again for the praise Anderson and you too Austin. I will adopt this and reject #63 (sorry Austin!).
Check out commit 4e0a9d0dfa60e470e3dc3272ee3fb4ed135f05c1 !
I found your project last week searching on GitHub for new simulation tools and yours caught my attention for the elegance of the designer and the programming. I would like to congratulate you for the excellent tool you have developed, I believe it was not easy and I hope you continue to be excited about your CircuitSim project.
I spent the weekend updating and analyzing your project to run on the latest version of OpenJDK and OpenJFX
During the update, I had some difficulties with the building scripts because I'm using Windows and also because I don't have much experience with Java and Gradle.
I had to create a new
gradle.build
to be able to build with OpenJDK 14 and JavaFX 14, follow the script:Another configuration file created was
module-info.java
insrc/main/java
:I changed your folder structure
src/com/ra4king/circuitsim
tosrc/main/java/com/ra4king/circuitsim
,src\resources
images tosrc/main/resources/images
andsrc/resources
fonts tosrc/main/resources/fonts
, I changed the path in your coderesources/*.png
code forimages/*.png
and fontsresources/*.png
tofonts/*.ttf
, with these changes I was able to build in my environment Windows 10 64 bits with OpenJDK 14.0.2 and JavaFX 14After the build, only a 2 warnings was displayed:
As I don't have much experience with Java, I went to research the warning and they said it was nothing and I could use a @SuppressWarnings("unchecked") in the calling method. i added on top of the method:
void createAndShowMemoryWindow(...
in the fileProperties.java
and no more warnings were presented.to build jar:
Follow my script
run.bat
of how I'm doing to run the jar and JavaFX dependencies:My enviroment
%PATH_TO_FX%
isC:\Program Files\Java\javafx-sdk-14.0.2.1
and was added in the Windows variable environment.Considerations about my steps are welcome so that we can continue to improve this amazing project and I hope that I can studying your project to be able to contribute in the future.
Congratulations again Roi Atalla @ra4king and all the best! ;)