Java demos

[From Rick Marken (2014.01.20.1120)]

I'm having trouble running my own java demos on my computer. Actually,
they won't run on any of my computers at home; I get a security
warning. But a friend of mine where I work says they work for him. So
I'm confused about what is going on. So I would appreciate if those of
you listening in out there would try running one of my java applets
and let me know if it works.

Just go to http://www.mindreadings.com/ControlDemo/BasicTrack.html

and see if you get the "Run" button (meaning it works) or a Security
alert message (which is what I get). Just reply to me
(rsmarken@gmail.com) and let me know what happens.

It happens to me in all my browsers on all my machines. But also let
me know what kind of browser(s) you used if you do try it.

Thanks

Best

Rick

···

--
Richard S. Marken PhD
www.mindreadings.com

The only thing that will redeem mankind is cooperation.
                                                   -- Bertrand Russell

[From Richard Kennaway (2014.01.20 2042 GMT)]

[From Rick Marken (2014.01.20.1120)]

Just go to Nature of Control

and see if you get the "Run" button (meaning it works) or a Security
alert message (which is what I get). Just reply to me
(rsmarken@gmail.com) and let me know what happens.

It happens to me in all my browsers on all my machines. But also let
me know what kind of browser(s) you used if you do try it.

I tried this in Safari on the latest iMac running the latest OSX. In place of the applet appears a button with the words "Java blocked for this website". I can click the button to allow it but then I get an alert saying "Application Blocked by Security Settings" offering no way to allow it. In Safari's preferences panel, there are more security settings I can adjust, but however liberal the permissions I try to grant to Java on www.mindreadings.com, it is still refused permission to run.

The same thing happens to my robot applet at Archy: A multi-legged robot.

On my obsolete Mac Pro, which is out of date by three major versions of OSX, I get an alert asking if I want to block or allow the applet. When I click Allow, it runs normally.

Apple, and probably Microsoft also, are getting far more strict about Java applets. It is possible to write them so that they can be allowed to run, but there are hoops you have to jump through to do so that change every time a new version of Java or the OS comes out, but I don't know any of the details. In fact, googling /Java security/ I would not be surprised if in a few years time Java is dead, written off by everyone as irremediably insecure. OSX doesn't even ship with Java nowadays, and iOS has never supported it and never will.

Maybe it's time to think about what software platform to recode all those applets for.

···

--
Richard Kennaway, R.Kennaway@uea.ac.uk, Richard Kennaway
School of Computing Sciences,
University of East Anglia, Norwich NR4 7TJ, U.K.

[From Rupert Young (2014.01.20 22:10 UT)]

You can find an explanation and workaround here, http://www.java.com/en/download/help/java_blocked.xml

Regards,
Rupert

···

On 20/01/2014 21:03, Richard Kennaway (CMP) wrote:

[From Richard Kennaway (2014.01.20 2042 GMT)]

[From Rick Marken (2014.01.20.1120)]
Just go to Nature of Control
and see if you get the "Run" button (meaning it works) or a Security
alert message (which is what I get). Just reply to me
(rsmarken@gmail.com) and let me know what happens.
It happens to me in all my browsers on all my machines. But also let
me know what kind of browser(s) you used if you do try it.

I tried this in Safari on the latest iMac running the latest OSX. In place of the applet appears a button with the words "Java blocked for this website". I can click the button to allow it but then I get an alert saying "Application Blocked by Security Settings" offering no way to allow it. In Safari's preferences panel, there are more security settings I can adjust, but however liberal the permissions I try to grant to Java on www.mindreadings.com, it is still refused permission to run.

The same thing happens to my robot applet at Archy: A multi-legged robot.

On my obsolete Mac Pro, which is out of date by three major versions of OSX, I get an alert asking if I want to block or allow the applet. When I click Allow, it runs normally.

Apple, and probably Microsoft also, are getting far more strict about Java applets. It is possible to write them so that they can be allowed to run, but there are hoops you have to jump through to do so that change every time a new version of Java or the OS comes out, but I don't know any of the details. In fact, googling /Java security/ I would not be surprised if in a few years time Java is dead, written off by everyone as irremediably insecure. OSX doesn't even ship with Java nowadays, and iOS has never supported it and never will.

Maybe it's time to think about what software platform to recode all those applets for.

[From Rick Marken (2014.01.20.1505)]

Thanks to all who replied. All but one get the security alert I get.
This is apparently due to some kind of Security change that was made
to Java on January 14. I think there are ways to recompile the applets
to make them comply with whatever the security requirements are now.
But who know when they might change again.

