1 eclipse如果版本过旧,安装jdk1.8之后,在eclipse
Project > Properties > Java Compiler > Compiler compliance level
是没有1.8的,这个时候需要下载eclipse最新版本
Eclipse Luna (R 4.4) has been reloaded to be ready for Java 8.
下载eclipse luna及之后的版本,就能正常编译java8 的代码了,比如新增的lambda.
2 eclipse 安装在线插件时,使用代理,但是总是连不上,查看log 显示 System property socksProxyHost is not set but
原因:原来我把eclipse network 那边 http, socks, https都设置了,但是我们公司只能使用 http代理。所以clear 掉socks 的设置就可以了。
Eclipse use SOCKS proxy before HTTP. So, if your company doesn't provide a
SOCKS proxy, you should clear it in proxy preference (then eclipse use
HTTP proxy first).
3 eclipse 添加maven插件,在线安装地址:
http://download.eclipse.org/technology/m2e/releases
and set setting.xml proxy
4 运行maven项目时,遇到错误:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: Stage
这是因为,eclipse jre的版本不对,电脑上有两个jdk, 一个open jdk 的jre , jdk的jre,eclipse 需要的是普通的jre.
修改一下 project--> build path,切换成普通的jre 就行
5 Run as java applicaiton时, 错误:
Error: Could not find or load main class main
还是因为编译时的jre版本时 open jdk 的jre,版本不匹配,
修改 Run as java applicaiton, --> run configurations --> installed Jre 就好了。
6 eclipse code 添加android format
需要找到anroid source code/development/ide/eclipse/android-formatting.xml
在eclipse windows->prences->format add
转载于:https://blog.51cto.com/yingerfei/1740393