Do I need to set classpath when configuring the Java environment variable?

do I need to set classpath when configuring the Java environment variable?


1. Why configure classpath? By default, when you run (with the java command) a bytecode file (.class), look for it in the current directory, and execute it if you find the running bytecode file, otherwise an error will be reported. In order to run this bytecode file in any directory, you need to configure classpath.
2. Why is it not recommended to configure classpath? When you configure classpath, you run the java command in a directory, and the computer looks for a bytecode file (.class) that matches the name in the directory you set when you configure classpath, and runs it (otherwise an error is reported). However, if you compile a bytecode file with a duplicate name in another directory, the computer will still look for the bytecode file with the same name from the directory you set when you configured classpath. At this time, you will run the bytecode file in the directory you originally set up instead of the bytecode file with the same name you compiled last.
3. Video description: ideo/av33686176/?p=21" rel=" nofollow noreferrer "> https://www.bilibili.com/vide.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4506e-4433f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4506e-4433f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?