Firefly开源社区

配置Java集成开发环境(IDE)

134

积分

0

威望

0

贡献

游客

积分
134
发表于 2017-4-17 08:00:27     
本帖最后由 追求 于 2017-4-18 17:04 编辑

要想在firefly-rk3399机器上做java项目开发,大概需要解决三个主要问题:开发工具、构建工具和中文输入法,下面分别介绍。
开发工具Netbens
1、sudo apt-get install openjdk-8-jdk
2、下载netbeans 8.2、解压、修改netbeans/etc/netbeans.conf,去掉“-J-client”
3、cd bin,sudo ./netbeans
注意:oracle jdk 8环境下不能启动netbeans,没有错误也不打开图形界面
要说开发工具,大家首先想到的是eclipse,有点不幸的是,firefly-rk3399上目前只能安装3.8.1版本的eclipse,4.6或更新版本的eclipse需要自行编译部分用c写的模块,编译方法可以参考这篇文章:
https://resheim.net/2013/05/runn ... pplications-on.html

构建工具maven
3.5版本的maven可以在openjdk8下完美运行,对于一般java web项目,在oracle jdk下测试过,在openjdk下仍然正常运行。
配置maven的步骤如下:
touch /etc/profile.d/javadev.sh
mousepad /etc/profile.d/javadev.sh
在文javadev.sh文件中加入类似如下的内容:
export M2_HOME=/media/firefly/rk3399/development/shell/apache-maven-3.5.0/
export PATH=$PATH:$M2_HOME/bin
最后给javadev.sh赋权限:
cd /etc/profile.d/
chmod 777 javadev.sh

安装中文输入法
命令行方式安装:
如果忘记了名称,可以搜索一下:apt-cache search pinyin
安装智能拼音输入法:sudo apt-get install ibus-libpinyin
图形界面方式安装:
通过软件商店安装,software->搜索“pinyin”->Install
配置:Settings->IBus Preferences->Input Method->Add->Chinese->Intelligent Pinyin->Add
回复

使用道具 举报

134

积分

0

威望

0

贡献

游客

积分
134
发表于 2017-8-28 06:31:58     
eclipse的启动程序编译方法:
git clone -b R4_7 https://github.com/eclipse/rt.equinox.binaries.git
git clone -b R4_7 https://github.com/eclipse/rt.equinox.framework.git

sudo apt-get install gtk+-2.0

cd  rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk
ant

cd  rt.equinox.framework/
mvn install -Pbuild-native-launchers-gtk.linux.aarch64
回复

使用道具 举报

134

积分

0

威望

0

贡献

游客

积分
134
发表于 2017-10-18 20:22:43     
swt的编译方法:

git clone -b R4_7_1a https://github.com/eclipse/eclipse.platform.swt.git
git clone -b R4_7_1a https://github.com/eclipse/eclipse.platform.swt.binaries.git

cd eclipse.platform.swt/bundles/org.eclipse.swt
ant -f buildSWT.xml build_libraries -Dswt.ws=gtk -Dswt.os=linux -Dswt.arch=aarch64

错误:
1、         [exec] make_linux.mak:165: recipe for target 'os.o' failed
     [exec] -e *** GTK2 Build failed.
     [exec] In file included from os_structs.h:19:0,
     [exec]                  from os.c:20:
     [exec] os.h:79:34: fatal error: X11/extensions/XTest.h: No such file or directory
     [exec] compilation terminated.
     [exec] make: *** [os.o] Error 1
执行 sudo apt-get install libxtst-dev

2、          [exec] <builtin>: recipe for target 'swt_awt.o' failed
     [exec] -e *** GTK2 Build failed.
     [exec] In file included from swt_awt.c:13:0:
     [exec] /home/firefly/program/jdk1.8.0_144//include/linux/jawt_md.h:31:27: fatal error: X11/Intrinsic.h: No such file or directory
     [exec] compilation terminated.
     [exec] make: *** [swt_awt.o] Error 1
$ sudo apt-get install apt-file
$ sudo apt-file update
  libxt-dev: /usr/include/X11/Intrinsic.h
$ sudo apt-get install libxt-dev

cd eclipse.platform.swt.binaries
mvn install -Pbuild-individual-bundles
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表