I am using jboss application server for deploying my app c开发者_如何学运维ontaining processing code.
My directory structure looks like this myapp-war-1.0.0.war\js\processing.js myapp-war-1.0.0.war\img\bird.png
myapp-ear-1.0.0\myapp-war-1.0.0.war\birds\bird.htmlHow to refer the image bird.png from bird.html
<script>
PImage img;
img = loadImage("img\bird.png");
// The above code doesn't seem to work, but If I use an absolute path to a file in the file system, the processing IDE is able to pick it up.
image(img, 10, 10);
...
How should I look for this file in a relative fashion within my Java EE application packed in a EAR format.
you can try solve this by looking at the output of:
var jsCode = Processing.compile(txt).sourceCode;
alert(jsCode);
where txt is the processing script code !
精彩评论