[英]Trying to install Emacs JDEE with openjdk 6
I am trying to get JDE to auto-complete Java code. 我正在尝试使JDE自动完成Java代码。 I'm running Ubuntu and I have the following packages installed:
我正在运行Ubuntu,并且安装了以下软件包:
openjdk-6-doc openjdk-6-doc
openjdk-6-jdk openjdk-6-jdk
openjdk-6-jre openjdk-6-jre
openjdk-6-jre-headless openjdk-6-jre-headless
openjdk-6-jre-lib openjdk-6-jre-lib
openjdk-6-source openjdk-6-源
I installed JDEE "from source" (not from the package manager). 我从源(不是从软件包管理器)安装了JDEE。 I included the following in my .emacs, as suggested in another thread here (I checked the directories do exist and seem to have the right content installed with the packages above):
我在.emacs中包含了以下内容,如此处的另一个线程所建议的(我检查目录是否确实存在,并且似乎与上述软件包一起安装了正确的内容):
;;JDEE
(add-to-list 'load-path "/usr/share/emacs/site-lisp/jdee-2.4.0.1/lisp")
(setq
jde-bug-debugger-host-address "127.0.0.1"
jde-bug-jre-home "/usr/lib/jvm/java-6-openjdk"
jde-compile-option-debug (quote ("all" (t nil nil)))
jde-debugger (quote ("jdb"))
jde-global-classpath
(quote ("." "/usr/share/java/" "/usr/lib/jvm/java-6-openjdk/"))
jde-jdk-doc-url "/usr/share/doc/openjdk-6-doc/html/api/index.html"
jde-jdk-registry (quote (("1.6.0" . "/usr/lib/jvm/java-6-openjdk")))
jde-jdk (quote ("1.6.0"))
jde-regexp-jar-file "/usr/share/java/regexp.jar"
jde-sourcepath (quote (".")))
(require 'jde)
When editing a .java file, functions like Mx jde-compile work fine, local classes appear in speedbar, there is autocompletion for local classes BUT not for : for example if I type the following: 当编辑.java文件时,Mx jde-compile之类的功能可以正常工作,在速度栏中显示本地类,但本地类自动补全,但不适用于:例如,如果我键入以下内容:
import java.io.*;
import java.lang.*;
public class foo {
private String bar;
public static void main(String args[]) {
System.o
}
}
And the cursor is at 'System.o', no completion is suggested, even when I try Mx semantic-ia-complete-symbol-menu. 而且光标在“ System.o”上,即使我尝试使用Mx语义-完成-符号菜单,也没有建议完成。 (The message says "Cannot find types for "System"").
(消息显示“无法找到“系统”的类型”)。
If I type 'hello.' 如果输入“ hello”。 the menu gives me two sugestions: main or bar
菜单给了我两个建议:主菜单或酒吧菜单
I noticed that all the java (io, lang...) class files are compressed in /usr/lib/jvm/java-6-openjdk/src.zip and tried to uncompress it, with no results in emacs. 我注意到所有Java(io,lang ...)类文件都在/usr/lib/jvm/java-6-openjdk/src.zip中压缩,并尝试将其解压缩,而emacs中没有任何结果。
What am I missing? 我想念什么?
Thank you! 谢谢!
If you look at the User's guide in the "Completing Expressions" section you can find the jde-complete function. 如果您查看“完成表达式”部分中的用户指南 ,则可以找到jde-complete函数。 By default this function is bound to "Cc Cv C-."
默认情况下,此功能绑定到“ Cc Cv C-”。 .
。 Maybe you missed it.
也许你错过了。 :)
:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.