Ridzuan Adris
Ridzuan Adris

Reputation: 1272

How to Create Desktop Shortcut with requestShortcut()?

Can someone explain/show me how to use requestShortcut method in this document, I want to make my jar a desktop shortcut while program was running.

Below is my Java code

private static Component frame;

  public static void main(String[] args){

  JOptionPane.showMessageDialog(
                null, "Hello World", "Hello World",
                JOptionPane.INFORMATION_MESSAGE);

   //I want to create shortcut code here

  requestShortcut(true, false, ""); // return cannot find symbol
                                    // this method should create desktop
                                    // shortcut if i understand it right.
}

How do we actually implement this requestShortcut() method?

P/s : The purpose I want to create shortcut because I will move the shortcut to path all program/startup.

Upvotes: 1

Views: 93

Answers (1)

Ridzuan Adris
Ridzuan Adris

Reputation: 1272

I think requestShortcut() cannot be used by java application

Upvotes: 1

Related Questions