I show here a MCVE, which can be used to produce appearance of an additional javascript executor thread. You need a HtmlUnit dependency to run it, the maven coordinates for the latest snapshot are:
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.20-SNAPSHOT</version>
</dependency>
The MVCE listing:
import com.gargoylesoftware.htmlunit.WebClient;
public class SOQuestion34192800 {
public static void main(String[] args) throws Exception {
try (WebClient webClient = new WebClient()) {
webClient.getOptions().setJavaScriptEnabled(false);
webClient.getPage("http://stackoverflow.com");
Thread.sleep(10000);
}
}
}
I start it in Eclipse and this is what I see in the debug view:
After I spent a lot of time to get rid of using javascript with HttpUnit in my application (because it is really slow), I expected it would reward me with a cleaner java process. But this thread still pops up and kinda bugs me. Is this a normal behavior, which can be justified, or just a bug?