事象
Flex Builder 4でPHPとのデータコネクション設定を行う際に上図のエラーが発生。
使用したサンプルチュートリアル:
connect to data – Flex Test Drive | Adobe Developer Connection
Flex Builder 4でPHPとのデータコネクション設定を行う際に上図のエラーが発生。
使用したサンプルチュートリアル:
connect to data – Flex Test Drive | Adobe Developer Connection
備忘録として以下のWindows7の使用リソースの軽量化設定の手順を簡単に紹介します。
上記のメッセージはAndroidアプリをEclipseから実機でデバッグする際にDDMS上に出力されたエラーです。
[2010-06-05 15:16:21 - pokeca] Failed to upload pokeca.apk on device '11223344' [2010-06-05 15:16:21 - pokeca] java.io.IOException 発生: Unable to open sync connection! [2010-06-05 15:16:21 - pokeca] Launch canceled!
根本原因は不明ですが、対処として下記の手順を試みると解決しました。
C:\Users\yukun>adb kill-server C:\Users\yukun>adb start-server * daemon not running. starting it now * * daemon started successfully * C:\Users\yukun>
下記のコードはネットワークインターフェース情報取得し、IPv6とIPv4のアドレスを取得、表示するサンプルコードです。
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
/**
* ネットワークインターフェースの取得
*/
public class InetAddressesInfo {
private HashMap<NetworkInterface, ArrayList<InetAddress>> interfaceMap;
public InetAddressesInfo() {
interfaceMap = new HashMap<NetworkInterface, ArrayList<InetAddress>>();
}
public void getInterfaces() {
interfaceMap.clear();
try {
Enumeration<NetworkInterface> interfaceList = NetworkInterface.getNetworkInterfaces();
if (interfaceList == null) {
System.out.println("Message: No interfaces found");
} else {
while (interfaceList.hasMoreElements()) {
NetworkInterface iface = interfaceList.nextElement();
Enumeration<InetAddress> addrList = iface.getInetAddresses();
if (!addrList.hasMoreElements()) continue;
ArrayList<InetAddress> iaddress = new ArrayList<InetAddress>();
while (addrList.hasMoreElements())
iaddress.add(addrList.nextElement());
interfaceMap.put(iface, iaddress);
}
}
} catch (SocketException se) {
System.out.println("Error getting network interfaces: " + se.getMessage());
}
}
public void show() {
for (NetworkInterface n : interfaceMap.keySet()) {
System.out.println("Interface " + n.getName() + ": ");
for (InetAddress a : interfaceMap.get(n)) {
System.out.print("\tAddress " + ((a instanceof Inet4Address ? "(IPv4)"
: (a instanceof Inet6Address ? "(IPv6)" : "(?)"))));
System.out.println(": " + a.getHostAddress());
}
}
}
public HashMap<NetworkInterface, ArrayList<InetAddress>> getInterfaceMap() {
return interfaceMap;
}
public void setInterfaceMap(
HashMap<NetworkInterface, ArrayList<InetAddress>> interfaceMap) {
this.interfaceMap = interfaceMap;
}
public static void main(String[] args) {
InetAddressesInfo i = new InetAddressesInfo();
i.getInterfaces();
i.show();
}
}
Interface lo: Address (IPv6): 0:0:0:0:0:0:0:1 Address (IPv4): 127.0.0.1 Interface net4: Address (IPv6): fe80:0:0:0:0:5efe:c0a8:10a%12 Interface net5: Address (IPv6): 2001:0:4137:9e76:8ae:1cf7:3f57:fef5 Address (IPv6): fe80:0:0:0:8ae:1cf7:3f57:fef5%13 Interface eth3: Address (IPv6): 2001:c90:33d:21d4:919c:836b:2d1a:cf33 Address (IPv6): 2001:c90:33d:21d4:8856:aef1:d0bd:db64 Address (IPv6): fe80:0:0:0:919c:836b:2d1a:cf33%11 Address (IPv4): 192.168.1.10
Whilst I was working in the office today, I was asked to work jobs intermittently by colleagues and business partners. In order to finish the jobs effectively, I prioritize them. After that, I start completing them in order.
This article was corrected by Satelle in Lang-8. Thank you very much.
実は今までMac Bookに外部ディスプレイとキーボードを接続してデスクトップで開発していたのですが、Androidのエミュレータを起動していると地味に負荷が連続的にかかって発熱がひどくなってきたので、この度、Windows7 64bitのデスクトップPCを買いました。その際のAndroid開発環境のセットアップ(32bitと64bit環境)手順を以下に紹介します。
下記サイトよりJDKをダウンロード&インストール。
Java SE ダウンロード – Sun Developer Network (SDN)

