2

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

Gil
  • 3,279
  • 1
  • 15
  • 25
sday
  • 1,041
  • 14
  • 22
  • I noticed that when I first started using gwan I had a similar problem with the .c files and it was permissions. Not this time, I checked all that, here is the other thread: http://stackoverflow.com/questions/12983523/g-wan-updating-servlets/12988858#12988858 – sday Mar 06 '13 at 01:40

1 Answers1

2

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.

Gil
  • 3,279
  • 1
  • 15
  • 25
  • 2
    Thanks for the info. I hope you guys find someone who can get it done. I love simple solutions... not 100's of MB's to solve one issue. – sday Mar 06 '13 at 15:41
  • Update: our request to the Java platform maintainers was... dismissed as "it's trivial" (but one of their team members later reported that the guy telling this did not know how to do it, and that Chinese software engineers were actually doing the core developments). An Academic researcher has generously written and sent us a workaround but this "trivial" Java code is huge (much bigger than the code used to interface G-WAN and the 15 programming languages - *including Java*). We would love to see a "lighter" solution, wherever it is coming from (China is welcome). – Gil Jun 29 '13 at 07:45