我想在java中读取一个word文件
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hpsf.DocumentSummaryInformation;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.extractor.*;
import org.apache.poi.hwpf.usermodel.HeaderStories;
import java.io.*;
public class ReadDocFileFromJava {
public static void main(String[] args) {
/**This is the document that you want to read using Java.**/
String fileName = "C:\\Path to file\\Test.doc";
/**Method call to read the document (demonstrate some useage of POI)**/
readMyDocument(fileName);
}
public static void readMyDocument(String fileName){
POIFSFileSystem fs = null;
try {
fs = new POIFSFileSystem(new FileInputStream(fileName));
HWPFDocument doc = new HWPFDocument(fs);
/** Read the content **/
readParagraphs(doc); …
Run Code Online (Sandbox Code Playgroud) 我在 Jenkins 上运行构建时遇到异常,构建失败的场景是项目的集成测试部分。然而,我的所有 junit 和 cucumber 测试用例在我的本地机器上都运行良好。
我在 Jenkins 服务器上收到的异常。
field - $jacocoData Exception is - java.beans.IntrospectionException: Method not found: is$jacocoData
Run Code Online (Sandbox Code Playgroud) 各位我好,我正在使用java web服务,我需要使用轴2.我按照一些教程来解决这个问题..
我遵循的步骤
1)我选择了Windows选项,然后选择了子选项 - >首选项.
2)然后我选择了轴Web服务并选择轴运行时间.
3)然后我给了我的axis2二进制文件的路径,我得到了"Axis2 Loaded successfully"消息.
4)然后我用模块2.5创建动态Web项目然后处理接下来我得到了这个错误.
我从3天开始在网上旅行,但没有找到任何解决方案.
大家好,我有一个FILE
使用FILE CLASS和FILEOUTPUTSTREAM CLASS创建的查询。我知道使用FILE CLASS我们必须使用方法名称createfile
来创建一个特定的文件,当我们使用FILEOUTPUTSTREAM CLASS时,我们在类初始化中传递字符串路径或名称,然后该文件自动创建。但是,两种情况有什么不同?
大家好,我是android新手,我试图将谷歌地图V2与我的Android应用程序连接.为此,我遵循本教程和这一个,但每当我尝试午餐我的应用程序显示以下错误.
我的MainActivity.java
package com.example.map;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.FragmentManager;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.SupportMapFragment;
@SuppressLint("NewApi")
public class MainActivity extends Activity {
static final LatLng HAMBURG = new LatLng(53.558, 9.927);
static final LatLng KIEL = new LatLng(53.551, 9.993);
private GoogleMap map;
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FragmentManager fragmentManager = getFragmentManager();
MapFragment mapFragment = …
Run Code Online (Sandbox Code Playgroud) 我用JInternal框架制作了一个java swing应用程序.当我关闭内部框架时,它应显示一条弹出消息"你确定吗?" 在"选项"窗格中.如何将事件放在JInternal框架的关闭操作中?请帮我.
java ×6
android ×1
apache ×1
axis2 ×1
doc ×1
google-maps ×1
jenkins ×1
swing ×1
web-services ×1