当前位置:网站首页>设置双击运行 jar 文件
设置双击运行 jar 文件
2022-06-29 17:26:00 【华为云】
windows 下设置双击运行 jar 文件
大家都知道,项目打包的 jar 文件应该是可以直接运行的,虽然我们也可以用指令
java -jar xxx.jar运行,但是总归是麻烦些,要是能双击直接打开岂不是很方便,下面我们就来一起看看怎么操作吧
首先确保本地 java 的开发环境配置成功,cmd 执行指令
java -version正确显示版本号则配置无误,未配置过的朋友请参考这里

接下来我们找到一个可以执行的 jar 包,右键选择 打开方式 为 jdk 安装目录下的 java\jdk1.8.0_221\bin\javaw.exe,并勾选 始终用此程序打开

Win + R 组合键输入 regedit 打开注册表编辑器找到HKEY_CLASSES_ROOT\Applications\javaw.exe\shell\open\command

右键修改值,路径后添加 -jar "%1" %* 注意 - 前方有一个空格

修改后返回 jar 包的位置,发现已经改变了,双击即可运行

有时候可能被电脑里的解压程序默认关联了文件格式,这时候如果未生效的话需要到相关软件中取消文件格式关联
边栏推荐
- Understanding adapter mode from home office | community essay solicitation
- Viewing splitchunks code segmentation from MPX resource construction optimization
- 0基础自学STM32(野火)——寄存器点亮LED
- mysql如何查询表的字符集编码
- R language uses GLM function to build Poisson logarithm linear regression model, processes three-dimensional contingency table data to build saturation model, uses exp function and coef function to ob
- First batch! Tencent cloud's ability to pass the solution of the government affairs collaboration platform of the China Academy of ICT
- Development of freedom free agreement pledge mining system
- R语言使用epiDisplay包的kap函数(kap.2.raters函数)计算Kappa统计量的值(总一致性、期望一致性)、对两个评分对象的结果进行一致性分析、评分的类别为多个类别
- Collaborative development of epidemic home outsourcing project 𞓜 community essay solicitation
- 固定资产管理系统让企业动态掌握资产情况
猜你喜欢

0基础自学STM32(野火)——使用寄存器点亮LED——GPIO功能框图讲解

How to create and delete MySQL triggers

深圳内推 | 深圳计算科学研究院招聘机器学习助理工程师(校招)

从Mpx资源构建优化看splitChunks代码分割

Naacl 2022 | distillation of machinetranslation SOTA model

“授权同意”落地压力大?隐私计算提供一种可能的合规“技术解”

How MySQL queries character set codes of tables

Collaborative development of epidemic home outsourcing project 𞓜 community essay solicitation

LeetCode 每日一题——535. TinyURL 的加密与解密

ICML 2022 | transferable imitation learning method based on decoupling gradient optimization
随机推荐
从居家办公中感悟适配器模式 | 社区征文
2022 software evaluator examination outline
regular expression
C language practice ---- pointer string and linked list
SAAS 服务的优势都有哪些
mysql支持外键吗
Online sql to CSV tool
L'intercepteur handlerinterceptor personnalisé permet l'authentification de l'utilisateur
Pancakeswap Technology: development principle of gripper robot system
ICML 2022 | transferable imitation learning method based on decoupling gradient optimization
【Oracle】基础知识面试题
OpenFeign使用步骤 轮询策略与权重 log4j使用 openFeign拦截器的配置
力扣今日题-535. TinyURL 的加密与解密
自定义HandlerInterceptor拦截器实现用户鉴权
基于深度学习的Wiki中文语料词word2vec向量模型
About harbor private warehouse forgetting the login password
Word2vec vector model of Wiki Chinese corpus based on deep learning
Subgraphs in slam
R语言dplyr包filter函数通过组合逻辑(与逻辑)过滤dataframe数据中的数据、其中一个字段的内容等于指定向量中的其中一个,并且另外一个字段值大于某一阈值
Function calculation asynchronous task capability introduction - task trigger de duplication