javaµ÷ÓÃÍⲿ³ÌÐò ±ØÉ± ·¾¶¿Õ¸ñûÓÐÎÊÌâ
javaµ÷ÓÃÍⲿ³ÌÐò ±ØÉ± ·¾¶¿Õ¸ñûÓÐÎÊÌâ
Runtime rt = Runtime.getRuntime();
srcFile.getName();
try {
String cmd[]={"cmd","/c",srcFile.getAbsolutePath()};
rt.exec(cmd);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Ïà¹ØÎĵµ£º
java¼¯ºÏ¿ò¼Üͼ¼°½éÉÜ
ת×Ô:http://hi.baidu.com/%C9%AE_%CC%C6/blog/item/9e2a8b0887008a8ad0581b3d.html
¼ò»¯Í¼£º
Javaƽ̨ÌṩÁËÒ»¸öÈ«Ðµļ¯ºÏ¿ò¼Ü¡£“¼¯ºÏ¿ò¼Ü”Ö÷ÒªÓÉÒ»×éÓÃÀ´²Ù×÷¶ÔÏóµÄ½Ó¿Ú×é³É¡£²»Í¬½Ó¿ÚÃèÊöÒ»×鲻ͬÊý¾ÝÀàÐÍ¡£
Java 2¼¯ºÏ¿ò¼Üͼ
¼¯ºÏ½Ó¿Ú£º6¸ö½Ó¿Ú£¨¶ÌÐéÏß±íʾ£©£¬±íʾ²»Í ......
ÈçºÎÈ¡µÄJavaÔ´´úÂëÎļþÖÐÎļþÃûºÍÐкţº£©
ÔÚC/C++µÄ³ÌÐò£¬±àÒëÆ÷ÌṩÁËÁ½¸öºêÀ´Ö§³ÖÈ¡µÃÔ´ÎļþÖеÄÐкźÍÎļþÃû£¬ÕâÁ½¸öºêÊÇ__FILE__,__LINE__
Äã¿ÉÒÔÈçÏµķ½·¨´òÓ¡ÐкźÍÎļþÃû
²é¿´Ô´´úÂë
´òÓ¡°ïÖú
1 #include <stdio.h>
2 int main()
3 {
4&nbs ......
×ܹ²Á½¸öÎļþTaxTest.javaÓëTax.java
---------------------------------------------------------------------------------------
TaxTest.java
===========================================
import javax.swing.JOptionPane;
public class TestTax{
public static void main(String[] args){
String yea ......
˵Ã÷:±¾ÎĵÄÊÊÓöÔÏóΪjava³õѧÕß¡¢Èç¹ûÓжÁÕß·¢ÏÖÎÄÕÂÖÐÓÐÐðÊö²»Í×Ö®´¦£¬ÇëÖ¸Õý¡£
½ñÌìÔÚÂÛ̳ÉÏÓÐÈËÌáÁËÒ»¸ö¹ØÓÚjavaÖе÷Óú¯ÊýʱÓÐûÓÐÒýÓô«µÝµÄÎÊÌâ,¿ÉνÊdz³µÄ²»¿É¿ª½»¡£ÓÐÈË˵javaÖ»ÓÐÖµ´«µÝ,Ò²ÓÐÈË˵java¼ÈÓÐÖµ´«µÝÒ²ÓÐÒýÓô«µÝ,ÄÇôjavaÖе½µ×ÓÐûÓÐÒýÓô«µÝÄØ£¬ÏÂÃæÎÒÀ´·ÖÎöһϡ£
Ò»¡¢Ê×ÏÈÀ´Ã÷È·Ò»ÏÂ"Öµ´«µÝ" ......