making swing application to launch from desktop

Discussion in 'Java' started by gwlucas07@comcast.net, Oct 31, 2008.

  1. Guest

    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
    , Oct 31, 2008
    #1
    1. Advertising

  2. Mark Space Guest

    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.
    Mark Space, Oct 31, 2008
    #2
    1. Advertising

  3. 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
    RedGrittyBrick, Oct 31, 2008
    #3
  4. Guest

    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 <>
    wrote:
    > 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
    , Oct 31, 2008
    #4
  5. Guest

    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 <> wrote:
    > 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.
    , Oct 31, 2008
    #5
  6. 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 <>
    > wrote:
    >> 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

    >
    Thomas Kellerer, Oct 31, 2008
    #6
  7. Mark Space Guest

    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.
    Mark Space, Oct 31, 2008
    #7
  8. Lew Guest

    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 <>
    >> wrote:
    >>> 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
    Lew, Oct 31, 2008
    #8
  9. On Nov 1, 4:03 am, 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
    Andrew Thompson, Nov 4, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jony Joe
    Replies:
    0
    Views:
    640
    Jony Joe
    Feb 16, 2004
  2. TC
    Replies:
    4
    Views:
    644
    JohnnyAppleseed
    Feb 7, 2005
  3. Timo Kinnunen
    Replies:
    3
    Views:
    873
    Tim Tyler
    Aug 3, 2003
  4. Darryl L. Pierce
    Replies:
    13
    Views:
    6,122
    Darryl L. Pierce
    Aug 7, 2003
  5. Replies:
    2
    Views:
    496
    Jerry Coffin
    Jul 2, 2008
Loading...

Share This Page