Shortcuts

  • Thread starter alexandre cartapanis
  • Start date
A

alexandre cartapanis

Hi,

i want to create file shortcuts using java, for
Windows/linux/unix/macosX.

Any idea?
 
S

Steve W. Jackson

alexandre cartapanis said:
Hi,

i want to create file shortcuts using java, for
Windows/linux/unix/macosX.

Any idea?

I'm sure the format of the Windows "shortcut" file is published
someplace, though I don't know it or want to.

In Unix environments, there's no such thing as a shortcut. There are
symbolic links. Java can't create them on its own, since that's an OS
specific activity, but you can construct command line commands that will
do it and invoke them via Runtime's exec() method.

Mac OS also doesn't have a "shortcut", as it's called an "alias". This
one's a bit more complex since it's actually a specific kind of record
in a file which resolves to an original and is able to survive actions
like renaming or moving the original (on the same volume). You can
probably find some code somewhere aimed at doing it. Or it's possible
that Apple's extensions to Java include some means of handling it, but I
haven't looked into the matter.

= Steve =
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top