Richard Kennaway gave me the best advice -- drop java and put the
demos up in another language. Which I will do ASAP.

Thanks all.

Best

Rick

···

On Mon, Jan 20, 2014 at 11:20 AM, Richard Marken <rsmarken@gmail.com> wrote:

[From Rick Marken (2014.01.20.1120)]

I'm having trouble running my own java demos on my computer. Actually,
they won't run on any of my computers at home; I get a security
warning. But a friend of mine where I work says they work for him. So
I'm confused about what is going on. So I would appreciate if those of
you listening in out there would try running one of my java applets
and let me know if it works.

Just go to Nature of Control

and see if you get the "Run" button (meaning it works) or a Security
alert message (which is what I get). Just reply to me
(rsmarken@gmail.com) and let me know what happens.

It happens to me in all my browsers on all my machines. But also let
me know what kind of browser(s) you used if you do try it.

Thanks

Best

Rick
--
Richard S. Marken PhD
www.mindreadings.com

The only thing that will redeem mankind is cooperation.
                                                   -- Bertrand Russell

--
Richard S. Marken PhD
www.mindreadings.com

The only thing that will redeem mankind is cooperation.
                                                   -- Bertrand Russell

[From Bruce Abbott (2014.01.20.2045 EST)]

Richard Kennaway (2014.01.20 2042 GMT)

RK: Maybe it's time to think about what software platform to recode all
those applets for.

Do you have a recommendation?

Bruce

[Martin Taylor 2014.01.20.23.12]

[From Bruce Abbott (2014.01.20.2045 EST)]

Richard Kennaway (2014.01.20 2042 GMT)

RK: Maybe it's time to think about what software platform to recode all
those applets for.

Do you have a recommendation?

Bruce

LiveCode <http://livecode.com/&gt; is a modernized version of Hypercard, and has free and paid versions, the difference being that you have to include all the source code with a program built with the free version. It's built in C++ at base, I believe.

Processing is free but is based on Java, and a recent update disabled the multi-platform deployment possibility, at least for compiled programs, though if you distribute source code, others can compile it for their platforms.

Both are open source, though LiveCode has paid closed source options if you want to sell programs without releasing the code.

There are a host of other possibilities, but these are the two that top my suggestion list.

Martin

···

On 2014/01/20 8:40 PM, Bruce Abbott wrote:

[From Matti Kolu (2014.01.23.2300 CET)]

Bruce Abbott (2014.01.20.2045 EST)--

Do you have a recommendation?

One thing to consider: what used to be a desktop application fifteen
years ago is almost always a web application today. *All* of the PCT
demonstrations that I've seen can be made to work in a HTML5
compatible browser. (Basically any modern browser.) This is done using
_JavaScript_ and a combination of _JavaScript_ libraries.

The obvious advantage is accessibility: the user does not have to
download or compile anything. The demonstrations run in the browser
itself. No plug-ins are needed. As you are writing for the browser,
you do not have care about which OS the user is using. If you stick to
the best practices, you also don't have to concern yourself about
which browser the user is using, as long as it is somewhat modern.

The various libraries that you include on the page with the
_JavaScript_ make it easy to work with graphics, animations and, if
you need it, up to 10MB of local storage (The data is stored
semi-permanently in the user's browser. For most of the demonstrations
that should be plenty of space.).

To get an idea of what the work flow looks like, here is a 15 minute
video that gives a very brief introduction to the "Raphael.js"
graphics library. You only have to watch the first five minutes or so
to get the idea:

In the video you see:

