windows configure java envrionment variable
Windows configuration:
1.configure path environment variable
use administrator role,open cmd
2.set path variable
C:\Windows\system32>setx /m PATH "%PATH%;C:\code\mysql-connector-java-5.1.39-bin.jar"
3.check path variable
C:\Windows\system32>echo %PATH%
or
C:\Windows\system32>path
4.path and classpath compare
path:windows look for executable file(.exe, .bat)
class:jvm look for executebale file(.class)
for java,jvm is only one os. for jvm, class file is the executable file.
to tell jvm ,where to look for executbale file ,you need define classpath argument.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步