For sure. There is no problem in taking yours over mine since it does quite a bit more yet still solves the original problem. Thanks for the work !
Andi.. On Thu, 7 Nov 2002, Andrew Hyatt wrote: > THis is similar to the patch I posted to jde-patches a little while ago, > but the patch I made cconsolidates all java-executable finding to a routine > so it is finally consistent, which is helpful for thigns like making it work > with different JDK layouts. It only assumes classes.jar shoul be used > instead of tools.jar for mac systems. If any executable is not found where > it is expected to be , it is looked fr in the current executable path and > used there. This ensures that multiple versions of JDK's can be use easily, > and adding new logic to executable-finding is now a minor task. > > Sorry to promote my own patch, your looks good (however you may need to > expand it so that ant and other things are covered by it), but I think my > patch is a nice refactoring of a lot of messy duplicated code, and I think > it would be good to add to the next version. > > -----Original Message----- > From: Andi Vajda > To: Dwight Shih > Cc: Paul Kinnucan; [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Sent: 11/6/02 2:04 PM > Subject: Re: Installing JDE on Mac OS X 10.2.1 > > > >From what I heard, JDK 1.4.1, currently in developer preview mode > coexists > well with the shipped 1.3.1 version. The patch I proposed: > - assumes tools.jar functionality is part of Apple's classes.jar > - assumes the java executable is under /usr/bin/java which is a link > to the > 'current' java install. The notion of 'current' is maintained by > links in > the Apple install dir /System/Library/Frameworks/JavaVM.framework > So, it seems they have made version coexistence relatively simple, at > least > not any harder than on a regular Unix system. > > As long as Apple doesn't change any of the assumptions above, I don't > expect > any problems. As with any third party dependencies such as jde->java, if > the > third party changes, all bets are off. This is not specific to Apple. > > Andi.. > > On Wed, 6 Nov 2002, Dwight Shih wrote: > > > Paul, > > > > I don't know that any special instructions are needed. Modulo Apple's > > funky JDK distribution, it installs just the way I'd expect on a Unix > > box (mind you, all my JDE experience is on NT although I lived in > emacs > > on SunOS until 5 years ago). I exchanged private email with Mike > Hakata > > and the resolution of his problem reflects that as well. > > > > Looking at this patch, my concern would be whether this allows me to > > easily choose between multiple installed JDK's (assuming that Apple > > will allow me to have multiple installed JDK's once they release 1.4). > > > > Dwight > > > > On Thursday, October 31, 2002, at 12:17 AM, Paul Kinnucan wrote: > > > > > Hi Andi, > > > > > > I've applied your patch to the JDEE sources. I'm concerned that > > > it may be specific to your build of Emacs or to your installation. > > > > > > So if there is a more general solution and you or anyone else wants > > > to provide it, I'd be happy to apply it to the JDE. > > > > > > Also, I'd appreciate it if somebody would take a look at the JDEE's > > > installation instructions on the JDEE website and provide me with > > > a section for intalling the JDEE on the Macintosh parallel to those > > > for Unix and Windows. > > > > > > - Paul > > > > > > Andi Vajda writes: > > >> > > >> Hi Paul, > > >> > > >> Thanks for a great emacs package ! > > >> > > >> I just managed to get the JDE installed on Mac OS X 10.1.2 with > emacs > > >> compiled > > >> out of CVS with the carbon extensions as described at > > >> http://members.shaw.ca/akochoi-emacs/ > > >> (the emacs shipped with OS X is tty only) > > >> > > >> There are some part in the JDE .el code that don't apply well on OS > > >> X, namely, > > >> the assumptions made about the JDK install structure don't hold. > The > > >> Apple > > >> java directory tree is very different from all other installations > I > > >> know > > >> of. Also there is no tools.jar, these classes are part of > > >> classes.jar, the > > >> main jar file on OS X. > > >> > > >> Here are some diffs that fix these. I generated them with diff -p > > >> against the > > >> sources in jde-2.2.9beta12. Only two files changed beanshell.el and > > >> jde-run.el. > > >> > > >> *** beanshell.el Mon Oct 28 16:16:07 2002 > > >> --- /Users/vajda/tmp/jde-2.2.9beta12/lisp/beanshell.el Tue Sep > 10 > > >> 21:29:18 2002 > > >> *************** buffer." > > >> *** 104,115 **** > > >> (append > > >> (list > > >> (expand-file-name "bsh-commands" > jde-java-directory) > > >> ! (unless (eq system-type 'darwin) > > >> ! (let ((tools > > >> ! (expand-file-name "lib/tools.jar" > (jde-get-jdk-dir)))) > > >> ! (if (file-exists-p tools) > > >> ! tools > > >> ! (error "Cannot find JDK's tools jar file. See > > >> jde-get-jdk-dir.")))) > > >> (if ant-home (expand-file-name "lib/ant.jar" > ant-home)) > > >> (expand-file-name "lib/checkstyle-all.jar" > > >> jde-java-directory) > > >> (expand-file-name "lib/jakarta-regexp.jar" > > >> jde-java-directory) > > >> --- 104,114 ---- > > >> (append > > >> (list > > >> (expand-file-name "bsh-commands" > jde-java-directory) > > >> ! (let ((tools > > >> ! (expand-file-name "lib/tools.jar" > (jde-get-jdk-dir)))) > > >> ! (if (file-exists-p tools) > > >> ! tools > > >> ! (error "Cannot find JDK's tools jar file. See > > >> jde-get-jdk-dir."))) > > >> (if ant-home (expand-file-name "lib/ant.jar" > ant-home)) > > >> (expand-file-name "lib/checkstyle-all.jar" > > >> jde-java-directory) > > >> (expand-file-name "lib/jakarta-regexp.jar" > > >> jde-java-directory) > > >> > > >> *** jde-run.el Mon Oct 28 15:38:28 2002 > > >> --- /Users/vajda/tmp/jde-2.2.9beta12/lisp/jde-run.el Tue Sep > 10 > > >> 19:24:54 2002 > > >> *************** source buffer belongs." > > >> *** 681,698 **** > > >> (let ((jdk-dir (jde-get-jdk-dir))) > > >> (if jdk-dir > > >> (progn > > >> ! (cond ((eq system-type 'darwin) > > >> ! (setq vm-path "/usr/bin/java")) > > >> ! (t (setq vm-path > > >> ! (expand-file-name > > >> ! (if (eq system-type 'windows-nt) > > >> ! "bin/javaw.exe" > > >> ! "bin/java") > > >> ! jdk-dir)))) > > >> ! (if (file-exists-p vm-path) > > >> ! vm-path > > >> ! (error (format "Invalid vm path %s" > > >> ! vm-path)))) > > >> (if (executable-find "java") > > >> (if (eq system-type 'windows-nt) "javaw" > "java") > > >> (error "Cannot find a Java vm.")))) > > >> --- 681,696 ---- > > >> (let ((jdk-dir (jde-get-jdk-dir))) > > >> (if jdk-dir > > >> (progn > > >> ! (setq vm-path > > >> ! (expand-file-name > > >> ! (if (eq system-type 'windows-nt) > > >> ! "bin/javaw.exe" > > >> ! "bin/java") > > >> ! jdk-dir)) > > >> ! (if (file-exists-p vm-path) > > >> ! vm-path > > >> ! (error (format "Invalid vm path %s" > > >> ! vm-path)))) > > >> (if (executable-find "java") > > >> (if (eq system-type 'windows-nt) "javaw" > "java") > > >> (error "Cannot find a Java vm.")))) > > >> > > >> > > >> I also learned that the JDE will work a LOT better > > >> if the JDE .emacs setup is as follows (delaying JDE load): > > >> > > >> ;;jde (takes care of loading speedbar, eieio, semantic) > > >> (setq defer-loading-jde t) > > >> (if defer-loading-jde > > >> (progn > > >> (autoload 'jde-mode "jde" "JDE mode." t) > > >> (setq jde-import-auto-sort t) > > >> (global-set-key "\C-c\C-v\C-o" 'jde-open-class-source) > > >> (setq auto-mode-alist > > >> (append '(("\\.java\\'" . jde-mode)) > > >> auto-mode-alist))) > > >> (require 'jde)) > > >> > > >> > > >> Voila ! > > >> Thanks for a great package ! > > >> > > >> Andi.. > > >> > > >> > > > > > > > > > > > > >
