1. jdk for windows 32位下載地址有么,和java翻譯器下載地址。

對於第二條答案,我有補充,如果看不懂,可以換成Google瀏覽器,有自動翻譯
還有32位地址是http://download.oracle.com/otn-pub/java/jdk/7u51-b13-demos/jdk-7u51-windows-i586-demos.zip

2. java能開發windows程序嗎

JAVA開發的程序可以通過JVMforwindows在Windows上運行,但並不能用來開發Windows原生程序,正如現回在的HTML5開發的答應用可以再Andriod上運行,但並不是安卓的原生應用一樣。Java語言的一個非常重要的特點就是與平台的無關性。而使用Java虛擬機(JavaVirtualMachine)是實現這一特點的關鍵。JVM是(Java虛擬機)的縮寫,JVM是一種用於計算設備的規范,它是一個虛構出來的計算機,是通過在實際的計算機上模擬模擬各種計算機功能來實現的。一般的高級語言如果要在不同的平台上運行,至少需要編譯成不同的目標代碼。而引入Java語言虛擬機後,Java語言在不同平台上運行時不需要重新編譯。Java語言使用Java虛擬機屏蔽了與具體平台相關的信息,使得Java語言編譯程序只需生成在Java虛擬機上運行的目標代碼(位元組碼),就可以在多種平台上不加修改地運行。Java虛擬機在執行位元組碼時,把位元組碼解釋成具體平台上的機器指令執行。這就是Java的能夠「一次編譯,到處運行」的原因。

3. 如何在JAVA中調用windows

雖然JAVA是平台無關性的,但是在企業中很多時候還是在為特定的系統在開發,會要求調用一些當前系統的其他程序或命令。最常見的是在WINDOWS中。其實JAVA是可以通過Runtime去調用系統中的一些程序的,下面是一個例子:

