• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

launching GUI through an icon

 
Greenhorn
Posts: 8
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone...

I have created a swings application in JAVA
I want this application to be launched by clicking on an icon.
Now any java program should work where ever we have the JRE and the JDK, so how can I create an icon so that when I click on the icon the GUI comes on screen in windows os?
Is creating a jar an answer to this...if yes then please explain how?if not then please tell me how it can be done...


regards
bhargo
 
Saloon Keeper
Posts: 15725
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just create an executable Jar, and create a shortcut to your Jar. You can set an image for your shortcut.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to complement what my good buddy Stephan just said, in your executable JAR file, you'll have to indicate the Main-Class in your MANIFEST.MF file (the Main-Class is the fully-qualified name of the class that has the main method, that is, the class that launches your application).

You can find more about the MANIFEST.MF file here and more about the jar command here.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic