Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail From: emf Newsgroups: comp.lang.java.programmer Subject: Applet not running on the web Date: Sun, 06 Jan 2013 19:46:39 -0500 Organization: Aioe.org NNTP Server Lines: 60 Message-ID: NNTP-Posting-Host: 97XtTwlsJbnnO+SkjYBVnA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:21086 The webpage is: https://files.nyu.edu/emf202/public/jv/NatalTransits.html and you can find the code in https://files.nyu.edu/emf202/public/jv/transits/NatalTransitsApplet.java The applet was working without a problem from the beginning in the eclipse applet viewer. Then I managed to make it work on browser from my computer by putting the class and the csv files into a transits folder (like the package in eclipse) and the html in the higher level directory. Then I created the same structure in the webserver. The applet loads, when you enter a invalid birthdate it lets you know, but when you enter a valid birthdate it seems that it does nothing. I tried to troubleshoot adding JOptionPanes, and the problem seems to be in the planet array method: // array of date, planet position formatted to integer, and in minutes public int[][] planetArray(String birthday$) { int i = 0; String textLine = null; int[][] planetArray = new int[36525][2]; try { FileReader ephemeris = new FileReader("transits/ephemeris.csv"); BufferedReader buffer = new BufferedReader(ephemeris); String date; do { textLine = buffer.readLine(); date = textLine.substring(0, 8); i++; } while (!date.equals(birthday$)); for (i = 0; i < 36525; i++) { planetArray[i][0] = Integer.parseInt(textLine.substring(0, 8)); planetArray[i][1] = toMinutes(textLine.substring(planetPlace,planetPlace + 5)); textLine = buffer.readLine(); if (textLine == null) { break; } //the remaining places of the array are 0 } buffer.close(); } catch (IOException e) { outputArea.setText("Invalid date input."); outputArea.append("\n" + e.toString()); } return planetArray; } but the try block does not catch any errors. What could the problem be? Thanks, Eustace -- It ain't THAT, babe! - A radical reinterpretation https://files.nyu.edu/emf202/public/bd/itaintmebabe.html