Failure executing javac, but could not parse the error: 'javac' 不是内部或。。。。。

问题出现在maven打包过程中,执行打包命令抛出这样得异常

原因以及解决方式:jdk安装存在问题,将jdk卸载重新安装配置就好了;

查看jdk版本号:java -version

检查jdk是否安装完好得方式打开cmd;命令javac

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The error message you're encountering is from a Java development environment, likely when trying to run or compile a Java program. The "Unrecognized option: -version" indicates that there's a typo in the command used to check the Java version, specifically "-version" instead of the correct option "-version" (with a lowercase 'v'). The error "Could not create the Java Virtual Machine" suggests that the Java Development Kit (JDK) or Java Virtual Machine (JVM) is not properly installed, configured, or recognized by your system. It might be missing from your PATH environment variable, or the version you're trying to use might be incompatible with the current system. Here are some steps to troubleshoot: 1. **Check JDK installation**: Ensure that you have the JDK installed and the version is compatible with your operating system. 2. **Update PATH**: Make sure the JDK bin directory is added to your system's PATH so the JVM can be found when executing commands. 3. **Verify command syntax**: Run "java -version" (with no hyphen) instead of "java -verison" to check the Java version. 4. **Restart terminal or command prompt**: Sometimes, clearing the command history can help if there were previous failed attempts. 5. **Reinstall or update JDK**: If the problem persists, consider uninstalling and reinstalling the JDK or updating to the latest version. If you continue to face issues, please let me know which operating system you're using and any additional details about your development setup.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值