I found this post http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABCACBD
Can you tell me how I can use this tool to convert css files into bss files? From the information on the web site it's not very clear how I can use it for JavaFX application.
Any help will be highly appreciated.
On Windows, I like to do this through a batch file (note that you need to have JAVA_HOME system variable defined). You can create a new .bat file, copy the code below and save it. You can then run this batch file from the same folder where your .css files are stored:
Basically jewelsea perfectly explained the solution, just note that it will work only if your css file has some content in it. For example, it will not work on empty application.css which gets created by e(fx)clipse, so you can simply put something like .dummy-class {-fx-background-color: red;} inside and then convert it.
Let's imagine your jdk 8 home bin directory is on your shell path.
Create Love.java:
Compile it:
Create love.css:
Compile it:
This will create
love.bss
Now you can delete
love.css
as you don't need it anymore as you have made binary love.Now run your app:
Even though you requested
love.css
, the JavaFX runtime was smart enough to recognize that you have a binarylove.bss
and use that to apply css styles to your app.