当前位置: 技术问答>java相关
50分,大家帮我配置好java&XML运行环境,可以运行就给分
来源: 互联网 发布时间:2017-04-09
本文导语: 我下载了jdom beta 8 放到d盘,先运行build.bat,然后CLASS_PATH里加入:D:jdomjdom.jar 我是菜鸟,java不会的,能不能详细点介绍一下java&XML环境怎么配置的,我把我的设置列出来: [CLASS_PATH]D:j2sdkbin;D:j2sdklibdt.jar;D:j2sdklibtools.jar;...
我下载了jdom beta 8
放到d盘,先运行build.bat,然后CLASS_PATH里加入:D:jdomjdom.jar
我是菜鸟,java不会的,能不能详细点介绍一下java&XML环境怎么配置的,我把我的设置列出来:
[CLASS_PATH]D:j2sdkbin;D:j2sdklibdt.jar;D:j2sdklibtools.jar;D:j2eelibj2ee.jar;D:jdombuildjdom.jar;D:jdomlibxerces.jar
[JAVA_HOME] D:j2sdk
[J2EE_HOME] D:j2ee
[JAVA_XML_PACK_HOME] D:java_xml_pack
[JAXM_HOME] D:java_xml_packjaxm
[JAXP_HOME] D:java_xml_packjaxp
[JAXR_HOME] D:java_xml_packjaxr
[JAXRPC_HOME] D:java_xml_packjaxrpc
[PATH] D:j2sdkbin;D:j2eebin
这是我的示例:
http://expert.csdn.net/Expert/topic/1300/1300263.xml?temp=.4268305
能够运行就给分
放到d盘,先运行build.bat,然后CLASS_PATH里加入:D:jdomjdom.jar
我是菜鸟,java不会的,能不能详细点介绍一下java&XML环境怎么配置的,我把我的设置列出来:
[CLASS_PATH]D:j2sdkbin;D:j2sdklibdt.jar;D:j2sdklibtools.jar;D:j2eelibj2ee.jar;D:jdombuildjdom.jar;D:jdomlibxerces.jar
[JAVA_HOME] D:j2sdk
[J2EE_HOME] D:j2ee
[JAVA_XML_PACK_HOME] D:java_xml_pack
[JAXM_HOME] D:java_xml_packjaxm
[JAXP_HOME] D:java_xml_packjaxp
[JAXR_HOME] D:java_xml_packjaxr
[JAXRPC_HOME] D:java_xml_packjaxrpc
[PATH] D:j2sdkbin;D:j2eebin
这是我的示例:
http://expert.csdn.net/Expert/topic/1300/1300263.xml?temp=.4268305
能够运行就给分
|
jdbc:microsoft:sqlserver://192.168.0.2:1433;user=sa;password=sa;DatabaseName=test
1000
import java.io.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Logger.global.info("Load settings from " + config_fullpath);
Document doc = db.parse(config_fullpath);
//get DB connection string
{
NodeList nl = doc.getElementsByTagName("connectionstring");
Node conn_node = nl.item(0);
DBConnString = conn_node.getFirstChild().getNodeValue();
}
//get port number
{
NodeList nl = doc.getElementsByTagName("portnumber");
Node conn_node = nl.item(0);
port = Integer.parseInt(conn_node.getFirstChild().getNodeValue());
}
only need to install jdk1.4, other lib is not required