dear all, i want to create an installation wizard for the appication that i have developed.my basic idea is to create a batch file to run my application and put in in a paricular location and a shortcut for the batch file and place it in desk top ,but i dont have an idea to create a shortcut for the batch file in run time using java code.could any body help me out in solving this problem. thanks in advance Shiva
On windows, I simply make a .bat file which runs the command line to run my java app, i.e. java -classpath "..." -D<somekey/value> MyProgram I have my installer include this file during installation. It gets trickier if the JRE, classpath, and/or program can have a variable location. You need to use some combination of calls to the system, DOS commands (or cygwin commands if possible), and possible even MFC to figure out what to do. I would not try to do a shorcut in Java. --Mark
Mark Herschberg, author of The Career Toolkit
For this, you may want to open up a sample shortcut file in something like Notepad. It may be in plaintext and not some binary format, so you may be able to get away with creating the file using just the java.io.FileWriter. Let me know if it works.
when i tried to open shortcut file in notepad or other utilities it only internally opens the original file for which shortcut is created.so i tried opening in dos prompt using 'type' command it showed the following: L ☺�☻ └ F� P⌂;B╣╗☺ D♥☻n■└☺ ╡ how could we solve this.help me out
Oops, looks like shortcuts are binary encoded. Oh well, worth a try! Looks like you might have to invoke some JNI to get this to work if there is a command to create a shortcut. Would probably be your best bet now.
Originally posted by Shiva Kumar: when i tried to open shortcut file in notepad or other utilities it only internally opens the original file for which shortcut is created.so i tried opening in dos prompt using 'type' command it showed the following: L ☺�☻ └ F� P⌂;B╣╗☺ D♥☻n■└☺ ╡ how could we solve this.help me out
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop