简体   繁体   English

在 Windows 桌面上创建快捷方式图标

[英]Creating a shortcut icon on the Windows desktop

How can I create a Windows shortcut alias for an existing exe file from within a Java application ?如何从 Java 应用程序中为现有 exe 文件创建 Windows 快捷方式别名?

Windows shortcuts are hoary beasts. Windows 快捷方式是苍白的野兽。 You could use JShortcut http://alumnus.caltech.edu/~jimmc/jshortcut/ , which used JNI (Java Native Interface) to create the shortcut.您可以使用 JShortcut http://alumnus.caltech.edu/~jimmc/jshortcut/ ,它使用 JNI(Java 本机接口)来创建快捷方式。 If you are just doing a quick utility you can also just use Runtime.exec() to call a VB script.如果您只是在做一个快速实用程序,您也可以只使用 Runtime.exec() 来调用 VB 脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM