There's a book called "Java How to Program Early Objects" and a section describes compiling some .java files importing some JavaFX code. The book lists the following command to do it
javac *.java
This leads to a bunch of package javafx.xxx does not exist errors because it can't find the JavaFX libraries. Now I can use the -cp switch and it works:
javac -cp "D:\Program Files\Java\JavaFX14.0.2.1\lib\*"; *.java
However I was wondering if on a Windows 10 system I could set an environment variable so the command looks identical to the one in the book. Haven't been able to find anything. TIA
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.