我使用jboss应用服务器来部署包含处理代码的应用程序。
我的目录结构类似于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.html
如何引用来自bird.html的镜像bird.png
<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);
...
在打包成EAR格式的Java应用程序中,我应该如何以相对的方式查找该文件。
发布于 2011-01-29 21:57:43
您可以尝试通过查看以下命令的输出来解决此问题:
var jsCode = Processing.compile(txt).sourceCode; alert(jsCode);
其中txt是处理脚本代码!
https://stackoverflow.com/questions/4723841
复制相似问题