Quantcast
Channel: 質問!ITmedia 新着質問(Java/253)
Viewing all articles
Browse latest Browse all 2439

Files.createLinkがうまく動かな

$
0
0
Files.createLinkを使用するうえで、何か事前にOSとかで設定必要でしょうか? うまくリンク(ショートカット)が作成されず困っています。 c:\\test\\test.txtは存在する。 c:\\test\\test.lnkは存在しない。 public static void main(String[] args) throws IOException { Path path = Paths.get("c:\\test\\test.txt"); Path path2 = Paths.get("c:\\test\\test.lnk"); Files.createLink(path2, path); } 現象: 上記コードを実行すると、c:\\test\\test.lnkのファイル自体は作成されるものの、エクスプローラで、c:\\test\\test.lnkをダブルクリックしても、c:\\test\\test.txtの内容を表示せずに、なにもおこらない。ショートカットのプロパティを見ると以下のようになっています。 ファイルの種類:ショートカット (.lnk) サイズ:3バイト ディスク上のサイズ:0バイト 環境は OS:Windows8.1 ウィルスソフト:マカフィーセキュリティセンター 13.6

Viewing all articles
Browse latest Browse all 2439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>