File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes I want to add/modify to this icon that runs the jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "I want to add/modify to this icon that runs the jar" Watch "I want to add/modify to this icon that runs the jar" New topic
Author

I want to add/modify to this icon that runs the jar

Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
I build a jar of a GUI App, and when appear it in desktop, when clicked App (java se) opens, well
If I want to add/modify to this icon that runs the jar, more properties like change icon, or ... what to do?
I also have JEDIT (Java app) which ratherwise, you can change the icon by, right click icon>properties
and runs with
C:\WINDOWS\System32\javaw.exe -Xmx192M -jar "C:\Program Files\jEdit\jedit.jar" -reuseview

well?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Do you have the actual JAR file on the desktop, or a shortcut to the JAR? It would be better if you had a shortcut, then you should be able to right-click the icon, go to Properties and change the icon.

What version of Windows are you using?


JBoss In Action
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
I have the actual JAR file on the desktop using vista... to make shortcut right-click>send to desktop? and after change icon?
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
i did it ,...is any way change and java icon in task bar windows and left top in the window gui of jar run program? from java i guess, how?
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
hence this is a simple GUI EMAIL SEND FORM APP JAVA SE, When on RUN from CLI I email delivered but not delivered when RUN by clicking shortcut...
PLEASE NOTE THE ONLY LIBRARY INCLUDED IS MAIL.JAR
lib/mail.jar in the same jar folder

Manifest-Version: 1.0
Created-By: 1.6.0_15 (Sun Microsystems Inc.)
Class-Path: lib/mail.jar
Main-Class: SMTPClient

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

I think that the mail.jar is not being picked up when your run your app from the shortcut. When running a JAR file directly it should be self-contained, that it, the JAR file contains all classes necessary to run the app (well, almost, you don't have to include rt.jar). Since your app depends on mail.jar, I suggest that you create a .bat file that contains something like this:

java -classpath /path/to/mail.jar;/path/to/yourapps.jar your.main.Class

Then place a shortcut to this bat file on your desktop.

Alternately, you can use the Class-Path attribute within your JAR file to reference the mail.jar. See this:
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html#download
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
this is correct? that you refer in url?

Manifest-Version: 1.0
Created-By: 1.6.0_15 (Sun Microsystems Inc.)
Class-Path: lib/mail.jar
Main-Class: SMTPClient

app run only CLI, No:jar run / shortcut run

no errors only email not delivered... folder structure correct
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I want to add/modify to this icon that runs the jar
 
Similar Threads
Jar a project with property files in it external to jar
java.lang.Unsatisfiedlinkerror
regex for month's name
Question About Classpath and Packages
Desktop icon on NT4, Win98SE, XP, etc