#Javafx.web not found

39 messages · Page 1 of 1 (latest)

neon wedge
#

I'm trying to make a basic interface using javafx, but the fxml won't run due to a module not being found. I have the variable set up properly and can confirm that the module that it says isn't there is, in fact, there. I have two other projects that are using the exact same libraries that have the exact same variables paths and will work, but this one won't.

JavaFX20 is set up as the classpath in the project. I'm using netbeans and JDK 19.

trim nestBOT
#

This post has been reserved for your question.

Hey @neon wedge! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

fierce totem
#

Can you show your dependencies?

neon wedge
#

Sorry if this is a stupid question, but do you mean the libraries I import for this script? I'm still getting familiar with terms in this context

fierce totem
#

Do you have a pom.xml or build.gradle?

neon wedge
#

I have a build.xml

fierce totem
#

Can you show it?

#

Which IDE are you using?

neon wedge
#

I'm using netbeans. I'm not sure what you want me to show you, I'm pretty sure I'm not understanding, but this is what I'm talking about

fierce totem
#

Can you show the build.xml?

#

Are there any library settings?

neon wedge
#

When I select the library settings for this project, I have javafx20 as the classpath. I don't understand what you mean by show the build.xml. Do you want me to open it and send a screenshot of its contents?

fierce totem
#

How did you put JavaFX on your classpath?

#

Do you have a module-info.java?

neon wedge
#

I added javafx20 to the classpath then added the variable path to the vm options in the run settings

fierce totem
#

how?

neon wedge
#

I right clicked the project, went to properties/libraries, added javafx to the classpath, then went to run options and added the path the the /lib directory of javafx

fierce totem
#

Can you show both the classpath and the content of the lib directory?

neon wedge
fierce totem
#

in the project properties, try moving JavaFX from the classpath to the modulepath

neon wedge
#

This gave me a new error. All of my classes are flagged with this setting

fierce totem
#

is there some error view?

#

somewhere?

#

is there an error somewhere when viewing the code?

neon wedge
#

It's on the imports where I import from javafx

fierce totem
#

can you show it?

neon wedge
fierce totem
#

what do the errors state?

#

Do you have a module-info.java?

neon wedge
#

package javafx.fxml is not visible. I don't know if I have module-info.java. I don't remember installing it, so I would assume not unless it's a default setting. How would I check?

fierce totem
#

is a module-info.java file inside the src folder?

neon wedge
#

It would appear there is not one for this project

fierce totem
#

create it

#

something like

module yourapp{
    requires javafx.graphics;
    requires javafx.fxml;
    requires javafx.controls;
    requires javafx.web;
}
neon wedge
#

Should I create this through netbeans or write into a notepad and save as a java file? Then, should the file be in the src directory, or within a folder in src?

#

The issue is persisting in spite of creating this file

#

just forget it