On Tue, Jun 22, 2010 at 10:15 AM, Lars Nilsson <chamael...@gmail.com> wrote:
> On Tue, Jun 22, 2010 at 5:08 AM, Paul Moore <p.f.mo...@gmail.com> wrote:
>> On 22 June 2010 00:11, Rick Moynihan <rick.moyni...@gmail.com> wrote:
>>> On 21 June 2010 18:42, Paul Moore <p.f.mo...@gmail.com> wrote:
>>>> 3. Using a bat file to start a GUI application from Explorer causes an
>>>> unnecessary and ugly console window to appear.
>>>
>>> You should use "javaw" instead of "java" to start the JVM without the
>>> console window appearing.  This should ship with both the JRE and JDK
>>> on Windows.
>>
>> Sorry for not being clear - I know about javaw, but even with that,
>> double clicking on a .bat file flashes up a console window (briefly).
>> I can also set the console to start minimised and it's then a very
>> minor inconvenience. As I said, there are workarounds (and this is the
>> least problematic of the three issues I noted) but I still find it an
>> issue.
>>
>> Clearly others don't get so up tight about these inconveniences as me,
>> which is fine. At least that means I haven't missed a solution that
>> already exists.
>>
>> Thanks for the feedback,
>> Paul.
>
> Maybe Windows Script Host is an option, if you haven't looked at that one yet.

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oEnv = WshShell.Environment("Process")
oEnv("CLOJURE_DIR") = "C:\\Devtools\\clojure"
oEnv("CLOJURE_JAR") = "C:\\Devtools\\clojure\\clojure.jar"
Set oExec = WshShell.Exec("javaw -cp %CLOJURE_JAR%;.\\classes;.\\src;.
clojure.main %1 -- %*")

Saving this as a .vbs file, and replacing %1 with the name of a gui
.clj file seems to work for me. I don't happen to have any Clojure gui
code laying around, so I just picked the temperature converter program
from the Clojure website (http://clojure.org/jvm_hosted). Closing the
window left the javaw process running, maybe because it doesn't listen
for the closing of the window.

Lars Nilsson

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to