ダウンロードするファイルはWindows x64 と Windows の二つ。それぞれインストールする。
64bit版 はProgram Filesフォルダに、32bit版はProgram Files (x86) フォルダにインストールされる。
C:\>java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
下記サイトよりダウンロードする。
Android SDK | Android Developers
解凍後 SDK Setup.exe を実行する。その際に下記のようなエラーが発生した場合は、
画面左部のSettingsからチェックボックス Force https://… sources to be fetched using http;//… をチェックし、使用したいSDK Versionをインストールする。
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.
下記サイトよりダウンロードする。
Eclipse Project Downloads
現在の最新バージョンのリンクをクリックすると下記ページに遷移。
Eclipse Project
画面中部の「Windows (x86_64)」が64bit版Eclipseなので、クリックしてダウンロード。
追記(2010-04-26):上記の手順の中で32bit版のJDK(with JRE)をインストールしているならば、下記の日本語版Eclipse(32bit版)を使用(pathも設定)してもOK(ちなみに私は結局この方法を採りました^^;)。
Pleiades – Eclipse プラグイン日本語化プラグイン
Eclipse のプラグインインストール画面で下記のURLを追加し、インストールする。
https://dl-ssl.google.com/android/eclipse/
Servletで処理した結果をJSPファイルに転送し、HTMLを生成する。これによって、MVCモデルにおけるViewの分離ができる。
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
ArrayList<String[]> table = new ArrayList<String[]>(); // 転送データ
<中略>
req.setAttribute("table", table);
req.getRequestDispatcher("jsp/view.jsp").forward(req, res);
上記のServletコード上のtableという変数をview.jspに渡したす場合、HttpServletRequest #setAttributeで変数を登録し、getRequestDispatcherとforwardでリクエストをフォワードする。
JSP側で登録した変数を取り出すには、下記のコードを用いる。
<% ArrayList<String[]> table = (ArrayList<String[]>)request.getAttribute("table"); %>
1.ActivePerl(ActivePerl, Download Perl for Windows, Mac, Linux, AIX, HP-UX & Solaris)
2.Apache Ant(Apache Ant – Binary Distributions)
3.Sen(sen: ドキュメント & ファイル: release)
JDBCを用いてServletからMySQLのテーブルへアクセスする過程で、DriverManager.getConnectionメソッドの呼び出しの後、NullPointerExceptionが送出された(アプリケーション・サーバーはTomcat)。
<前略>
Connection conn = null;
try {
conn = DriverManager.getConnection(URL, USER, PASS);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("<SQL文>");
<後略>
デバックトレースを行ったところ、No suitable driver found for “~”というメッセージが出力されていた。JDBC Driver のクラスパスを設定していなかった為、今回のエラーが発生した。
JDBC Driver ファイル(.jar)をクラスパスに追加する。Eclipse上での設定方法は「実行」→「実行の構成」から「クラスパス」タブ内の「ユーザー・エントリー」を選択、「外部JARの追加」ボタンから、Driverを設定する。
ありがちー、なミスをしてしまったー。
下記のコマンドを入力したら、abortされてしまった。
C:\>mksdcard 256M C:\work\sdcard\sdcard.img could not create file 'C:\work\sdcard\sdcard.img', aborting...
原因はフォルダsdcardを作成してなかった為。SDカードイメージの作成先のフォルダは予め作っておく必要がある。
フォルダ作成後改めてコマンドを入力すると上手くいった。
C:\>mksdcard 256M C:\work\sdcard\sdcard.img C:\>