I want to write a simple program in Processing, that would take data from here:
https://btc-e.com/api/2/btc_usd/trades
and display them in a chart. Let's consider the simplest example of accessing the data:
void setup() {
size(400,400);
}
void draw() {
background(0);
fill(244);
String[] t = loadStrings("https://btc-e.com/api/2/btc_usd/trades");
text(t[0],100,100);
}
This works perfectly, when I run this as Java Application directly from Processing IDE (from both Processing 1.5 and 2.0). But then I export this as Java Applet (from Processing 1.5) I can not run this on either localhost or OpenProcessing. Java Machine runs, asks, whether I want to run the applet, I accept that, and then applet stays grey or white and nothing happens. What's the reason?
Is there any security problem, that Java Machine does not allow the code to get external data from other server? Is there any way to walk around the problem?
I stress, that I am working in Java/Java Applet mode, not in JavaScript, which I am sure does not allow such cross-source of data.