Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate JavaFX Tutorial to Java 9 #137

Open
1 task
marcojakob opened this issue Apr 20, 2018 · 3 comments
Open
1 task

Migrate JavaFX Tutorial to Java 9 #137

marcojakob opened this issue Apr 20, 2018 · 3 comments

Comments

@marcojakob
Copy link
Owner

@marcojakob
Copy link
Owner Author

Possible Solution, posted by Andreas A.

Hi Marco, hi Nik

First of all: Thanks Marco for your absolutely amazing tutorial, wow!!

I have the following solution, so it works in Java 9 with the new modules system:
You just have to add a file named "module-info.java" in your /src-folder. It should contain the following 'requires' and the following 'opens'-statements, that's all. So, the file "module-info.java" should look like:

module CodeMakery.AdressApp {
//noinspection removal
requires java.xml.bind;
requires javafx.base;
requires javafx.fxml;
requires javafx.controls;
requires java.prefs;

opens ch.makery.address;
opens ch.makery.address.view;
opens ch.makery.address.model;
opens ch.makery.address.util;
}

I've done some more detailed explanation on my GitHub. There you can see and download the whole source code of the file including the explanations (and the whole app if you want):
https://github.com/AndiSwiss/AddressApp/blob/master/src/module-info.java

Cheers, Andreas A.

@UgmaDevelopment
Copy link

I was just thinking about this tutorial the other day; it's where I got started with JavaFX. I came here wondering about updating it to Java 11+.

Is there something that could take JAXB's place that would still allow you to store the data in some format?

@marcojakob
Copy link
Owner Author

@UgmaDevelopment I haven't been following Java lately. Maybe someone else can answer that question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants