Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > making swing application to launch from desktop

Reply
Thread Tools

making swing application to launch from desktop

 
 
gwlucas07@comcast.net
Guest
Posts: n/a
 
      10-31-2008

I been looking into ways of making a Swing application act like a
conventional program under windows. I'd like the user to launch the
thing by double clicking an icon on the desktop, see it on his start
window, etc. I'd also like it to run without opening up a console
window when it does. In other words, the user should neither care no
know that he is running a Java application rather than anything else.

As a bonus, I'd also like to be able to do the same thing under Linux
and Mac's

Anyway, I'm not having much luck with web searches (I guess I haven't
thought of the right keywords). Can anyone offer some pointers on how
to do this?

Thanks

Gary

P.S. Happy halloween
 
Reply With Quote
 
 
 
 
Mark Space
Guest
Posts: n/a
 
      10-31-2008
wrote:
> I been looking into ways of making a Swing application act like a
> conventional program under windows. I'd like the user to launch the
> thing by double clicking an icon on the desktop, see it on his start
> window, etc. I'd also like it to run without opening up a console
> window when it does. In other words, the user should neither care no
> know that he is running a Java application rather than anything else.
>
> As a bonus, I'd also like to be able to do the same thing under Linux
> and Mac's


I think you want a Java installer -- that is, something to install Java
on a variety of platforms. I don't know if Java WebStart (sp? look for
"JWS") will work this way -- I think it will. However you can also
compare what an installer will do for you too. There are a few Java
installers out there.

The double click thing, on Windows just make a shortcut. Start window
and such, your installer needs to copy the shortcut to the right folder.
Other platforms besides Windows I'm not sure about.
 
Reply With Quote
 
 
 
 
RedGrittyBrick
Guest
Posts: n/a
 
      10-31-2008

wrote:
> I been looking into ways of making a Swing application act like a
> conventional program under windows. I'd like the user to launch the
> thing by double clicking an icon on the desktop, see it on his start
> window, etc. I'd also like it to run without opening up a console
> window when it does. In other words, the user should neither care no
> know that he is running a Java application rather than anything else.
>
> As a bonus, I'd also like to be able to do the same thing under Linux
> and Mac's
>
> Anyway, I'm not having much luck with web searches (I guess I haven't
> thought of the right keywords). Can anyone offer some pointers on how
> to do this?
>


* Create a suitable jar file. Copy to user's PC.

* Make sure the PC has JRE installed in the normal way.
* On the desktop & start-menu, create a shortcut to the jar.

Doing the last two steps ought to be doable by any reasonably IT-aware
person. There are many commercial and free installers that can be used
to produce Windows executable install files that do all or some of the
above for the end user.

--
RGB
 
Reply With Quote
 
gwlucas07@comcast.net
Guest
Posts: n/a
 
      10-31-2008

Thanks. I've been trying to do something like this (with the main
class
indicated in the Manifest within the jar), but at start up either Java
or Windows creates a console window which I'd prefer not to be seen.
Is there a setting I can use to suppress this?

G.

On Oct 31, 1:36*pm, RedGrittyBrick <RedGrittyBr...@spamweary.invalid>
wrote:
> gwluca...@comcast.net wrote:
> > I been looking into ways of making a Swing application act like a
> > conventional program under windows. I'd like the user to launch the
> > thing by double clicking an icon on the desktop, see it on his start
> > window, etc. I'd also like it to run without opening up a console
> > window when it does. In other words, the user should neither care no
> > know that he is running a Java application rather than anything else.

>
> > As a bonus, I'd also like to be able to do the same thing under Linux
> > and Mac's

>
> > Anyway, I'm not having much luck with web searches (I guess I haven't
> > thought of the right keywords). *Can anyone offer some pointers on how
> > to do this?

>
> * Create a suitable jar file. Copy to user's PC.
>
> * Make sure the PC has JRE installed in the normal way.
> * On the desktop & start-menu, create a shortcut to the jar.
>
> Doing the last two steps ought to be doable by any reasonably IT-aware
> person. There are many commercial and free installers that can be used
> to produce Windows executable install files that do all or some of the
> above for the end user.
>
> --
> RGB


 
Reply With Quote
 
gwlucas07@comcast.net
Guest
Posts: n/a
 
      10-31-2008

Thanks for the Java Web Start idea. I hadn't considered it because I
wasn't really interested in "starting from the web", but just starting
from the desktop. But it sound to me like it might have broader
applicability than its name suggests. I'll take your suggestion and
look into it.

g.


On Oct 31, 1:21*pm, Mark Space <marksp...@sbcglobal.net> wrote:
> gwluca...@comcast.net wrote:
> > I been looking into ways of making a Swing application act like a
> > conventional program under windows. I'd like the user to launch the
> > thing by double clicking an icon on the desktop, see it on his start
> > window, etc. I'd also like it to run without opening up a console
> > window when it does. In other words, the user should neither care no
> > know that he is running a Java application rather than anything else.

>
> > As a bonus, I'd also like to be able to do the same thing under Linux
> > and Mac's

>
> I think you want a Java installer -- that is, something to install Java
> on a variety of platforms. *I don't know if Java WebStart (sp? look for
> "JWS") will work this way -- I think it will. *However you can also
> compare what an installer will do for you too. *There are a few Java
> installers out there.
>
> The double click thing, on Windows just make a shortcut. *Start window
> and such, your installer needs to copy the shortcut to the right folder.
> * Other platforms besides Windows I'm not sure about.


 
Reply With Quote
 
Thomas Kellerer
Guest
Posts: n/a
 
      10-31-2008
Then the JRE was not installed properly. Usually jar files should be linked to
javaw.exe (in the registry). If you are seeing a console, they are opened using
java.exe

