• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating an icon to activate the application

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
don't know if this is the place to post it but:

I created an application and I 'jared' it. I created a batch file (run)
and I place the command that activate the application.

so everything works fine.

but...the way it looks (the batch file) is, simply put, ugly.

Quesiton: does anyone know how to create an icon (just like in any regular software) that double clicking it will cause the application to run?

Thanks
Peter
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well a way to do it could be create a shortcut to your *.bat file.
Then right click and bring up the properties dialog, there should be an option to change the icon of the shortcut (aslo being a shortcut, you can rename it to whatever you want).

Maybe of use.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks James; but the solution is not a 100% good.
what if the end-user suppose to do that? not everyone are computer savvy.

any other idea?
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you can script most (if not all of what I described).
Have a look at something I was playing around with, basically an ant script that invokes some WScript for creating shortcuts etc on the fly (of course this is intended for windows only) .

Again maybe of use.

(in particular look at the "package" target)


and the script for dynamically creating a shortcut and putting it in the users Start Menu
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi James,

thanks again for your help. You have shown me somthing I have never seen before. How can I run this script? say I save it in a text document, what is the extention I should name it.

thanks again.
Peter
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try and use "InstallAnywhere" from ZeroG. I used it on a previous project, and it's a good tool for bundling and distributing Java applications. I would equate it to the Windows Installer for Windows apps. However, it does cost money.
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter,

heh, I guess looking at my post again left a few unanswered questions.

1) to run the 2nd script I posted, save it into a file named test.vbs, and run it from a commandline with a parameter
eg. test.vbs temp

What this will do is create a shortcut named "CashDrawerOpener" in your Programs start menu, you can have a look at the contents on the link by right clicking it and viewing the properties (note, I wouldnt recommend trying to run the link as it was setup for my application, but it will demonstrate to you how to dynamically create a link.

2) This does lead into a next question which is are you assuming your user has a JVM already installed or not?
If not then go for Richard's suggestion about using InstallAnywhere, which you'll be able to produce a wizard like install for your app, and be able to bundle a JVM with it.

Good luck,
James.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I examined both solutions.

1. Richard , ZeroG looks like a good solution but it's expensive.
2. James, your solution looks intresting and I think I should learn more about it (it worked and created the shortcut - although I had to use the command line). Do you know any good tutorial for that?

"This does lead into a next question which is are you assuming your user has a JVM already installed or not?"

Yes, Installed.

another question: is this ANT or VB script?

thank you both
peter
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another possibility is to create an executable JAR file. See this thread for more information. I'm not sure how you can make the JAR file show a custom icon, though. Does anyone else know if there is an option you can add to the JAR's manifest file to do this?

Layne
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,
the first part of my post was ant (it basically kicked off the VBScript as it part of its processing and passed it a parameter).

You can read up more up Windows scripting here:
microsoft script technologies
[ July 20, 2005: Message edited by: James Swan ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic