How do you create (and read) windows shortcut(.lnk file) in Java?

心已入冬 提交于 2019-12-17 13:06:45

问题


Same question, different langauge.

How do you do it in Java? Do you use JNI? run exe? or are there any library read/write *.lnk like POI read/write *.xls?

I used to workaround to create ".url" which is plain text INI file. But I am looking for other interesting way to do it.


回答1:


I would use a JNI interface if the goal is quality.

http://alumnus.caltech.edu/~jimmc/jshortcut/

For quick hacks, (on my workstation only) : System.Exec() a vbscript :-) (I know, i know).



来源:https://stackoverflow.com/questions/343776/how-do-you-create-and-read-windows-shortcut-lnk-file-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!