Hey guys...I met a very annoying problem while I am trying to put a program integrated Processing on a tomcat server...I checked many solutions about this. Most of them is saying that the applet on the server side is so-called heavy weight component...But I can't shift them into client side cause I just want processing to make a picture and then send this to the client.
So I think I didn't call the applet display or some interactive operations..I don't know why I have this problem "using java.awt library in linux X11 display problem"..So if I change the tomcat setting as most of people said "-DJava.awt.headless=true", it will get into another error..Both errors show that there is a problem in Papplet.java 244 lines in the source code of processing:
static public final int MENU_SHORTCUT = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
Can somebody help me , I got stuck here like ages.......
Hey guys I met a problem while I was woking with Processing...
So I imported the required library locally and it's wokring fine...
But when I just put this in the maven dependency..The program will always got stuck at:
wordcram.init(); //wordcram is the object of processing.
And it's not giving me an error, the program is just stucking there not moving then....I am wokring on a java project in eclipse..Can anybody help me??
I am working on with Processing in
eclipse. So it's not like the sketchbook that I can save the picture directly.
So for my code I just write:
public class Test extends PApplet {
public void setup() {
....
......
this.save("/home/yu/workspace/ppooc1"); /
/ Here it's just defult saving as .tif format. I don't know how to set to changeit into anohter format, can somebody help me ??
color c = color(255, 204, 0); // there is an error.
...
...
}
So we can see the code above, there is always the error showing that the color can't be resolved...I imported the newest processing.jar...I don't know why....Any clue?
Hey, I met a problem while I want to run the applet of prcessing thing in my normal java application.
So here is the definition of my processing part:
import processing.core.*;
import wordcram.*;
public class CasWordCram extends PApplet {
/**
*
*/
WordCram words = new WordCram(this);
@Override
public void setup() {
System.out.println("hello++++++++++&&&&&&&****************");
this.size(500, 400);
this.background(255);
this.words.fromWebPage("http://en.wikipedia.org/wiki/Word_cloud");
this.words.drawAll();
this.save("test");
}
}
//So the thing above is running perfectly and I can get the applet window which is fine.(ONLY RUN IT AS A JAVA APPLET INDEPENDENTLY).
public void finishProcessing() {
CasWordCram wordcram = new CasWordCram();
wordcram.setup();
}
//So this function above is defined in a normal java application. It's under one class. And I built the wordcram class from the defined class above.
But after compiling it as
JAVA APPLICATION. it shows this error:
Exception in thread "main" java.lang.NullPointerException at processing.core.PApplet.size(Unknown Source) at processing.core.PApplet.size(Unknown Source) at de.fhg.iais.kd.tm.quote.casAnnotation.CasWordCram.setup(CasWordCram.java:21)
Can somebody help me with this? I got stuck by this for hours......Thank you for your patient reading~~
So I am a fresh man using Processing. I am now playing with Processing on eclipse and I import the library of Processing and 'WordCram' (Another library writing for Processing). And it's working fine, I can get the jave applet window and I can see the resul that t I want like the picture below shows. I am just wondering how I can get to save the picture of this applet window? In simple words, I want to save the results (the pictures of the words). How can I implement it in eclipse?