Avoid link error with bean shell
Hei how do I have to configure the bean shell inside JDE (or the JDE?) to avoid to following error: Starting the BeanShell. Please wait... Beanshell expression evaluation error. Expression: jde.util.Completion.getClassInfo(org.eclipse.swt.widgets.Text); Error: // Error: // Uncaught Exception: TargetError : at Line: 11 : in file: unknown file : jde .util .Completion .getClassInfo ( org.eclipse.swt.widgets.Text ) Target exception: java.lang.UnsatisfiedLinkError: no swt-win32-2049 in java.library.path [2 times] bsh-eval: Beanshell eval error. See messages buffer for details. i.e. how do I set the corresponding property inside the JDE(bsh?) Best Regards Georg Lenz
Re: JDEE Home Page
I am running Mac OS X 10.1.5 and am trying to run the JDEE with emacs. Unfortunately emacs works fine, but the JDEE doesn't seem to run at all. I'm sure it's the way I have it configured! Of course! Firstly, I have my .emacs file in my ~/ directory. (although my emacs application runs from /usr/emacs/20.7) - 20.7 being the Darwin version. The .emacs file reads: (setq default-major-mode 'text-mode) (add-hook 'text-mode-hook 'turn-on-auto-fill) (global-font-lock-mode t) (setq gnus-button-url 'browse-url-generic browse-url-generic-program InternetExplorer browse-url-browser-function gnus-button-url) (global-set-key [(control tab)] 'bury-buffer) (iswitchb-default-keybindings) ;;JDEE setup. (setq debug-on-error t) (autoload 'speedbar-frame-mode speedbar Popup a speedbar frame t) (autoload 'speedbar-get-focus speedbar Jump to speedbar frame t) (add-to-list 'load-path (expand-file-name ~/emacs/site/jde-2.2.8/lisp)) (add-to-list 'load-path (expand-file-name ~ /emacs/site/semantic)) (add-to-list 'load-path (expand-file-name ~/emacs/site/speedbar)) (add-to-list 'load-path (expand-file-name ~/emacs/site/elib)) (add-to-list 'load-path (expand-file-name ~/emacs/site/eieio)) (require 'jde) (defun my-jde-mode-hook () (setq c-basic-offset 2)) (add-hook 'jde-mode-hook 'my-jde-mode-hook) Any help as to why this isn't working would be great. And also why it won't accept the browser, saying it cannot be found. Thanks in advance Mike
JDEE on Mac OS X (was: JDEE Home Page)
When you say that it doesn't work, what exactly isn't working? I'm a recent switcher on Mac OS X 10.2, and the first thing that I had to do was to twiddle the JDK installation. The JDEE uses the beanshell extensively and needs to be able to find tools.jar from the JDK. However, Apple has repackaged the contents of tools.jar in classes.jar. I don't think that it makes sense to patch JDEE to chase Apple's JDK, so I built an alternate structure with a more standard format. Here's what it looks like: CurrentJDK/Sun-Repro 160 $ pwd /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Sun- Repro CurrentJDK/Sun-Repro 161 $ ls -l total 8 lrwxr-xr-x 1 root wheel 11 Oct 30 11:13 bin - ../Commands drwxr-xr-x 3 root wheel 102 Oct 30 11:14 lib CurrentJDK/Sun-Repro 162 $ ls ../Commands appletviewer jarsignerjavadoc keytool policytool serialver extcheck java javahnative2ascii rmic tnameserv idlj java-rmi.cgi javapoldjava rmid jar javacjdb oldjavac rmiregistry CurrentJDK/Sun-Repro 163 $ ls -l lib total 8 lrwxr-xr-x 1 root wheel 25 Oct 30 11:14 tools.jar - ../../Classes/classes.jar Since everything is internally consistent I don't need to set JAVA_HOME for the command line, so I just set JAVA_HOME for JDEE by adding: (setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Sun- Repro) to my initialization file (~/emacs/my-osx.el in my case which I load from my .emacs). As far as emacs itself goes, I wanted a current native version, so I had to build it myself. http://members.shaw.ca/akochoi-emacs/ YMMV Dwight On Wednesday, October 30, 2002, at 08:22 AM, mike hakata wrote: I am running Mac OS X 10.1.5 and am trying to run the JDEE with emacs. Unfortunately emacs works fine, but the JDEE doesn't seem to run at all. I'm sure it's the way I have it configured! Of course! Firstly, I have my .emacs file in my ~/ directory. (although my emacs application runs from /usr/emacs/20.7) - 20.7 being the Darwin version. The .emacs file reads: (setq default-major-mode 'text-mode) (add-hook 'text-mode-hook 'turn-on-auto-fill) (global-font-lock-mode t) (setq gnus-button-url 'browse-url-generic browse-url-generic-program InternetExplorer browse-url-browser-function gnus-button-url) (global-set-key [(control tab)] 'bury-buffer) (iswitchb-default-keybindings) ;;JDEE setup. (setq debug-on-error t) (autoload 'speedbar-frame-mode speedbar Popup a speedbar frame t) (autoload 'speedbar-get-focus speedbar Jump to speedbar frame t) (add-to-list 'load-path (expand-file-name ~/emacs/site/jde-2.2.8/lisp)) (add-to-list 'load-path (expand-file-name ~ /emacs/site/semantic)) (add-to-list 'load-path (expand-file-name ~/emacs/site/speedbar)) (add-to-list 'load-path (expand-file-name ~/emacs/site/elib)) (add-to-list 'load-path (expand-file-name ~/emacs/site/eieio)) (require 'jde) (defun my-jde-mode-hook () (setq c-basic-offset 2)) (add-hook 'jde-mode-hook 'my-jde-mode-hook) Any help as to why this isn't working would be great. And also why it won't accept the browser, saying it cannot be found. Thanks in advance Mike
Re: JDEE on Mac OS X (was: JDEE Home Page)
I submitted a patch a few weeks ago to get JDE to work with Mac OS X's strange Java directory structure. Hopefully it will appear in the next version of JDE. Dwight Shih [EMAIL PROTECTED] writes: When you say that it doesn't work, what exactly isn't working? I'm a recent switcher on Mac OS X 10.2, and the first thing that I had to do was to twiddle the JDK installation. The JDEE uses the beanshell extensively and needs to be able to find tools.jar from the JDK. However, Apple has repackaged the contents of tools.jar in classes.jar. I don't think that it makes sense to patch JDEE to chase Apple's JDK, so I built an alternate structure with a more standard format. Here's what it looks like: CurrentJDK/Sun-Repro 160 $ pwd /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Sun- Repro CurrentJDK/Sun-Repro 161 $ ls -l total 8 lrwxr-xr-x 1 root wheel 11 Oct 30 11:13 bin - ../Commands drwxr-xr-x 3 root wheel 102 Oct 30 11:14 lib CurrentJDK/Sun-Repro 162 $ ls ../Commands appletviewer jarsignerjavadoc keytool policytool serialver extcheck java javahnative2ascii rmic tnameserv idlj java-rmi.cgi javapoldjava rmid jar javacjdb oldjavac rmiregistry CurrentJDK/Sun-Repro 163 $ ls -l lib total 8 lrwxr-xr-x 1 root wheel 25 Oct 30 11:14 tools.jar - ../../Classes/classes.jar Since everything is internally consistent I don't need to set JAVA_HOME for the command line, so I just set JAVA_HOME for JDEE by adding: (setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Sun- Repro) to my initialization file (~/emacs/my-osx.el in my case which I load from my .emacs). As far as emacs itself goes, I wanted a current native version, so I had to build it myself. http://members.shaw.ca/akochoi-emacs/ YMMV Dwight On Wednesday, October 30, 2002, at 08:22 AM, mike hakata wrote: I am running Mac OS X 10.1.5 and am trying to run the JDEE with emacs. Unfortunately emacs works fine, but the JDEE doesn't seem to run at all. I'm sure it's the way I have it configured! Of course! Firstly, I have my .emacs file in my ~/ directory. (although my emacs application runs from /usr/emacs/20.7) - 20.7 being the Darwin version. The .emacs file reads: (setq default-major-mode 'text-mode) (add-hook 'text-mode-hook 'turn-on-auto-fill) (global-font-lock-mode t) (setq gnus-button-url 'browse-url-generic browse-url-generic-program InternetExplorer browse-url-browser-function gnus-button-url) (global-set-key [(control tab)] 'bury-buffer) (iswitchb-default-keybindings) ;;JDEE setup. (setq debug-on-error t) (autoload 'speedbar-frame-mode speedbar Popup a speedbar frame t) (autoload 'speedbar-get-focus speedbar Jump to speedbar frame t) (add-to-list 'load-path (expand-file-name ~/emacs/site/jde-2.2.8/lisp)) (add-to-list 'load-path (expand-file-name ~ /emacs/site/semantic)) (add-to-list 'load-path (expand-file-name ~/emacs/site/speedbar)) (add-to-list 'load-path (expand-file-name ~/emacs/site/elib)) (add-to-list 'load-path (expand-file-name ~/emacs/site/eieio)) (require 'jde) (defun my-jde-mode-hook () (setq c-basic-offset 2)) (add-hook 'jde-mode-hook 'my-jde-mode-hook) Any help as to why this isn't working would be great. And also why it won't accept the browser, saying it cannot be found. Thanks in advance Mike
Problem upgrading from 2.2.8 to JDE 2.2.9beta12
I downloaded and installed all new support files listed on the install page and then updated my .emacs file, but no go. I'm sure this is just a version thing, but I can't figure it out. I've tried mixing and matching some of the older versions of speedbar, semantic, and eieio that I have, but still no luck. Probably some stupid typo on my part... any help greatly appreciated * ** ** Table of Contents ** 1 - Error ** 2 - Versions ** 3 - .emacs file ** * * ** ** 1 - Error ** * Debugger entered--Lisp error: (error Too many arguments to `defclass') signal(error (Too many arguments to `defclass')) error(Too many arguments to `defclass') (if ( 1 (length options-and-doc)) (error Too many arguments to `defclass')) (progn (aset newc class-doc (car options-and-doc)) (if ( 1 ...) (error Too many arguments to `defclass'))) (if (stringp (car options-and-doc)) (progn (aset newc class-doc ...) (if ... ...)) (let* (... ... ...) (aset newc class-options co) (if ... ... ...))) (let* ((pname ...) (newc ...) (clearparent nil)) (aset newc 0 (quote defclass)) (aset newc class-symbol cname) (if (stringp ...) (progn ... ...) (let* ... ... ...)) (if pname (progn ... ...) (if ... ... ... ... ...)) (eieio-copy-parents-into-subclass newc superclasses) (put cname (quote eieio-class-definition) newc) (while fields (let* ... ... ... ... ... ... ... ... ...) (setq fields ...)) (aset newc class-public-a (nreverse ...)) (aset newc class-public-d (nreverse ...)) (aset newc class-public-doc (nreverse ...)) (aset newc class-public-type (apply ... ...)) (aset newc class-public-custom (nreverse ...)) (aset newc class-protection (nreverse ...)) (aset newc class-initarg-tuples (nreverse ...)) (aset newc class-class-allocation-type (apply ... ...)) (aset newc class-class-allocation-values (apply ... ...)) (set cname cname) (let* (... ... ... ... ... ... ...) (while pubsyms ... ... ... ... ...) (aset newc class-symbol-obarray oa)) (fset cname (list ... ... ... ...)) (let (...) (fset csym ...)) (let (...) (fset csym ...)) (put cname (quote variable-documentation) (aref newc class-doc)) (if clearparent (aset newc class-parent nil)) (if (and ... ...) (message Bootstrapping objects...done)) (let (...) (aset cache 0 ...) (aset cache object-class cname) (aset cache object-name ...) (let ... ...) (aset newc class-default-object-cache cache)) newc) eieio-defclass(eieio-speedbar nil ((buttontype :initform nil :type symbol :documentation The type of expansion button used for objects of this class.\nPossible values are those symbols supported by the `exp-button-type' argument\nto `speedbar-make-tag-line'. :allocation :class) (buttonface :initform speedbar-tag-face :type (or symbol face) :documentation The face used on the textual part of the button for this class.\nSee `speedbar-make-tag-line' for details. :allocation :class) (expanded :initform nil :type boolean :documentation State of an object being expanded in speedbar.)) (Class which provides basic speedbar support for child classes.\nAdd one of thie child classes to this class to the parent list of a class. :abstract t)) (progn (eieio-defclass (quote eieio-speedbar) (quote nil) (quote ...) (quote ...))) (eval-and-compile (eieio-defclass (quote eieio-speedbar) (quote nil) (quote ...) (quote ...))) (defclass eieio-speedbar nil ((buttontype :initform nil :type symbol :documentation The type of expansion button used for objects of this class.\nPossible values are those symbols supported by the `exp-button-type' argument\nto `speedbar-make-tag-line'. :allocation :class) (buttonface :initform speedbar-tag-face :type ... :documentation The face used on the textual part of the button for this class.\nSee `speedbar-make-tag-line' for details. :allocation :class) (expanded :initform nil :type boolean :documentation State of an object being expanded in speedbar.)) Class which provides basic speedbar support for child classes.\nAdd one of thie child classes to this class to the parent list of a class. :abstract t) eval-buffer(#buffer *load*7 nil eieio-speedbar nil t) load-with-code-conversion(c:/cygwin/home/johns/emacs/eieio-0.17/eieio-speed bar.el eieio-speedbar nil t) require(eieio-speedbar) eval-buffer(#buffer *load*6 nil semantic-cb nil t) load-with-code-conversion(c:/cygwin/home/johns/emacs/semantic-1.4/semantic- cb.el semantic-cb nil t) require(semantic-cb) (progn (require (quote semantic-cb)) (require (quote semantic-ia-sb))) eval((progn (require (quote semantic-cb)) (require (quote semantic-ia-sb mapcar(eval ((speedbar-add-supported-extension .bnf) (progn (require ...) (require ... load-with-code-conversion(c:/cygwin/home/johns/emacs/speedbar-0.14beta4/spe edbar.el speedbar nil t) require(speedbar) eval-buffer(#buffer *load*5 nil semantic-sb nil t) load-with-code-conversion(c:/cygwin/home/johns/emacs/semantic-1.4/semantic- sb.el
[OT] Buffer loading magic?
Title: [OT] Buffer loading magic? Totally offtopic to JDE but related to emacs and Java: Can someone point me to something that would allow me to toggle between the source and unit test for a class, if my directory structure is usually something like: src com mycompany foo Bar.java test com mycompany foo BarTest.java and my tests always end in 'Test.java'? Just wondering if someone has done this or something similar. If found an elisp snippet for C to header, but that assumes the same dir and I'm not elisp literate enough to determine how best to mod the code. Thanks, James
Installing JDE on Mac OS X 10.2.1
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
Re: [OT] Buffer loading magic?
[OT] Buffer loading magic?James Higginbotham writes Can someone point me to something that would allow me to toggle between the source and unit test for a class, if wrote this a long time ago, the code sucks but it works ( i no longer use it).. just set the two variables to the source and test directories for the project, and bind the function my-java-toggle-test-buffers to a key and away you go.. if you want the test/source directory variables to change when a project changes then you will need to rename them so they have a prefix of jde- (defcustom my-java-test-directory . test case directory :type 'directory) (defcustom my-java-source-directory . directory for java classes :type 'directory) (defun my-java-toggle-test-buffers () jumps back and forth from a test buffer to the class buffer (interactive) (if (string-match \\([A-z]*\\)Test (my-java-class-name)) (my-java-jump-to-class-for-test-case) (my-java-jump-to-test-case))) (defun my-java-jump-to-class-for-test-case () jumps to a buffer containg the test case for the specified class name (interactive) (if (not (or (jde-find-class-source (my-java-class-name-for-test)) (get-buffer (concat (my-java-class-name-for-test) .java (progn (find-file (concat (file-name-directory (concat (file-name-directory my-java-source-directory) (subst-char-in-string ?. ?/ (jde-db-get-package / (my-java-class-name-for-test) .java)) (jde-gen-class)) (switch-to-buffer (get-buffer (concat (my-java-class-name-for-test) .java))) (make-directory default-directory 't))) (defun my-java-jump-to-test-case () jumps to a buffer containg the test case for the class in the current buffer (interactive) (if (not (or (jde-find-class-source (my-java-testcase-name-with-package)) (get-buffer (concat (my-java-testcase-name) .java (progn (find-file (concat (file-name-directory (concat (file-name-directory my-java-test-directory) (subst-char-in-string ?. ?/ (jde-db-get-package (my-java-testcase-name) .java)) (jde-gen-class)) (switch-to-buffer (get-buffer (concat (my-java-testcase-name) .java))) (make-directory default-directory 't))) (defun my-java-class-name-for-test () the class name that the current buffer is writing a test for (if (string-match \\([A-z]*\\)Test (my-java-class-name)) (match-string 1 (my-java-class-name)) (my-java-class-name))) (defun my-java-testcase-name () name of the current class's testcase sans the package prefix (concat (my-java-class-name) (if (not (string-match Test (my-java-class-name))) Test))) (defun my-java-testcase-name-with-package () the name of the current classe's TestCase (concat (jde-db-get-package) (my-java-testcase-name))) (defun my-java-class-name () the name of the current class sans the package prefix (file-name-sans-extension (file-name-nondirectory (buffer-file-name ;; and if you also want to easily run the current classe's test case... (defun my-java-run-associated-testcase () run the associated test case for the class specified (interactive) ;;prepend test to the class name, and keep the current package context... (let* ((jde-run-application-class junit.textui.TestRunner) (jde-run-option-application-args (list (my-java-testcase-name-with-package (jde-run-main-class) ) ) (defun my-java-testcase-name-with-package () returns the name of the current classes TestCase (concat (jde-db-get-package) (my-java-testcase-name)) ) -b - Original Message - From: James Higginbotham To: [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 6:22 PM Subject: [OT] Buffer loading magic? Totally offtopic to JDE but related to emacs and Java: Can someone point me to something that would allow me to toggle between the source and unit test for a class, if my directory structure is usually something like: src com mycompany foo Bar.java test com mycompany foo BarTest.java .and my tests always end in 'Test.java'? Just wondering if someone has done this or something similar. If found an elisp snippet for C to header, but that assumes the same dir and I'm not elisp literate enough to determine how best to mod the code. Thanks, James
Context-Sensitive Class Help
Stephan Kahnt writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi list, i try to get context-sensitive help. I added the path to the jdk 1.4 doc directory to jde-help-docsets and saved it. If I get in my source file on e.g. String and then JDE-Help-Symbol at Point, I get a buffer saying Several documentation files match your class. Select the one you want to view. Then click the OK button. but there is no class list anywhere. There is only a ok button. Please help. Thanks in advance. What version of the JDEE would you be using? Paul
Re: Context-Sensitive Class Help
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am Donnerstag, 31. Oktober 2002 07:03 schrieb Paul Kinnucan: Stephan Kahnt writes: Hi list, i try to get context-sensitive help. I added the path to the jdk 1.4 doc directory to jde-help-docsets and saved it. If I get in my source file on e.g. String and then JDE-Help-Symbol at Point, I get a buffer saying Several documentation files match your class. Select the one you want to view. Then click the OK button. but there is no class list anywhere. There is only a ok button. Please help. Thanks in advance. What version of the JDEE would you be using? JDE 2.2.7beta3 installed on SuSE 8.0. - -- Beste Grüße / Best Regards, Stephan Kahnt -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9wM6FPjwslQqbKdcRAiboAKCHx0iWUbc/opwhYhmfwHKOGENrKACfex1M bR7d0qmRk3BF6rMAxyrMqF4= =sBq9 -END PGP SIGNATURE-