Ubuntu安装Eclipse
下载地址 选择linux版本下载,eclipse-inst-jre-linux64 (1).tar.gz
1.安装
sudo tar -zxvf eclipse-inst-jre-linux64 (1).tar.gz -C /usr/local
sudo mv eclipse-installer eclipse
sudo chown -R tarena:tarena eclipse
sudo vim eclipse.desktop
[Desktop Entry]
Encoding=UTF-8
Name=eclipse
Comment=Eclipse
Exec=/usr/local/eclipse/eclipse-inst
Icon=/usr/local/eclipse/icon.xpm
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;
sudo chown -R tarena:tarena eclipse.desktop
sudo chmod -R u+x eclipse.desktop
双击执行,安装
Eclipse使用
1.代码语法检测: 黄色波浪线,警告,但可以运行 红色波浪线,错误,不可以运行
代码自动补全: window->preferences->Java->Editor->Content Assist->Auto Activation Triggers 改为.abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
2.调节字体大小 Ctrl+shift+’+’ Ctrl+’-’
java语法
- 字符串,必须双引号
- 字节与字符串
import org.apache.hadoop.hbase.util.Bytes;
xxx
String s = new String("ss");
Bytes b = s.getBytes();
Bytes c = Bytes.toBytes(s);
|