Java ÔÚÏ߸üгÌÐò£¨Í¨¹ýÊý¾Ý¿â»ñÈ¡¸üÐÂÎļþ£©
/*ÏȰÑÏÂÔØµÄÎļþ·ÅÔÚUpdateTempÎļþ¼ÐÖУ¬´ýÈ«²¿ÏÂÔØºó£¬ÔÙ°Ñ´ËÎļþ¼ÐÖеÄÎļþÒÆ³öÌæ»»¾ÉÎļþ*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Main.java
*
* Created on 2009-7-9, 22:29:27
*/
/**
*
* @author Administrator
*/
public class Main extends javax.swing.JFrame {
Connection cn=null;
MSConnection con=new MSConnection();
File file=null;
Vector vtFileName=new Vector();
int Process=0;
/** Creates new form Main */
public Main() {
initComponents();
this.setTitle("ÔÚÏ߸üгÌÐò");
this.setVisible(true);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //µÃµ½ÆÁÄ»µÄ³ß´ç
this.setLocation((screenSize.width)/2-150, (screenSize.height)/2-200);
// try {
// Thread.currentThread().sleep(10000);
// } catch (InterruptedException ex) {
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
// }
}
public void RunProgram(){
// String path=System.getProperty("user.dir"); //»ñȡ·¾¶
try {
String OS = System.getProperty("os.name"); //»ñÈ¡µ±Ç°²Ù×÷ϵͳ£¬Windows or Linux
// String path=System.getProperty("user.dir"); //Ȗ
Ïà¹ØÎĵµ£º
import java.io.*;
class FileTest
{
public static void main(String[] args) throws Exception
{
//File f=new File("1.txt");
//f.createNewFile();
//f.mkdir();
//File f=new File("E:\\JavaLesson\\Lesson7\\1.txt");//ÔÚWindowsϵͳÏÂ,Óþø¶Ô ......
Ò»¸öjavaÎļþÖУ¬ÓÐÇÒÖ»ÓÐÒ»¸öpublicÀà
float ff= 1.3f;(4B)
int 4B;
long 8B;
double 8B;
byte Ò»×Ö½ÚÕûÐÍ
char 2B
Êý×é
int num[] = new int[3];
int[] num;
num = new int[3];
int [] num = new int[]{1,2,3};
int [][] num;
num = new int[3][4];
//²»Í¬³¤
num = new int[3][];
num[0] = new int[5]; ......
³ö´¦£ºÀ´Ô´ÓÚCSDN ZangXT´óϺ¶Ôijƪ¹ØÓÚjavaÖÐÕ»Óë¶ÑµÄÎÄÕµĻظ´
´óÌå·ÖÎöÒ»ÏÂ
1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
//Õ»¶¼ÊÇÓÉÔËÐл·¾³À´´¦ÀíµÄ£¬Õâµã£Ã£«£«ºÍ£ê£á£ö£áûÓÐʲô²»Í¬£®¶ÔÓÚ¶Ñ£¬²»¹ý£ê£á£ö£á¶àÁ˸ö£Ç£Ã£®
2.͉˕ ......
JSP£ºjavascript ºÍ struts²¿·Ö
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td>
<span class="txt1">Èý¼¶µ¥Î»£º</span>
<html:select property="oilarea" style="width:182" styleId="area" onchange="javascript:fillWell()"&g ......
JavaÁ¬½ÓSQLiteÊý¾Ý¿âÏê½â ÏÂÔØSQLiteÊý¾Ý¿âµÄJDBC ÕâÀï¸ø³öÒ»¸öÖÐÎÄÕ¾µãµÄURL: ÉèÖû·¾³±äÁ¿£º ½«ÏÂÔØµ½µÄ°ü½âѹºóµÃµ½jar°ü sqlitejdbc-v033-nested.jar ·Åµ½%JAVA_HOME%\lib Ï£¬²¢ÇÒ½«ÆäÌí¼Óµ½classpathϵͳ»·¾³±äÁ¿ÖÐ,ÎÒµÄclasspathϵͳ»·¾³±äÁ¿ÏÖÔÚΪ: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\li ......