We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I had been using javascript mode via the Processing IDE without any problems including with the latest version 2.1.1. Yesterday, when installing a library via the the library manager the 'Update Manager' popped up informing me that there was a new version of the Javascript mode, and to install I needed to remove the existing version. This I did (via the update manager) without problems, but in attempting to (re)install the latest version, it hangs with the following message stack trace sent to the console:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:69)
at processing.app.contrib.ContributionManager$1.run(ContributionManager.java:123)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1292)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1952)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2398)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1557)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678)
at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639)
at java.net.URLConnection.getContentLengthLong(URLConnection.java:511)
at java.net.URLConnection.getContentLength(URLConnection.java:495)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:398)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:65)
... 2 more
Now I seem to have no way of getting Javascript mode. Looking at the source on github (https://github.com/fjenett/javascript-mode-processing) it looks like the project hasn't been updated for a while* so the original message that javascript mode needed updating was probably in error.
Anyone else had this problem, and any ideas how to get javascript mode back and available with Processing 2.1.1? I am running it on MacOS X 10.9.2 (retina) with the default version of Java as 1.7.0_40 (I'm not sure if the library manager uses the system version of Java or its own bundled one).
(* On a related note, I am slightly worried that the Javascript support has fallen behind Processing, and since this is now the only way to reliably deploy Processing via the web, this really could be a killer for me. It would be such a shame to have to leave Processing after nearly a decade of working with it.)
Answers
Download it from the deeper link below:
https://github.com/fjenett/javascript-mode-processing/blob/master/release/JavaScriptMode.zip
Follow the mini instructions I've left below:
http://forum.processing.org/two/discussion/3835/sslexception-stopping-me-from-installing-javascript-mode-in-processing-2-1-1
Read below about the sad news about JS Mode: :-S
http://forum.processing.org/two/discussion/3819/gsoc-2014-idea-adobe-flash-import-tool
Thanks GoToLoop - a succinct and very helpful set of answers.
I have to agree with you that this is such a pity that JS mode is being dropped in favour of a 'pure JS' alternative. It has been hard enough having to rewrite java-flavoured Processing to work in JS mode, especially when producing cross-mode libraries. Having two completely separate sets of syntax is going to make the job harder still.
I've got some more critique too:
In that we write in a more appropriate language which is then compiled as JS.
Yes, having explorer a bit the Dart language, I think a Processing.Dart project would be awesome! It has a very nice OOP support, it would be faster than JS (even on a browser) and it would be easier to code correctly than JS (beware of memory leak with JS!).
The downside is the need of a compiler, vs. "change the file and refresh your browser".