gwan not re-compiling java files

て烟熏妆下的殇ゞ 提交于 2019-12-11 04:07:12

问题


I tested against the standard hello.java and hello.c that comes with the gwan server running on Ubuntu 12.04 server. G-WAN 4.3.1 64-bit (Mar 1 2013 17:36:39)

Once I run gwan with

sudo ./gwan -d

I also noticed the same behavior running without the daemon option.

Then browse to 192.168.0.2:8080/?hello.c I get the expected output of "Hello, ANSI C!". I change the text in hello.c and refresh the browser and get the expected changes.

If I do the same thing with the hello.java file, changes to the text do not appear until I restart gwan.

Does anyone know if I'm missing some simple setting that would cause a recompile any time the file is changed? I'm using OpenJdk 7. (just installed it on a fresh install of ubuntu 12.04) I even tried calling it like 192.168.0.2:8080/?hello.java&n=1 to eliminate cache possibilities, then another browser then another machine on a different network. Same thing, the changes just don't seem to happen until I restart the server. (for java, it worked fine with .c files)

Thanks -Steve


回答1:


You are right. This is a long-standing unresolved issue because we did not find how to write and use a "JNI custom class loader", the way to unload and reload Java classes dynamically.

When we asked for assistance, some Java users redirected us to huge (hundreds of MBs) Java packages which support this feature but since this is merely a question of a few lines of JNI ANSI C code, we would like to implement it in the C G-WAN program itself (we just lack the JVM knowledge to do it).

Any help from the Java community would be much appreciated (contributors will receive credit where credit is due). We are still missing this Java feature.



来源:https://stackoverflow.com/questions/15236914/gwan-not-re-compiling-java-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!