gwan不重新编译Java文件 [英] gwan not re-compiling java files

查看:129
本文介绍了gwan不重新编译Java文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我针对在Ubuntu 12.04服务器上运行的gwan服务器随附的标准hello.java和hello.c进行了测试. G-WAN 4.3.1 64位(2013年3月1日17:36:39)

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)

一旦我和

sudo ./gwan -d

sudo ./gwan -d

我还注意到没有守护程序选项的情况下也会发生相同的行为.

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

然后浏览至192.168.0.2:8080/?hello.c 我得到了"Hello,ANSI C!"的预期输出.我在hello.c中更改了文本,并刷新了浏览器并获得了预期的更改.

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.

如果我对hello.java文件执行相同的操作,则在重新启动gwan之前,不会出现对文本的更改.

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

有人知道我是否缺少一些简单的设置,该设置会在每次更改文件时导致重新编译吗?我正在使用OpenJdk 7(只是将其安装在ubuntu 12.04的全新安装上),我什至尝试像192.168.0.2:8080/?hello.java&n=1那样调用它,以消除缓存的可能性,然后是另一个浏览器,然后是另一台机器在不同的网络上.同样,直到重新启动服务器,更改似乎才发生. (对于Java,它可以与.c文件配合使用)

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)

谢谢 -史蒂夫

推荐答案

您是对的.这是一个长期未解决的问题,因为我们没有找到如何编写和使用"JNI自定义类加载器" (动态卸载和重新加载Java类的方式).

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.

当我们寻求帮助时,一些Java用户将我们重定向到了支持此功能的巨大Java包(数百MB),但是由于这只是几行JNI ANSI C代码的问题,我们希望实现它在C G-WAN程序本身中(我们只是缺少JVM知识来做到这一点).

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).

任何来自Java社区的帮助将不胜感激(贡献者将在应得的积分中获得积分).我们仍然缺少此Java功能.

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.

这篇关于gwan不重新编译Java文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