• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error occurred during initialization of boot layer

 
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The codes shown below were copied from Working with JavaFX UI Components, page 352.
The codes compile without error, but it does not run.  I have spent the last few days, basically staring at the codes, unable to find anything wrong with it.  Surely, Netbeans gurus will be able to pin point what is wrong with the program.
Your contributions will be highly appreciated.

The contents of the CSS file, named ControlStyle.css are as follows:

The project structure and VM options are shown in the image inserts

Untitled2.png
[Thumbnail for Untitled2.png]
Untitled.png
[Thumbnail for Untitled.png]
Capture.PNG
[Thumbnail for Capture.PNG]
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sincere apology for the way two of the three images were inserted.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message says "Module javafx.web not found".
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The error message says "Module javafx.web not found".


Yes, but the javafx.web.jar is in the Libraries folder.  Where else does Netbeans expect to find the module?
 
Marshal
Posts: 79152
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What CLASSPATH are you using? How did you specify it?
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Classpath is shown below.
Classpath.PNG
[Thumbnail for Classpath.PNG]
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I moved on from Java 8, that module stuff was way too complicated for me to deal with, especially as I didn't need to. But it looks to me like you do need to deal with it. Just as a guess: you have nothing in the Modulepath part of that dialog and the error message is talking about a module not found. Possible solution? That's just a guess.
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The option for Compile on Save:
Compiling.PNG
[Thumbnail for Compiling.PNG]
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once more, apology for attaching the Compile on Save screenshot for a different program.  The different program has the same runtime error anyway.
Nevertheless, here is the screenshot that matches the current thread.
Compiling_Again.PNG
[Thumbnail for Compiling_Again.PNG]
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When I moved on from Java 8, that module stuff was way too complicated for me to deal with, especially as I didn't need to.


So, what did you move to?  Surely, you are still using Java.  Surely also, the issue under discussion has been on since possibly before Java 8.  
Is this problem from Java or is it from the IDE?  If this problem has been around for sometime and there seems to be no obvious solution, is it
a hopeless situation?

...you have nothing in the Modulepath part of that dialog and the error message is talking about a module not found. Possible solution?


Turns out the libraries added to the classpath are also present on the modulepath.

 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, I remember reading an article that suggested that in order to create JavaFX application using Netbeans IDE, one should first of all attempt to use Netbeans IDE to automatically setup the application.  Even though the attempt will fail, Netbeans would have already activated some features of JavaFX. Then go ahead and create the Java application that extends the JavaFX Application class.  For this reason, I decided to delete the problem program and recreated it.  It now runs without any error.  I cannot explain the situation more than this because I do not truly understand what happened behind the scene.  Perhaps, the three screenshots below will prompt someone who knows what has happened to share the knowledge with less experience people like me.
Pretending-to-create-JavaFX-app.PNG
[Thumbnail for Pretending-to-create-JavaFX-app.PNG]
Failed-Automatic-setup.png
[Thumbnail for Failed-Automatic-setup.png]
Create-the-Java-application.PNG
[Thumbnail for Create-the-Java-application.PNG]
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is this problem from Java or is it from the IDE?


I copied the source and css file.  It compiled and executed with no problems with java 8.  I do not use NB
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Biniman Idugboe wrote:So, what did you move to?  Surely, you are still using Java.  Surely also, the issue under discussion has been on since possibly before Java 8.  



I'm using Java 15 now. But I'm not using modules; the program I'm working on doesn't need to do that. Which means that I don't have any way to test modules and learn about them. So as for your issue, sorry, I can't be of any help apart from bad guesses.
 
Saloon Keeper
Posts: 15486
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stop using Ant. Ant is an obsolete build tool that causes more problems than it solves. Create all projects using Maven or Gradle. Show us your pom.xml and module-info.java files when you've created the JavaFX project.
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Create all projects using Maven or Gradle.


With Maven, I cannot create JavaFX application if my computer is not connected to the internet.  I personally find this very restricting.
I like a situation where I can work on a project with or without connection to interface. Is it the case that the version of Maven in my
computer cannot work without internet connection? Maven version 3.6.3.
 
Stephan van Hulst
Saloon Keeper
Posts: 15486
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need connection to the internet once to get all the dependencies for your project. The same is true even if you were not using Maven. You had to download JavaFX, didn't you?

After you've gotten the JavaFX dependencies, Maven will compile your application just fine even without internet.
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But it downloads and unpacks maven repository every time.  Is there no end to this?
 
Stephan van Hulst
Saloon Keeper
Posts: 15486
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can configure how often Maven updates its index in NetBeans. What does it say under Tools -> Options -> Java -> Maven -> Index?
 
Biniman Idugboe
Ranch Hand
Posts: 353
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Stephan,
Your recommendations have been really helpful to me.  However, I cannot get around to use Maven to run the most basic JavaFX application.
I sincerely apologize for coming back more than five months after the last comment on this thread.
I would just like to humbly request that you show me screen shots of how you would typically set up a JavaFX project using Maven on Netbeans.
At the moment, I use Netbeans 12.0, JDK14 and JavaFX17-ea+6.

A note to say that anybody else can oblige me with his or her experience on this matter.

Thanks
reply
    Bookmark Topic Watch Topic
  • New Topic