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


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

Re: Applet not running on the web

From emf <emfril@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Applet not running on the web
Date 2013-01-10 07:19 -0500
Organization Aioe.org NNTP Server
Message-ID <kcmbak$f3c$1@speranza.aioe.org> (permalink)
References <kcd5kg$elb$1@speranza.aioe.org> <50ea1db2$0$284$14726298@news.sunsite.dk> <kcj34i$ido$1@speranza.aioe.org> <50ee1ea8$0$292$14726298@news.sunsite.dk>

Show all headers | View raw


On 2013-01-09 20:51 Arne Vajhøj wrote:
> On 1/9/2013 1:40 AM, emf wrote:
>> On 2013-01-06 19:58 Arne Vajhøj wrote:
>>> Ooops.
>>>
>>> #FileReader ephemeris = new FileReader("transits/ephemeris.csv");
>>>
>>> applets run client side!
>>>
>>> The user do not have a transits/ephemeris.csv file and the
>>> applet would not have priv to access it anyway.
>>>
>>> Stuff your class files *and* the CSV file in a jar
>>> file and let the Java code retrieve the CSV as a resource!
>>
>> Unfortunately the suggested solutions does not work.
>
> It works. It has been used thousands of times before.
>
>>                                                      I have both
>> versions on the server:
>>
>> https://files.nyu.edu/emf202/public/jv/NatalTransitsA.html
>>
>> uses the jar archive, while
>>
>> https://files.nyu.edu/emf202/public/jv/NatalTransits.html
>>
>> uses the transits folder.
>>
>> Both work fine in my browser when running from the local files, but when
>> running through the Internet they both give a
>> java.security.AccessControlException, after using
>>
>> catch (e Exception)
>>
>> The code is here
>>
>> https://files.nyu.edu/emf202/public/jv/NatalTransitsApplet.java
>
> You are still using:
>
> #FileReader ephemeris = new FileReader("transits/ephemeris.csv");
>
> I said:
>
> #and let the Java code retrieve the CSV as a resource
>
> So you need code like:
>
> Reader ephemeris =
> new
> InputStreamReader(getClass().getClassLoader().getResourceAsStream("transits/ephemeris.csv")));
>
>
> and the file needs to be "transits/ephemeris.csv" within the jar file.
>
> Arne

Arne, the line of code is marvelous! I rechecked the 3 Java books (2 of 
which I've read through, and 2 of them are over 600p long) and 
recreating all the code, and they do not have it. That's why these 
newsgroups are invaluable. Sometimes, of course, you can find answers by 
googling them, but not always.

Thanks to you, the final product:

https://files.nyu.edu/emf202/public/jv/NatalTransits.html

Still I have to reread some chapter Tarnas' book, and add a paragraph or 
2 of what exactly to look for. But the preset Saturn return with 5° orb 
is very convincing if you've at least 28-29 years old, and even more if 
you are 60, while the Neptune aspects are rather elusive.

Thanks,

Eustace

-- 
It ain't THAT, babe! - A radical reinterpretation
https://files.nyu.edu/emf202/public/bd/itaintmebabe.html

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


Thread

Applet not running on the web emf <emfril@gmail.com> - 2013-01-06 19:46 -0500
  Re: Applet not running on the web Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 19:56 -0500
    Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-09 01:21 -0500
  Re: Applet not running on the web Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 19:58 -0500
    Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-07 03:39 -0500
    Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-09 01:40 -0500
      Re: Applet not running on the web Lew <lewbloch@gmail.com> - 2013-01-08 23:01 -0800
        Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-10 07:08 -0500
      Re: Applet not running on the web Arne Vajhøj <arne@vajhoej.dk> - 2013-01-09 20:51 -0500
        Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-10 07:19 -0500
          Re: Applet not running on the web Arne Vajhøj <arne@vajhoej.dk> - 2013-01-10 07:20 -0500
  Re: Applet not running on the web Roedy Green <see_website@mindprod.com.invalid> - 2013-01-08 22:56 -0800
    Re: Applet not running on the web emf <emfril@gmail.com> - 2013-01-09 02:46 -0500
      Re: Applet not running on the web Roedy Green <see_website@mindprod.com.invalid> - 2013-01-09 11:22 -0800
    Re: Applet not running on the web Arne Vajhøj <arne@vajhoej.dk> - 2013-01-09 20:44 -0500
  Re: Applet not running on the web Roedy Green <see_website@mindprod.com.invalid> - 2013-01-09 11:26 -0800

csiph-web