blob: 47fdd4e11e47ab97854243aaae316c650eda9ae7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
Initialise classpath for beanshell and checkstyle using java-config.
Gentoo specific patch.
--- jde-orig/lisp/beanshell.el
+++ jde/lisp/beanshell.el
@@ -809,6 +809,14 @@
"BeanShell intended to be used independently of any other
Emacs package.")
+(defun bsh-get-gentoo-classpath ()
+ (or bsh-classpath
+ (with-temp-buffer
+ (call-process "java-config" nil t nil "-d" "-p" "bsh")
+ (skip-chars-backward "\n")
+ (setq bsh-classpath
+ (split-string (buffer-substring (point-min) (point)) ":+")))))
+
(defmethod initialize-instance ((this bsh-standalone-bsh) &rest fields)
"Constructor for the standard bsh BeanShell instance."
(call-next-method)
@@ -845,7 +853,7 @@
bsh-vm)
(executable-find (if (eq system-type 'windows-nt) "javaw" "java"))))
- (oset this cp bsh-classpath)
+ (oset this cp (bsh-get-gentoo-classpath))
(oset this startup-dir bsh-startup-directory))
--- jde-orig/lisp/jde-bsh.el
+++ jde/lisp/jde-bsh.el
@@ -187,7 +187,7 @@
(jde-get-tools-jar)
(if ant-home (expand-file-name "lib" ant-home)))
(jde-pi-get-bsh-classpath)
- bsh-classpath
+ (bsh-get-gentoo-classpath)
(jde-expand-classpath (jde-get-global-classpath)))))))
;; Create the BeanShell wrapper object.
--- jde-orig/lisp/jde-checkstyle.el
+++ jde/lisp/jde-checkstyle.el
@@ -305,6 +305,14 @@
(format "-D%s=%s" (car prop) (cdr prop)))
jde-checkstyle-expanded-properties))
+(defun jde-checkstyle-get-gentoo-classpath ()
+ (or jde-checkstyle-classpath
+ (with-temp-buffer
+ (call-process "java-config" nil t nil "-d" "-p" "checkstyle")
+ (skip-chars-backward "\n")
+ (setq jde-checkstyle-classpath
+ (split-string (buffer-substring (point-min) (point)) ":+")))))
+
(defmethod jde-checkstyle-exec ((this jde-checkstyle-checker))
(jde-checkstyle-create-checker-buffer this)
@@ -327,9 +335,8 @@
(jde-checkstyle-get-property-args this))
(oref this :interactive-args)
(list "-classpath"
- (if jde-checkstyle-classpath
- (jde-build-classpath jde-checkstyle-classpath)
- (jde-normalize-path jde-checkstyle-jar-file)))
+ (jde-build-classpath
+ (jde-checkstyle-get-gentoo-classpath)))
(list jde-checkstyle-class)
(list "-c"
(if jde-checkstyle-style
|