Nokia N800/N810如何配置java + SWT
最近在玩Nokia的tablet...N800和N810.虽然不自带java,但可以安装一个叫jalimo的冬冬,使用cacao的javavm.不过没有swing和awt,所以要安装swt-gtk的jar.
jalimo的地址这里:
https://wiki.evolvis.org/jalimo/index.php/Main_Page
用你的N800/810去那里的maemo板块https://wiki.evolvis.org/jalimo/index.php/Maemo下载所需要的软件即可.
SWT的就相对简单了,去eclipse.org那里就有很多samples:
import org.eclipse.swt.SWT; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.*; public class SimpleSwtSample { public static void main(String[] args) { Display display = Display.getDefault(); final Shell shell = new Shell(display); shell.setLayout(new RowLayout(SWT.VERTICAL)); Label label = new Label(shell, SWT.CENTER); label.setText("Hello maemo"); Button button = new Button(shell, SWT.NONE); button.setText("close"); button.addListener(SWT.Selection, new Listener() { public void handleEvent(Event arg0) { shell.dispose(); } }); shell.open(); while (!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); } }
在你PC的eclipse里面编译后SSH或者USBcopy到N8x0,然后在x-terminal或者SSH下面运行:
cacao -cp /usr/share/java/swt-gtk.jar:. SimpleSwtSample
由于目前maemo下面还没有javacompiler,所以不能在机子上编译.
貌似有人编译成功了jikes,但需要很多的lib...偶是功力不够...幕友办法鸟~~~
有N8x0的童鞋可以试试,挺好玩的一个机子~~~有wifi,skype,flash,python,gcc,java...
相关推荐
tterminator 2014-01-06
lightindark 2011-04-16
mwx 2012-08-21
njhhack 2014-01-06
YOKOELEMENT 2014-01-06
HappinessCat 2013-06-28
netgame 2010-02-25
懒人的小窝 2012-07-23
CS笔记本 2012-07-23
likun00 2018-11-30
qingshuoyisheng 2018-11-29
luantianjiao 2016-09-05
supjia 2010-03-07
IT人士的平台 2009-01-12
CARBON 2006-10-12
优主张 2018-02-01
MATLAB 2018-01-06