Getting Web Start to use JDK's javaw.exe, not JRE's

On Windows, I need a Web Started app (actually, my <a href="http://www.glossitope.org/">Glossitope</a> desklet) to run with the JDK's javaw.exe, not the JRE's, because I use the Java Compiler API, which is more or less a no-op in the JRE. I've tried using the Java Control Panel to change the Java Application Runtime Settings path to use the JDK path rather than the JRE's, but the change never takes. What, if anything, can I do to get JNLP's to run with the JDK?

[489 byte] By [invalidnamea] at [2007-11-27 8:20:00]
# 1

If you need to distribute a jnlp application using the compiler from the jdk, then it's not that you need to run the jdk's version of javaw.exe (it's identicle to the jre's copy) but you need the jars from jdk/lib, and/or executables from jdk/bin. you could include the jars in your jnlp file if the license permits their seperate redistribution, but a better approach may be to look at:

http://java.sun.com/javase/6/docs/api/javax/tools/ToolProvider.html

/Andy

dietz333a at 2007-7-12 20:08:16 > top of Java-index,Desktop,Deploying...
# 2

Well, using ToolProvider is exactly what I'm trying to do. The program lets you type some Java code, then compiles it and runs it (with help from a custom class-loader). The problem is that when run from Web Start on Windows, ToolProvider.getSystemJavaCompiler() returns null. I can see from the Control Panel that Web Start's path to Java uses the JRE path, not the JDK, and I suspect that's the reason I'm getting null for the compiler.

I suspect bundling the tools jar is exactly what I need to do, and I also suspect the license forbids that.

Works great on the Mac, FWIW.

Thanks for the reply.

--Chris

invalidnamea at 2007-7-12 20:08:16 > top of Java-index,Desktop,Deploying...