用netbeans中的远程服务器编译javaEE应用程序

问题描述 投票:-1回答:1

我想用netbeans中的远程服务器wildfly编译我的jsf应用程序。有什么办法解决这个问题

netbeans wildfly java-ee-6 remote-server
1个回答
0
投票

    import java.sql.*; 
    import java.util.Vector; 
    import javax.swing.JFrame; 
    import javax.swing.JTable; 
    /**  *  * @author shedai  */ 
    public class NewClass {     
    Connection con;     public void close() {          
    try{               
      con.close();          
    }          
    catch(Exception e){
     }  
 } 
 
 public NewClass(){      
    try{     
      con = DriverManager.getConnection( "jdbc:mysql://localhost/deneme", "root", "" );        
    }catch(SQLException exp){         
       exp.printStackTrace();     
     }  }  
        JTable jt; 
     public void tablo(){      
        try{           
            Statement sta = con.createStatement();           
            ResultSet res = sta.executeQuery("SELECT * FROM persons");           
            Vector satirlar = new Vector();           
            Vector satir[] = new Vector[2];           
            satir[0] = new Vector();           
            satir[1] = new Vector();           
            int s = 0;           
           while (res.next()) {               
              for(int i = 1;i<6;i++){                
                 satir[s].add(res.getString(i));                 
                 System.out.println(res.getString(i));               
    }               
    s++;           
  }

也许它可以帮助您但是首先您需要安装my-sql-connector.jar,您需要将软件包安装为库

© www.soinside.com 2019 - 2024. All rights reserved.