This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes create shortcut to application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "create shortcut to application " Watch "create shortcut to application " New topic

create shortcut to application

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
i want to create a shortcut in the desktop to open an application.

the command way is like this:

there is a way create shortcut with some command but i dont know how..

any one knows ? please...

From NickyEng
Diploma in Computer Studies
SCJP 1.4
Formula 1 app by Maxis (Playbook)
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38075
I thought you were supposed to do that by creating a .jar file with the location of the main method quoted in the manifest file. In the bit about "deployment" in the Java Tutorial, look for the bit about setting an entry point.

Not that I have ever got it to work. I tend to take the easy way out (Eclipse).
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if you just want a shortcut to run the Application.class file from the desktop:

R/Click Desktop
Select New -> Shortcut
Command Line =
C:\WINDOWS\javaw.exe -classpath "C:\" Application
Select name Application (?)

shortcut now on desktop
single (or double) click the shortcut

if it doesn't work (sometimes working off C:\ is funny)
r/click the shortcut
C:\WINDOWS\javaw.exe -classpath "C:\" Application to
C:\WINDOWS\javaw.exe -classpath "C:\ " Application

extra 'space' after C:\
It is sorta covered in the JavaRanch Style Guide.
subject: create shortcut to application
Similar Threads
help in runnin sample code version 2 in mehran habibis book
using command prompt
RCP shortcut keys! Pls HELP!
Activating applet shortcut key in JSP page
Aceessing Target path of a windows shortcut