Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2448

Re: [follow] issue with j

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this>
Subject Re: [follow] issue with j
Message-ID <stevewjackson-CEBC81.13352914092007@individual.net> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <fcehhs$tmh$1@registered.motzarella.org>
References <fcehhs$tmh$1@registered.motzarella.org>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 55
Date Wed, 27 Apr 2011 15:39:09 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918749 96.60.20.240 (Wed, 27 Apr 2011 10:39:09 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:39:09 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:2448

Show key headers only | View raw


  To: comp.lang.java.gui
In article <fcehhs$tmh$1@registered.motzarella.org>,
 Pseudo Silk Kimono <Pseudo_Silk_Kimono@marillion.com> wrote:

> On 2007-09-14, Steve W. Jackson <stevewjackson@knology.net> wrote:
> > In article <fcedg0$fn3$1@registered.motzarella.org>,
> >  Pseudo Silk Kimono <Pseudo_Silk_Kimono@marillion.com> wrote:
> >
> >> I have deployed my Java GUI to our local intranet and it does start up
> >> as expected by kicking off Java Web Start.  However, when I press a
> >> button on the GUI, I expect to see a webpage, but nothing happens.
> >> The same GUI runs fine, with the expected results when I run it from the
> >> command line using java -jar.
> >> 
> >> What should I start looking at to determine why my buttons are not
> >> opening up web pages.
> >
> > Um...the code behind their action listeners?
> 
> private void JButtonActionPerformed(java.awt.event.ActionEvent evt) {         
>                                       
> // TODO add your handling code here:
>          invokeBrowser("cmd /C start http://www.google.ca/");
>     } 
> 
> 
> private void invokeBrowser(String commandString) {
>    try {
>          Runtime.getRuntime().exec(commandString);
>      } catch (IOException ex) {
>          ex.printStackTrace();
>      }
>  }

I've learned never to use the single string version of the exec() method 
since it will parse those strings and may not always produce what you 
expect.

Then there's also the fact that that code only works on Windows, and not 
necessarily reliably on older ones.

But that looks as if it should work -- except for a possibility which 
occurs.  I'm thinking that JWS may have security or access restrictions 
similar to those of an applet.  If so, it may not be allowed to execute 
that command unless there's some signing done.

= Steve =
-- 
Steve W. Jackson
Montgomery, Alabama

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[follow] issue with jws "Pseudo Silk Kimono" <pseudo.silk.kimono@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: [follow] issue with j "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
    Re: [follow] issue with j "Pseudo Silk Kimono" <pseudo.silk.kimono@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
      Re: [follow] issue with j "Steve W. Jackson" <steve.w..jackson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
      Re: [follow] issue with j "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
        Re: [follow] issue with j "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
      Re: [follow] issue with j "Thomas Fritsch" <thomas.fritsch@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
  Re: [follow] issue with j "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000

csiph-web