try {
ps = Runtime.getRuntime().exec( " E:\\test.exe " );
// ps = Runtime.getRuntime().exec("ipconfig"); ---- For execute windows commands
// ps = Runtime.getRuntime().exec("E:\\test.bat"); ---- For run BAT files
BufferedReader in = new BufferedReader( new InputStreamReader(ps.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null ) {
result += inputLine + " \n " ;
}
in.close();
System.out.println( " Output: " + result);

} catch (Exception ex) {
System.out.println( " Error " + ex.getMessage());
}

上面的代碼片斷中後面一部分是在取返回的參數,如果不需要可以不取。不取的話可能也就不需要取得到Process了。用這個方法可以運行windows中的exe或者bat文件。

4. 如何用java啟動windows命令行程序

先請編譯和運行下面程序:

import java.util.*;
import java.io.*;

public class BadExecJavac2
{

public static void main(String args[])

{

try

{

Runtime rt = Runtime.getRuntime();

Process proc = rt.exec("javac");

int exitVal = proc.waitFor();

System.out.println("Process exitValue: " + exitVal);

} catch (Throwable t){

t.printStackTrace();

}

}
}

我們知道javac命令,當不帶參數運行javac
程序時,它將輸出幫助說明,為什麼上面程序不產生任何輸出並掛起,永不完成呢?java文檔上說,由於有些本地平台為標准輸入和輸出流所提供的緩沖區大小
有限,如果不能及時寫入子進程的輸入流或者讀取子進程的輸出流,可能導致子進程阻塞,甚至陷入死鎖。所以,上面的程序應改寫為:

import java.util.*;

import java.io.*;

public class MediocreExecJavac

{

public static void main(String args[])

{

try

{

Runtime rt = Runtime.getRuntime();

Process proc = rt.exec("javac");

InputStream stderr = proc.getErrorStream();

InputStreamReader isr = new InputStreamReader(stderr);

BufferedReader br = new BufferedReader(isr);

String line = null;

System.out.println("");

while ( (line = br.readLine()) != null)

System.out.println(line);

System.out.println("");

int exitVal = proc.waitFor();

System.out.println("Process exitValue: " + exitVal);

} catch (Throwable t){

t.printStackTrace();

}

}

}

下面是正確的輸出:

D:\java>java MediocreExecJavac

Usage: javac <options>

where possible options include:

-g Generate all debugging info

-g:none Generate no debugging info

-g:{lines,vars,source} Generate only some debugging info

-nowarn Generate no warnings

-verbose Output messages about what the compiler is doing

-deprecation Output source locations where deprecated APIs are used

-classpath Specify where to find user class files

-cp Specify where to find user class files

-sourcepath Specify where to find input source files

-bootclasspath Override location of bootstrap class files

-extdirs Override location of installed extensions

-endorseddirs Override location of endorsed standards path

-d Specify where to place generated class files

-encoding Specify character encoding used by source files

-source Provide source compatibility with specified release

-target Generate class files for specific VM version

-version Version information

-help Print a synopsis of standard options

-X Print a synopsis of nonstandard options

-J Pass directly to the runtime system

Process exitValue: 2

D:\java>

下面是一個更一般的程序,它用兩個線程同步清空標准錯誤流和標准輸出流,並能根據你所使用的windows操作系統選擇windows命令解釋器command.com或cmd.exe,然後執行你提供的命令。

import java.util.*;

import java.io.*;

class StreamGobbler extends Thread

{

InputStream is;

String type; //輸出流的類型ERROR或OUTPUT

StreamGobbler(InputStream is, String type)

{

this.is = is;

this.type = type;

}

public void run()

{

try

{

InputStreamReader isr = new InputStreamReader(is);

BufferedReader br = new BufferedReader(isr);

String line=null;

while ( (line = br.readLine()) != null)

{

System.out.println(type + ">" + line);

System.out.flush();

}

} catch (IOException ioe)

{

ioe.printStackTrace();

}

}

}

public class GoodWindowsExec

{

public static void main(String args[])

{

if (args.length < 1)

{

System.out.println("USAGE: java GoodWindowsExec ");

System.exit(1);

}

try

{

String osName = System.getProperty("os.name" );

System.out.println("osName: " + osName);

String[] cmd = new String[3];

if(osName.equals("Windows XP") ||osName.equals("Windows 2000"))

{

cmd[0] = "cmd.exe" ;

cmd[1] = "/C" ;

cmd[2] = args[0];

}

else if( osName.equals( "Windows 98" ) )

{

cmd[0] = "command.com" ;

cmd[1] = "/C" ;

cmd[2] = args[0];

}

Runtime rt = Runtime.getRuntime();

System.out.println("Execing " + cmd[0] + " " + cmd[1]+ " " + cmd[2]);

Process proc = rt.exec(cmd);

// any error message?

StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");

// any output?

StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");

// kick them off

errorGobbler.start();

outputGobbler.start();

// any error???

int exitVal = proc.waitFor();

System.out.println("ExitValue: " + exitVal);

} catch (Throwable t){

t.printStackTrace();

}

}

}

下面是一個測試結果:

D:\java>java GoodWindowsExec " Test.java Test1.java"

osName: Windows XP

Execing cmd.exe /C Test.java Test1.java

OUTPUT>已復制 1 個文件。

ExitValue: 0

D:\java>

下面的測試都能通過(windows xp+jdk1.5)

D:\java>java GoodWindowsExec dir

D:\java>java GoodWindowsExec Test.java

D:\java>java GoodWindowsExec regedit.exe

D:\java>java GoodWindowsExec NOTEPAD.EXE

D:\java>java GoodWindowsExec first.ppt

D:\java>java GoodWindowsExec second.doc

function TempSave(ElementID)

{

CommentsPersistDiv.setAttribute("CommentContent",document.getElementById(ElementID).value);

CommentsPersistDiv.save("CommentXMLStore");

}

function Restore(ElementID)

{

CommentsPersistDiv.load("CommentXMLStore");

document.getElementById(ElementID).value=CommentsPersistDiv.getAttribute("CommentContent");

}

5. 如何用JAVA快速開發WINDOWS桌面應用

java 圖形界面,主要是幾種技術來實現 AWT, Swing, SWT, JavaFX .
AWT性能好, 內存佔用小, 但是外觀不太美觀, 組件不版夠豐富
Swing 內存略大, 但是功能權擴張起來還是有點麻煩. 很長時間沒有更新了
推薦JavaFX , 新技術, 外表美觀, 功能強大, 組件豐富. webview 等新組件, 非常實用.
如果想用java快速開發windows程序 .那麼就需要推薦一些插件了
比如windowbuilder 可以對swing進行可視化開發
Scene Builder 可以對javaFX進行可視化開發

6. 用java控制windows窗口方便嗎

java控制window系統音量有兩種辦法,一是JNA或者JNI調用,二是執行VBS腳本。

這里推薦使用第二種方式,它比較靈活,控制可以放在程序內,也可以將控制文件獨立出來,便於後期維護更改。
核心代碼如下:
public static void main(String[] args){

File file = File.createTempFile("ylkz_vba",".vbs");
file.deleteOnExit();
FileWriter fw = new FileWriter(file);
String vbs ="'以下命令實現音量減(用循環可以實現一直減):\n" +
"Set WshShell = CreateObject(\"WScript.Shell\")\n" +
"WshShell.SendKeys(chr(&hAE))\n" +
"'音量增(用循環可以實現一直增):\n" +
"Set WshShell = CreateObject(\"WScript.Shell\")\n" +
"WshShell.SendKeys(chr(&hAF))";
fw.write(vbs);
fw.close();
Runtime.getRuntime().exec("wscript " + file.getPath()).waitFor();

7. java代碼可以做成windows程序嗎

JAVA開發的程序可以通過JVM for windows在Windows上運行,但並不能用來開發Windows原生程序,正如現在的HTML5開發的應用可以再Andriod上運行,但並不是安卓的原生應用一樣。

Java語言的一個非常重要的特點就是與平台的無關性。而使用Java虛擬機(Java Virtual Machine)是實現這一特點的關鍵。JVM是(Java虛擬機)的縮寫,JVM是一種用於計算設備的規范,它是一個虛構出來的計算機,是通過在實際的計算機上模擬模擬各種計算機功能來實現的。
一般的高級語言如果要在不同的平台上運行,至少需要編譯成不同的目標代碼。而引入Java語言虛擬機後,Java語言在不同平台上運行時不需要重新編譯。Java語言使用Java虛擬機屏蔽了與具體平台相關的信息,使得Java語言編譯程序只需生成在Java虛擬機上運行的目標代碼(位元組碼),就可以在多種平台上不加修改地運行。Java虛擬機在執行位元組碼時,把位元組碼解釋成具體平台上的機器指令執行。這就是Java的能夠「一次編譯,到處運行」的原因。

8. 安裝eclipse出現Java for Windows Missing

安裝eclipse出現Java for Windows Missing的原因是32位的jdk,而windows是64位版本不一致產生的。

錯誤提示如圖:

解決辦法:建議下載64位的jdk安裝後,再運行installer來安裝eclipse。

9. java可以開發windows程序嗎

JAVA開發的程序可以通過JVM for windows在Windows上運行,但並不能用來開發Windows原生程序,正如現在的版HTML5開發的應用權可以再Andriod上運行,但並不是安卓的原生應用一樣。

Java語言的一個非常重要的特點就是與平台的無關性。而使用Java虛擬機(Java Virtual Machine)是實現這一特點的關鍵。JVM是(Java虛擬機)的縮寫,JVM是一種用於計算設備的規范,它是一個虛構出來的計算機,是通過在實際的計算機上模擬模擬各種計算機功能來實現的。
一般的高級語言如果要在不同的平台上運行,至少需要編譯成不同的目標代碼。而引入Java語言虛擬機後,Java語言在不同平台上運行時不需要重新編譯。Java語言使用Java虛擬機屏蔽了與具體平台相關的信息,使得Java語言編譯程序只需生成在Java虛擬機上運行的目標代碼(位元組碼),就可以在多種平台上不加修改地運行。Java虛擬機在執行位元組碼時,把位元組碼解釋成具體平台上的機器指令執行。這就是Java的能夠「一次編譯,到處運行」的原因。