это решено, я скучаю по файлу common-compress .. спасибо за вашу помощь.

аюсь сделать документ Word, используя Apache POI 4.0.0, но я получаю ошибку

Исключение в потоке "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org / apache / commons / compress / archivers / zip / ZipFile в org.apache.poi.openxml4j.opc.OPCPackage.create (OPCPackage.java:365) по адресу org.apache.poi.xwpf.usermodel.XWPFDocument.newPackage (XWPFDocument.java:158) по адресу org.apache.poi.xwpf.usermodel.XWPFDocument. (XWPFDocument.java:149) в модели. Java: 32) в view.Frame_surat.cetak_dan_simpanActionPerformed (Frame_surat.java:414) в view.Frame_surat.access $ 400 (Frame_surat.java:23) в view.Frame_surat $ 5.actionPerformed (Frame_surat.jav:2ing в java:2ing). AbstractButton.fireActionPerformed (AbstractButton.java:2022) в javax.swing.AbstractButton $ Handler.actionPerformed (AbstractButton.java:2348) в javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.javton.set.dll) at40 (DefaultButtonModel.java:259) в javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonListener.java:252) в java.awt.Compo nent.processMouseEvent (Component.java:6533) в javax.swing.JComponent.processMouseEvent (JComponent.java:3324) в java.awt.Component.processEvent (Component.java:6298) в java.awt.Container.processEvent (Container) .java: 2238) в java.awt.Component.dispatchEventImpl (Component.java:4889) в java.awt.Container.dispatchEventImpl (Container.java:2296) в java.awt.Component.dispatchEvent (Component.java:4711). в java.awt.LightweightDispatcher.retargetMouseEvent (Container.java:4897) в java.awt.LightweightDispatcher.processMouseEvent (Container.java:4534) в java.awt.LightweightDispatcher.dispatchEvent (Container.java:4475) в java.awt. Container.dispatchEventImpl (Container.java:2282) в java.awt.Window.dispatchEventImpl (Window.java:2746) в java.awt.Component.dispatchEvent (Component.java:4711) в java.awt.EventQueue.duepatchEvent (Событие .java: 760) в java.awt.EventQueue.access $ 500 (EventQueue.java:97) в java.awt.EventQueue $ 3.run (EventQueue.java:709) в java.awt.EventQueue $ 3.run (EventQueue.java : 703) по адресу java.security.AccessController.doPrivileged (собственный метод) по адресу java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege (ProtectionDomain.java:80) по адресу java.security.ProtectionDomain $ JavaSecurityAccessIgeseriv.jpg java.awt.EventQueue $ 4.run (EventQueue.java:733) в java.awt.EventQueue $ 4.run (EventQueue.java:731) в java.security.AccessController.doPrivileged (собственный метод) в java.security.ProtectionDomain $ Java.awt .java: 116) в java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:105) в java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:101) в java.awt.EventDispatchThread (EventDispatchThread a: 93) в java.awt.EventDispatchThread.run (EventDispatchThread.java:82), вызванный: java.lang.ClassNotFoundException: org.apache.commons.compress.archivers.zip.ZipFile в java.net.URLClassLoader.findClass ( URLClassLoader.java:381) в java.lang.ClassLoader.loadClass (ClassLoader.java:424) в sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java:349) в java.lang.ClassLoader.loadClass (ClassLoader.j : 357) ... еще 43 цитата

я следующий учебник с этого сайта:учебные точки и я пробовал какие-либо решения из блога, форума и т. д., но у меня ничего не получалось. Это мой код:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun;
import view.Frame_surat;

/**
 *
 * @author nasution
 */
public class Model_dokumen {

    public void Cetak(Frame_surat fs) throws Exception {
        try {
            XWPFDocument document = new XWPFDocument();
//            XWPFDocument document = new XWPFDocument();//blank document
            //membuat paragraf

             //membuat dokumen surat keluar
            try (FileOutputStream outputStream = new FileOutputStream(new File("Surat_keluar.docx"))) {
                //membuat paragraf
                XWPFParagraph paragraf = document.createParagraph();
                XWPFRun run = paragraf.createRun();
                run.setText("ini adalah halaman dokumen yg baru saja dibuat menggunakan POI");
                document.write(outputStream);
            }
            JOptionPane.showMessageDialog(null, "Surat keluar berhasil dibuat");
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Model_dokumen.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Model_dokumen.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}

Ответы на вопрос(1)

Ваш ответ на вопрос