Eclipse3.4 RCP-SDK编写时出现Jface包丢失,很有可能你使用了之前的Workspace。
我在重新使用一个的workspace后问题就解决了。
现在的Eclipse 3.4 英文代号念出来还真不太好听。 Ganymede…..
自己读读看吧。
Eclipse3.4 RCP-SDK编写时出现Jface包丢失,很有可能你使用了之前的Workspace。
我在重新使用一个的workspace后问题就解决了。
现在的Eclipse 3.4 英文代号念出来还真不太好听。 Ganymede…..
自己读读看吧。
最近发布了最的Pivot的RIA技术. 估计JAVA社区看JavaFX目前来说无法与Flex,SilverLight抗衡所采取的一种折中作法. 或者有文言其为JAVA APPLET的再生. 我简单的尝试了一下,其原理也许是利用了AJAX的部分原理,使applet与service通信, 另外使用了最新改良过的 Java 6 updated 10 的applet 加速方式, 把原来慢慢吞吞的JAVA APPLET 变得能与Flex之备一争的感觉.
在客户端的代码样子如下:
<FlowPane styles="{padding:4, horizontalAlignment:'center', verticalAlignment:'center'}">
<PushButton id="pushButton" buttonData="'Click Me!'"/>
</FlowPane>
而用工具包生成的字节代码的源码为如下:
/* * Copyright (c) 2008 VMware, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package pivot.tutorials.buttons; import pivot.wtk.Alert; import pivot.wtk.Application; import pivot.wtk.Button; import pivot.wtk.ButtonPressListener; import pivot.wtk.Component; import pivot.wtk.Display; import pivot.wtk.PushButton; import pivot.wtk.Window; import pivot.wtkx.ComponentLoader; public class PushButtons implements Application { private Window window = null; public void startup() throws Exception { ComponentLoader.initialize(); ComponentLoader componentLoader = new ComponentLoader(); Component content = componentLoader.load("pivot/tutorials/buttons/push_buttons.wtkx"); // Get a reference to the button and add a button press listener PushButton pushButton = (PushButton)componentLoader.getComponent("pushButton"); pushButton.getButtonPressListeners().add(new ButtonPressListener() { public void buttonPressed(Button button) { Alert.alert(Alert.Type.INFO, "You clicked me!", window); } }); window = new Window(); window.setContent(content); window.getAttributes().put(Display.MAXIMIZED_ATTRIBUTE, Boolean.TRUE); window.open(); } public void shutdown() throws Exception { window.close(); } public void suspend() throws Exception { } public void resume() throws Exception { } }
如果你安装了JRE6,可以试试它的效果,点击此处。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; public class Download { /** * @param args * @throws MalformedURLException */ public static void main(String[] args) throws Exception { URL url = new URL("http://9mmo.com/client/9mmoClient1.011.exe"); URLConnection connection = url.openConnection(); InputStream stream = connection.getInputStream(); BufferedInputStream in = new BufferedInputStream(stream); FileOutputStream file = new FileOutputStream("9mmoClient.exe"); BufferedOutputStream out = new BufferedOutputStream(file); int i; int c=0; while ((i = in.read()) != -1) { out.write(i); c++; System.out.println(c); } out.flush(); } } |
简短的小片段往往最容易学习,然后再举一反三.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||