Ugh, top-posting... Reformatted. On Sun, 21 May 2006, Christopher Molnar wrote:
> Igor Peshansky wrote: > > > My wrapper scripts do a bit more than that -- they also translate the > > arguments containing paths appropriately, before eventually invoking > > the right executables. The part that dispatches based on JAVA_HOME is > > not the main point of the scripts, though it's nice to have. > > Igor > > So if I follow your java.sh script correctly and get the idea, I could > call this at the start of the startup.sh script which needs the location > of JAVA_HOME and it would find the correct jdk location? or does it just > find the java.exe? Well, JAVA_HOME is expected to already point to the correct JDK location. And you would simply invoke the appropriate wrapper for each program (e.g., invoke "java" to find "java.exe", "jar" to find "jar.exe", etc). The wrappers will "help" those JDK programs understand Cygwin paths, etc. Their intent was to help non-Cygwin-aware Unix scripts that invoke java and other JDK executables. > I would need it to find JAVA_HOME and set that variable .... If I am > thinking this through correctly. One of the future work items in the wrappers is the logic (which would most likely go into a /etc/profile.d script) to find some Java installation automatically and set JAVA_HOME if it's not already set. But this is obviously not done yet. > I also need this for the build scripts for ANT and TOMCAT. I'm not very familiar with the Tomcat build procedure, but, IIRC, my wrappers will not be very helpful for Ant, as its build scripts understand the JAVA_HOME setting, are Cygwin-aware, and do the appropriate path conversion themselves (so the wrappers never get invoked -- Ant invokes java.exe directly). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac"