The Artima Developer Community
Sponsored Link

Java Answers Forum
need desktop icon

4 replies on 1 page. Most recent reply: Jan 22, 2005 8:08 PM by Sanjay Perera

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Gibran Shah

Posts: 27
Nickname: gibby
Registered: Jun, 2004

need desktop icon Posted: Dec 13, 2004 2:17 PM
Reply to this message Reply
Advertisement
I've got a Java program that, so far, I've been starting via a text console. There must be a way to create a desktop icon which I can double click to start my program instead. How do I go about doing this?


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: need desktop icon Posted: Dec 14, 2004 1:12 AM
Reply to this message Reply
I don't exactly understand the question.

Using Windows, just create a link.
Waht's the problem?

If you create it this way, you won't see the console:
"start javaw -cp . [parameters]"



If you want a .exe file instead, you'll have to use a tool like exe4j

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: need desktop icon Posted: Dec 14, 2004 3:06 PM
Reply to this message Reply
I think you'll want to omit the "start" or you will see the console (if only briefly).

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: need desktop icon Posted: Dec 14, 2004 11:25 PM
Reply to this message Reply
Right, I made an error there.

1. I'm using a batchfile called runSilent.cmd
@start javaw -cp .\ MyClass

2. I'm calling it using this link:
"c:\programpath\runSilent.cmd" nowindow

Sanjay Perera

Posts: 42
Nickname: angel6
Registered: Apr, 2004

Re: need desktop icon Posted: Jan 22, 2005 8:08 PM
Reply to this message Reply
In Windows what I did was created a batch file (*.bat0 then entered the command in the bat file E.g Java myApp and if you want to hide the command prompt just go to properties of the bat file and say hide when starting. For the bat file an icon can be give too.

Flat View: This topic has 4 replies on 1 page
Topic: Garbage collector Previous Topic   Next Topic Topic: JDBC connection trouble

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use