Hi,
to use the Java Libraries for the GUI, I decided to use JOCL, kind of an OpenCL-binding for Java. The following code shows my work on a Java program using OpenCL for heavy calculation. Now my problem is the following: As I do not let the main program read out the CL-Buffer, the calculation seems to succes very fast. To let the main program show the results, I then told the program to read out the buffer, but (as I found out with console output) the program hangs up at the first command to do so. Here is the code:

public BufferedImage image;
public JComponent root;
public Simulator simulator;
public double delta_t = 20;
public double buffer;
public double old_time;
public double new_time;
public boolean run;
public long fps_num;
public int SIZE_Y = 500;
public int SIZE_X = 500;
public double[] it = new double[]{1};
public int[] max_it;
public int[] rwidth;
public int[] rheight;
public int[] new_explosion;
public double[] new_exp_x;
public double[] new_exp_y;
public double[] cr, cg, cb;

public class Space {
public Simulator reference;
public double[] cor_x;
public double[] cor_y;
public int[] vs_cor_x;
public int[] vs_cor_y;
public double[] direction;
public double[] speed;
public int[] alive;
public int[] wave;
public int[] new_wave;
public int[] speed_decreased;
public int[] cloud;
public double it = 2;
public int max_it;
public double x_max;
public double y_max;
public int rwidth;
public int rheight;
public int new_explosion;
public double new_exp_x;
public double new_exp_y;