It's good that I was a programming beginner and decided to make a GUI in Java It took 5 or 6 hours from building the environment to displaying a clean window. This is because I want to keep it as a memo so that I will not be in trouble when setting it on another OS or PC in the future.
macOS Mojave(10.14.6) JavaSE-11 Eclipse 2020
Basically, I installed and set it referring to the following site. https://codeaid.jp/eclipse-java-mac/ I wasn't sure about the workspace directory, so I created it with the default settings.
Regarding this, I referred to the following site. https://www.sejuku.net/blog/60411 (No garbled characters occurred when starting Scene Builder.)
SceneBuilder executable for mac Set /Applications/SceneBuilder.app. Select and click "Window"-> "Settings" in the article. Is Go to "Eclipse"-> "preferences".
Refer to "How to create a new JavaFX project" on the site below. https://style.potepan.com/articles/15319.html It was supposed to end here. .. ..
When I press Execute, the above error message appears and I cannot execute. When I looked it up, did recent JDKs include JavaFX? so. I will write what I tried below.
Reference page: https://teratail.com/questions/170364 I tried to carry out (2) of the best answer of this question The error did not disappear in this environment.
Reference page: https://nompor.com/2019/01/26/post-4978/ "Download OpenJFX"-"Jar file settings" for the above site I downloaded Product:JavaFX Mac OS X SDK Public version:11.0.2 LTS version:11.0.9 I didn't have the bin folder because it was a mac, but I ignored it and proceeded. (The decompression location is the same level as the workspace directory) The "import error" has now disappeared.
Next time, this error appears and it cannot be executed. As a result of investigation, I was able to solve it by referring to the following site. https://ameblo.jp/hero-design/entry-12415834565.html The Arguments tab can be configured by right-clicking the project → Run → Run. (Don't forget to change the --module-path part to suit your environment)
Now the error is finally gone When I run it, the Java icon only appears in Doc, and no window appears. .. ..
Reference page: https://nompor.com/2019/01/26/post-4978/ Mike Davis's answer to this question. When I unchecked it and pressed Execute again, the window was displayed safely.
I made a start to start making GUI safely. I hope it will be useful for those who are having trouble with the same problem.
The site that I used as a reference https://codeaid.jp/eclipse-java-mac/ https://www.sejuku.net/blog/60411 https://style.potepan.com/articles/15319.html https://teratail.com/questions/170364 https://nompor.com/2019/01/26/post-4978/ https://ameblo.jp/hero-design/entry-12415834565.html https://nompor.com/2019/01/26/post-4978/
Recommended Posts