As Jose Pereda stated, bss is version 5 in Java 8. Based on the JavaFX 8 CSS Reference Guide for the shortcut, the syntax is correct. However, this is for Java 8, while you are currently using Java 7. If you have Java 8, configure eclipse and set the build path to use it and set the PATH variable corresponding to Java 8.
If the problem persists:
If it does not work even after the update, we will try to compile it a little differently to find out what will happen. According to this post , you do not need a .css file after compiling a .bss file.
Create a Test folder somewhere easily accessible. We will use this to see how files compiled separately will affect the exception, as the Java update did nothing at this point.
First, try to run the program with the necessary files. If your Main.java file Main.java not rely on other java files in your project, copy this file to the Test folder that we recently created. If not, copy only the necessary parts that use css (for example, the scene and label that calls the css file ) and paste this into the new Main.java in the new Test folder.
Continuing forward, you need to open the command window in the test folder. You can do this by pressing SHIFT + RIGHT CLICK in the Test folder in Windows Explorer and clicking Open command window here
After that, compile Main.java by entering it in the command window that opens:
javac Main.java
Then copy appication.css , but rename it to Main.css for testing purposes. Then run this on the command line window (you did not have the -outfile argument, it does not matter, but this is a small security measure):
javafxpackager -createbss -srcfiles Main.css -outdir . -outfile Main
You should now see that you have Main.css . Now, with the same command window, you can easily launch the file and see what happens.
java Main
Please leave a comment if this help is for you and what part of this answer you really used to fix the problem, if this answer really helped you, thanks!