Thomas


wrote on 31.10.2008 19:02:
> Thanks. I've been trying to do something like this (with the main
> class
> indicated in the Manifest within the jar), but at start up either Java
> or Windows creates a console window which I'd prefer not to be seen.
> Is there a setting I can use to suppress this?
>
> G.
>
> On Oct 31, 1:36 pm, RedGrittyBrick <RedGrittyBr...@spamweary.invalid>
> wrote:
>> gwluca...@comcast.net wrote:
>>> I been looking into ways of making a Swing application act like a
>>> conventional program under windows. I'd like the user to launch the
>>> thing by double clicking an icon on the desktop, see it on his start
>>> window, etc. I'd also like it to run without opening up a console
>>> window when it does. In other words, the user should neither care no
>>> know that he is running a Java application rather than anything else.
>>> As a bonus, I'd also like to be able to do the same thing under Linux
>>> and Mac's
>>> Anyway, I'm not having much luck with web searches (I guess I haven't
>>> thought of the right keywords). Can anyone offer some pointers on how
>>> to do this?

>> * Create a suitable jar file. Copy to user's PC.
>>
>> * Make sure the PC has JRE installed in the normal way.
>> * On the desktop & start-menu, create a shortcut to the jar.
>>
>> Doing the last two steps ought to be doable by any reasonably IT-aware
>> person. There are many commercial and free installers that can be used
>> to produce Windows executable install files that do all or some of the
>> above for the end user.
>>
>> --
>> RGB

>

 
Reply With Quote
 
Mark Space
Guest
Posts: n/a
 
      10-31-2008
wrote:
> Thanks for the Java Web Start idea. I hadn't considered it because I
> wasn't really interested in "starting from the web", but just starting
> from the desktop. But it sound to me like it might have broader
> applicability than its name suggests. I'll take your suggestion and
> look into it.


I use a Java app (written by someone else). It's distrubted via JWS via
a link on his website. Not only does JWS download and install his app,
and add a link on my desktop, JWS also updates the app on my hard disc
when he pushes out a new version. I haven't used JWS myself, but it
seems darn convenient.

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      10-31-2008
A: Trim-and-inline posting.
Q: What should one do instead?
A: It makes the conversation confusingly hard to read.
Q: Why is it bad?
A: Placing answers to quoted material above the material quoted.
Q: What is top-posting?

Thomas Kellerer wrote:
> Then the JRE was not installed properly. Usually jar files should be
> linked to javaw.exe (in the registry). If you are seeing a console, they
> are opened using java.exe
>
> Thomas
>
>
> wrote on 31.10.2008 19:02:
>> Thanks. I've been trying to do something like this (with the main
>> class
>> indicated in the Manifest within the jar), but at start up either Java
>> or Windows creates a console window which I'd prefer not to be seen.
>> Is there a setting I can use to suppress this?
>>
>> G.
>>
>> On Oct 31, 1:36 pm, RedGrittyBrick <RedGrittyBr...@spamweary.invalid>
>> wrote:
>>> gwluca...@comcast.net wrote:
>>>> I been looking into ways of making a Swing application act like a
>>>> conventional program under windows. I'd like the user to launch the
>>>> thing by double clicking an icon on the desktop, see it on his start
>>>> window, etc. I'd also like it to run without opening up a console
>>>> window when it does. In other words, the user should neither care no
>>>> know that he is running a Java application rather than anything else.
>>>> As a bonus, I'd also like to be able to do the same thing under Linux
>>>> and Mac's
>>>> Anyway, I'm not having much luck with web searches (I guess I haven't
>>>> thought of the right keywords). Can anyone offer some pointers on how
>>>> to do this?
>>> * Create a suitable jar file. Copy to user's PC.
>>>
>>> * Make sure the PC has JRE installed in the normal way.
>>> * On the desktop & start-menu, create a shortcut to the jar.
>>>
>>> Doing the last two steps ought to be doable by any reasonably IT-aware
>>> person. There are many commercial and free installers that can be used
>>> to produce Windows executable install files that do all or some of the
>>> above for the end user.


--
Lew
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-04-2008
On Nov 1, 4:03 am, gwluca...@comcast.net wrote:
> I been looking into ways of making a Swing application act like a
> conventional program under windows.


Java WebStart is probably the way to go.

Although JWS can install desktop shortcuts, I would
generally recommend against them, but instead offer
a menu item to start the program.

The problem with JWS based desktop shortcuts is a
serious bug that, should the user drag a file on top
of the shortcut (JWS can also add 'file associations'
for an application), the runtime will irretrievably
*delete* the dragged file. It further does not matter
if the file was ever associated with that program
(imagaine a user going to drag a Word document onto
the MSOffice start icon, but they drop it short, onto
a JWS desktop shortcut - bye, bye, Word file).

I doubt the same problem affects either the other
suggested method of creating a desktop shortcut
(right click drag the main jar to the desktop,
and choose 'shortcut' when prompted) or generic
installers such as InstallAnywhere.

--
Andrew T.
pscode.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to launch a Windows application from a ASP.Net web application JB ASP .Net 7 10-06-2010 01:33 PM
Launch a application after login page and before desktop !!! Samant.Trupti@gmail.com C++ 2 07-02-2008 03:15 PM
Swing Model Classes Updating Swing Components on a Thread Other Than AWT mkrause Java 0 05-06-2005 04:32 PM
Java 1.2 Swing vs. Java 1.5 Swing Big Daddy Java 2 04-16-2005 01:14 PM
launch java(swing) applications from c/c++ on mac os x pratik.ganguly@gmail.com Java 1 03-22-2005 05:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57