Re: jde-import commands and GNU Emacs-22/23

2005-10-05 Thread Adrian Robert


On Oct 4, 2005, at 5:45 PM, Suraj Acharya wrote:

On the Mac jde should be looking for Classes/classes.jar in your  
JVM directory (see the
definition of jde-get-tools-jar in jde.el). Check that you have  
this file and that

system-type is 'darwin.


Thanks!

But I'm wondering why JDE works around OS X's Java compatibility  
mechanism; JDK directories like:


/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home

are set up to look to the rest of the world like an ordinary Sun JDK  
installation, and you can use:


/System/Library/Frameworks/JavaVM.framework/Home

to point to the system-set current JDK (though this would not work  
with JDE's jdk-registry mechanism).


There may have been a time when this compatibility layer was not in  
place (perhaps pre-10.2?) and the two checks in jde.el for 'system- 
type darwin' were needed, but now I think JDE should at least support  
users who have their JAVA_HOME set correctly on OS X.  Ideally the  
code would be simplified by just removing the special-casing, but in  
order to support existing installations, the following patch works  
with either setting (e.g. .../Versions/1.4.2 or .../Versions/1.4.2/ 
Home) and also attempts to support non-OS X Darwin systems.  (I did  
not test the latter.)





jde-darwin-jdk-dir.patch
Description: Binary data





Re: jde-import commands and GNU Emacs-22/23

2005-10-04 Thread Suraj Acharya
On the Mac jde should be looking for Classes/classes.jar in your JVM directory (see thedefinition of jde-get-tools-jar in jde.el). Check that you have this file and thatsystem-type is 'darwin.Suraj
On 10/4/05, Adrian Robert [EMAIL PROTECTED] wrote:
Small update:First problem (jde-import-kill-extra-imports) goes away on emacs-21.3text terminal version bundled on MacOSX.So maybe something hasaffected the lisp code in either cedit, ellib, or jde in emacs
22/23.Second problem (finding developer tools jar) remains.On Oct 4, 2005, at 1:53 PM, Adrian Robert wrote: Hi, Problem: if I try jde's 'import' commands they don't work.
 jde-import-kill-extra-imports gives: Wrong type argument: arrayp, 5 Stack trace: Debugger entered--Lisp error: (wrong-type-argument arrayp 5) substring(5 0 2)
 (let* ((import ...) (name ...) (classname ...) (case-fold-search nil) (number-of-matches ...)) (if (or ... ... ...) (setq extra- imports ...) (setq required-imports ...))) (while imports (let* (... ... ... ... ...) (if ... ... ...))
 (setq imports (cdr imports))) (save-excursion (goto-char 0) (while imports (let* ... ...) (setq imports ...)) (if (not extra-imports) (message No extra imports found) (let ... ... ... ...)))
 (let* ((packages ...) (package-imports ...) (first-import ...) extra-imports required-imports) (save-excursion (goto-char 0) (while imports ... ...) (if ... ... ...))) (if (not imports) (message No import found) (let* (... ... ...
 extra-imports required-imports) (save-excursion ... ... ...))) (let* ((tags ...) (imports ...)) (if (not imports) (message No import found) (let* ... ...))) jde-import-kill-extra-imports(nil)
 jde-import-all gives: Cannot find JDK's tools jar file (or equivalent). For this latter, I customized my JDK registry (see below) and jde- jdk is set to a directory under which lib/dt.jar can be found.I
 also tried copying this to tools.jar in the same dir. Most other import commands generate one or the other of these errors.(-collapse is an exception.)
 I've tried both a month-old Emacs 22 (Aquamacs) and a 1-week-old Emacs unicode-2 branch version of GNU emacs, with jde-2.3.5 cedet 1.0beta2b -or- cedet 1.0beta3b elib-1.0 downloaded from 
jdee.sunsite.dk All are non-byte-compiled. I used a minimal .emacs: (setq load-path (cons /usr/local/share/emacs/site-lisp load-path))
 (add-to-list 'load-path (expand-file-name /usr/local/share/emacs/ site-lisp/elib)) (load-file /usr/local/share/emacs/site-lisp/cedet-1.0beta2b/common/ cedet.el)
 (setq load-path (cons /usr/local/share/emacs/site-lisp/jde-2.3.5/ lisp load-path)) (require 'jde) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(jde-jdk-registry (quote ((1.4.2 . /System/Library/Frameworks/
 JavaVM.framework/Versions/1.4.2/Home) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right. ) Any clues appreciated.Is anyone using jde-import commands successfully with either a Macintosh and/or GNU Emacs CVS 22 or
 23?If so, which jde/cedet/elib versions, and is there anything else I should know? Alternatively, if anyone has successfully gotten an older version of jde running in emacs-20 recently, that would also be helpful
 (again, which jde/semantic/eieio/speedbar/elib)? thanks..