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


Groups > comp.lang.java.programmer > #28385

Re: JavaFX beginner issue

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx07.iad.POSTED!not-for-mail
From Wayne <nospam@all.invalid>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: JavaFX beginner issue
References <lk70ap$cv0$1@dont-email.me> <lHF9v.138374$1j7.5697@fx01.iad> <lk8aom$g3i$1@dont-email.me>
In-Reply-To <lk8aom$g3i$1@dont-email.me>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
Lines 81
Message-ID <HRY9v.5$pP1.4@fx07.iad> (permalink)
X-Complaints-To abuse@newshosting.com
NNTP-Posting-Date Tue, 06 May 2014 03:41:27 UTC
Organization Newshosting.com - Highest quality at a great price! www.newshosting.com
Date Mon, 05 May 2014 23:41:33 -0400
X-Received-Bytes 4483
X-Received-Body-CRC 982616813
Xref csiph.com comp.lang.java.programmer:28385

Show key headers only | View raw


On 5/5/2014 11:29 AM, Rhino wrote:
> On 2014-05-05 1:53 AM, Wayne wrote:
>>> Application Blocked by Security Settings
>>>
>>> Name: fxswingtest01.FxSwingTest01
>>> Location: file://
>>> Your security settings have blocked a self-signed application from running
>>> =======================================================================
>>>
>>> What do I need to do to resolve this situation? I assume I need to give Java
>>> permission to run this application but I'm not sure how or where to do it and the
>>> tutorial I'm using didn't think to include this information....
>>>
>>
>> You can set the security level to its lowest setting of "medium"
>> in the Java control panel.  Or, also from the control panel,
>> you can white-list various locations such as "http://localhost/",
>> "https://localhost/", and "file:///".  (You will get warning when
>> adding http or file protocol URLs, but you can ignore those for
>> localhost.)
>>
>> Or you can obtain a signing certificate and sign your code.
>>
> 
> Thanks Wayne, I think we're heading in the right direction but I need some more
> detail....
> 
> I've tried adding all of these entries to the white-list in the Security tab of the
> Java Control Panel:
> 
> http://localhost/
> https://localhost/
> http://127.0.0.1/
> https:/127.0.0.1/
> file:///C:/Users/rhino_000/Documents/NetBeans/HelloWorld/dist/HelloWorld.html
> file:///C:/Users/rhino_000/Documents/NetBeans/HelloWorld/dist/HelloWorld.jnlp
> 

Those last two URLs are illegal, so I doubt they'd help.

> I'm running Windows 8.1. When I double-click on the HelloWorld.jar in File Explorer
> here on the laptop, the application launches just fine. When I right-click on the
> HTML file and open it in Firefox, the Test Page for HelloWorld shows a "loading"
> animation that just keeps spinning and spinning and spinning but never gets done.
> 
> When I right-click on the JNLP file in File Explorer, I get the Web Start "Java ..."
> splash screen, then I'm back to the error message I reported in my initial post in
> this thread.
> 
> Hmm. I just added the following to the white-list:
> 
> file://

Try it with three slashes.  Hierarchical URI protocols always end in "://"
(while non-hierarchical ones end in ":").  So that URI doesn't specify
any particular host/codebase.  A third slash conventionally means localhost.

> 
> Now, when I right-click on the JNLP file and choose Open With Java Web Start
> Launcher, it actually launches without the error message! However, right-clicking on
> the HTML file and opening it in Firefox works no better than it did before.

Web browsers often have difficulty with that.  It has something to do with
a confusion by the web browser if the resource is local or remote.  Different
internal URIs are used.  I just run a local webserver, put my files in that,
and use http://localhost/ to test 'em out.  This avoids using file:// protocols.

You can see if that's the problem by (temporarily) setting the security
level to medium, and see if the problem goes away.  If so, you just need to
get the URIs in the white list correct.

Note, Java DOES NOT (yet) support IPv6 for specifying security parameters such
as this white-list.  (I've asked.)  Since all hosts default to IPv6 first, then
fall back on IPv4, you may see your browser using "localhost", but Java won't
notice that if IPv6 to localhost is tried (by the browser).  In that case
the IP address used to launch your Java app is "::1", not "localhost" or
"127.0.0.1", and that will fail.  You can try to always use the
"127.0.0.1 value in your URIs, that may also solve your issue.

-- 
Wayne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JavaFX beginner issue Rhino <no_offline_contact_please@example.com> - 2014-05-04 23:25 -0400
  Re: JavaFX beginner issue Wayne <nospam@all.invalid> - 2014-05-05 01:53 -0400
    Re: JavaFX beginner issue Rhino <no_offline_contact_please@example.com> - 2014-05-05 11:29 -0400
      Re: JavaFX beginner issue Jeff Higgins <jeff@invalid.invalid> - 2014-05-05 12:13 -0400
      Re: JavaFX beginner issue Wayne <nospam@all.invalid> - 2014-05-05 23:41 -0400
        Re: JavaFX beginner issue Rhino <no_offline_contact_please@example.com> - 2014-05-06 17:02 -0400

csiph-web