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

Fix package names of FXML resources and controllers #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jgneff
Copy link

@jgneff jgneff commented Oct 20, 2019

Fix two errors in package names:

  1. java.lang.IllegalStateException: Location is not set.

The application loads the FXML resources relative to its own package
org.openjfx.hellofx, but the resources are not found because they are in
a different package, org.openjfx. The fix is either to get the resources
using their absolute names, such as "/org/openjfx/primary.fxml", or to
change their package name to org.openjfx.hellofx. This fix changes the
package name.

  1. java.lang.module.InvalidModuleDescriptorException:
    Package org.openjfx not found in module

The FXML classes use reflection to load the controllers in
org.openjfx.hellofx, but only the package org.openjfx, which contains no
code, is open to it. Fix the module descriptor to open the correct
package name of org.openjfx.hellofx.

Fixes #39

Fix two errors in package names:

1. java.lang.IllegalStateException: Location is not set.

The application loads the FXML resources relative to its own package
org.openjfx.hellofx, but the resources are not found because they are in
a different package, org.openjfx. The fix is either to get the resources
using their absolute names, such as "/org/openjfx/primary.fxml", or to
change their package name to org.openjfx.hellofx. This fix changes the
package name.

2. java.lang.module.InvalidModuleDescriptorException:
     Package org.openjfx not found in module

The FXML classes use reflection to load the controllers in
org.openjfx.hellofx, but only the package org.openjfx, which contains no
code, is open to it. Fix the module descriptor to open the correct
package name of org.openjfx.hellofx.

Fixes openjfx#39
@jgneff jgneff changed the title Fix package names of FXML resources and open code Fix package names of FXML resources and controllers Nov 14, 2019
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

Successfully merging this pull request may close these issues.

IllegalStateException running NetBeans Modular Maven project
1 participant