1. A typical HTML page. (Barring a few lines. Ignore the file extension.)
2. The custom _JavaScript_ file that will end up containg most of the
code actually written. This file is included on the HTML page.
3. The jQuery library. This is included on the HTML page. It makes the
process of working with _JavaScript_ a lot more convenient.
(http://jquery.com/)
4. Raphael.js. The graphics library that is being demonstrated.
"Rapha�l is a small JavaScript library that should simplify your work
with vector graphics on the web. If you want to create your own
specific chart or image crop and rotate widget, for example, you can
achieve it simply and easily with this library."
(http://raphaeljs.com/)
5. Some typical _Javascript_: skip to 11:45 to see what a simple
for-loop looks like.

Note that the development environment is a text editor of your choice
and that there is no compiling: you simply refresh the page in the
browser when you want to evaluate the results of your changes.

Examples of available graphics & graph libraries

1. http://raphaeljs.com/ (scroll down for some examples)
2. NVD3 - Examples (redirect)
3. http://d3js.org/ (checkout the Tetris clone on the examples page)
4. Snap.svg - Getting Started

Local storage:

1. http://www.jstorage.info/

I am not a web developer, so the above is only a rough sketch of the
approach. There is of course the sister project of Processing,
Processing.js: http://processingjs.org/. The reason I didn't mention
it is that it seems somewhat clunky to use it if you already know that
you are only interested in writing for the browser. If you are already
familiar with Processing, as some of you seem to be, it might be a
convenient approach.

Matti

[From Bruce Abbott (2014.01.23.1835 EST)]

BA: Thanks, Matti. I did dabble in Java a while back but have never worked
with JavaScript. Maybe it's time I learned how!

Matti Kolu (2014.01.23.2300 CET) --

Bruce Abbott (2014.01.20.2045 EST)
Do you have a recommendation?

One thing to consider: what used to be a desktop application fifteen years
ago is almost always a web application today. *All* of the PCT
demonstrations that I've seen can be made to work in a HTML5 compatible
browser. (Basically any modern browser.) This is done using _JavaScript_ and
a combination of _JavaScript_ libraries.

The obvious advantage is accessibility: the user does not have to download
or compile anything. The demonstrations run in the browser itself. No
plug-ins are needed. As you are writing for the browser, you do not have
care about which OS the user is using. If you stick to the best practices,
you also don't have to concern yourself about which browser the user is
using, as long as it is somewhat modern.

The various libraries that you include on the page with the _JavaScript_
make it easy to work with graphics, animations and, if you need it, up to
10MB of local storage (The data is stored semi-permanently in the user's
browser. For most of the demonstrations that should be plenty of space.).

To get an idea of what the work flow looks like, here is a 15 minute video
that gives a very brief introduction to the "Raphael.js"
graphics library. You only have to watch the first five minutes or so to get
the idea:

In the video you see:

1. A typical HTML page. (Barring a few lines. Ignore the file extension.) 2.
The custom _JavaScript_ file that will end up containg most of the code
actually written. This file is included on the HTML page.
3. The jQuery library. This is included on the HTML page. It makes the
process of working with _JavaScript_ a lot more convenient.
(http://jquery.com/)
4. Raphael.js. The graphics library that is being demonstrated.
"Rapha�l is a small JavaScript library that should simplify your work with
vector graphics on the web. If you want to create your own specific chart or
image crop and rotate widget, for example, you can achieve it simply and
easily with this library."
(http://raphaeljs.com/)
5. Some typical _Javascript_: skip to 11:45 to see what a simple for-loop
looks like.

Note that the development environment is a text editor of your choice and
that there is no compiling: you simply refresh the page in the browser when
you want to evaluate the results of your changes.

Examples of available graphics & graph libraries

1. http://raphaeljs.com/ (scroll down for some examples) 2.
NVD3 - Examples (redirect)
3. http://d3js.org/ (checkout the Tetris clone on the examples page) 4.
Snap.svg - Getting Started

Local storage:

1. http://www.jstorage.info/

I am not a web developer, so the above is only a rough sketch of the
approach. There is of course the sister project of Processing,
Processing.js: http://processingjs.org/. The reason I didn't mention it is
that it seems somewhat clunky to use it if you already know that you are
only interested in writing for the browser. If you are already familiar with
Processing, as some of you seem to be, it might be a convenient approach.

Matti

···

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4259 / Virus Database: 3681/7027 - Release Date: 01/23/14

[From Rick Marken (2014.01.24.1225)]

Matti Kolu (2014.01.23.2300 CET)--

Bruce Abbott (2014.01.20.2045 EST)--

Do you have a recommendation?

MK: One thing to consider: what used to be a desktop application fifteen
years ago is almost always a web application today. *All* of the PCT
demonstrations that I've seen can be made to work in a HTML5
compatible browser. (Basically any modern browser.) This is done using
_JavaScript_ and a combination of _JavaScript_ libraries.

RM: Thanks for this Matti. I'll file it away as a possibility. I'm
using Processing now but I might try JavaScript eventually.

Best

Rick

···

The obvious advantage is accessibility: the user does not have to
download or compile anything. The demonstrations run in the browser
itself. No plug-ins are needed. As you are writing for the browser,
you do not have care about which OS the user is using. If you stick to
the best practices, you also don't have to concern yourself about
which browser the user is using, as long as it is somewhat modern.

The various libraries that you include on the page with the
_JavaScript_ make it easy to work with graphics, animations and, if
you need it, up to 10MB of local storage (The data is stored
semi-permanently in the user's browser. For most of the demonstrations
that should be plenty of space.).

To get an idea of what the work flow looks like, here is a 15 minute
video that gives a very brief introduction to the "Raphael.js"
graphics library. You only have to watch the first five minutes or so
to get the idea:

http://www.youtube.com/watch?v=q7KF-Xr6bm8

In the video you see:

1. A typical HTML page. (Barring a few lines. Ignore the file extension.)
2. The custom _JavaScript_ file that will end up containg most of the
code actually written. This file is included on the HTML page.
3. The jQuery library. This is included on the HTML page. It makes the
process of working with _JavaScript_ a lot more convenient.
(http://jquery.com/)
4. Raphael.js. The graphics library that is being demonstrated.
"Rapha�l is a small JavaScript library that should simplify your work
with vector graphics on the web. If you want to create your own
specific chart or image crop and rotate widget, for example, you can
achieve it simply and easily with this library."
(http://raphaeljs.com/)
5. Some typical _Javascript_: skip to 11:45 to see what a simple
for-loop looks like.

Note that the development environment is a text editor of your choice
and that there is no compiling: you simply refresh the page in the
browser when you want to evaluate the results of your changes.

Examples of available graphics & graph libraries

1. http://raphaeljs.com/ (scroll down for some examples)
2. NVD3 - Examples (redirect)
3. http://d3js.org/ (checkout the Tetris clone on the examples page)
4. Snap.svg - Getting Started

Local storage:

1. http://www.jstorage.info/

I am not a web developer, so the above is only a rough sketch of the
approach. There is of course the sister project of Processing,
Processing.js: http://processingjs.org/. The reason I didn't mention
it is that it seems somewhat clunky to use it if you already know that
you are only interested in writing for the browser. If you are already
familiar with Processing, as some of you seem to be, it might be a
convenient approach.

Matti

--
Richard S. Marken PhD
www.mindreadings.com

The only thing that will redeem mankind is cooperation.
                                                   -- Bertrand Russell

[From Adam Matic 2014.01.26 1550 CET]

···

Matti Kolu (2014.01.23.2300 CET)

One thing to consider: what used to be a desktop application fifteen

years ago is almost always a web application today. All of the PCT

demonstrations that I’ve seen can be made to work in a HTML5

compatible browser. (Basically any modern browser.) This is done using

JavaScript and a combination of JavaScript libraries.

AM:

Thanks. I didn’t know there were so many of these libraries for JavaScript. I’m trying to find which one would be most suitable for PCT demos. I found one that is used for making games that looks interesting.

For now, the processing.js library seems to do the job quite well and is easy to use. Most Processing sketches can be converted to JavaScript by just clicking a button on the Processing IDE, and you get a webpage with your sketch and the processing.js library.

I’m not sure if processing.js is going to be good enough for 3D stuff, though, so something else might be needed.

Adam

[From Rick Marken (2014.01.26.1120)]

···

Adam Matic (2014.01.26 1550 CET)–

What’s the Processing IDE? I’m running something called Processing 2.1.1 and I can’t seem to find a button that converts my processing code to JavaScript. I want that button!! :wink:

Best

Rick


Richard S. Marken PhD
www.mindreadings.com
The only thing that will redeem mankind is cooperation.

                                               -- Bertrand Russell

Matti Kolu (2014.01.23.2300 CET)

One thing to consider: what used to be a desktop application fifteen

years ago is almost always a web application today. All of the PCT

demonstrations that I’ve seen can be made to work in a HTML5

compatible browser. (Basically any modern browser.) This is done using

JavaScript and a combination of JavaScript libraries.

AM:

Thanks. I didn’t know there were so many of these libraries for JavaScript. I’m trying to find which one would be most suitable for PCT demos. I found one that is used for making games that looks interesting.

For now, the processing.js library seems to do the job quite well and is easy to use. Most Processing sketches can be converted to JavaScript by just clicking a button on the Processing IDE, and you get a webpage with your sketch and the processing.js library.

I’m not sure if processing.js is going to be good enough for 3D stuff, though, so something else might be needed.

Adam

[From Adam Matic 2014.01.26 2040 CET]

···

Rick Marken (2014.01.26.1120)

That is the IDE. I’m using the same version. In the upper right corner, you’ll see mode changing box, it says Java by default. You can choose several modes to export Processing sketches to. If there is no JavaScript, select “Add mode”, and you’ll find it there.

In JavaScript mode, clicking “Run” starts a ‘server’ and opens your web browser with a html page from the “template” folder.

You can also do a web export that puts the processing sketch, the html file, the processing.js library and everything else in a single folder.

Adam

What’s the Processing IDE? I’m running something called Processing 2.1.1 and I can’t seem to find a button that converts my processing code to JavaScript. I want that button!! :wink: