Java 包 org.apache.poi.ss.usermodel 不存在错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21064226/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 06:19:57  来源:igfitidea点击:

package org.apache.poi.ss.usermodel does not exist error

javaapache-poioracle-adfjdeveloper

提问by rockenpeace

I have a problem related to my adf application in jdeveloper 11g. When i build my application,i take these errors:

我有一个与 jdeveloper 11g 中的 adf 应用程序相关的问题。当我构建我的应用程序时,我会犯这些错误:

enter image description here

在此处输入图片说明

These errors in code-behind:

代码隐藏中的这些错误:

import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;

I have investigated this error and i have learned that this error is related to apache poi. I have controlled my application and i have poi-3.9-20121203.jarfile in my application folder :

我调查了这个错误,我了解到这个错误与 apache poi 相关。我已经控制了我的应用程序,并且我的应用程序文件夹中有poi-3.9-20121203.jar文件:

C:\roket1\ViewController\public_html\WEB-INF\lib

C:\roket1\ViewController\public_html\WEB-INF\lib

What can i do to get rid of these errors ? Thanks in advance.

我该怎么做才能摆脱这些错误?提前致谢。

采纳答案by Ashish

If you are using JDeveloper then you can add libraries to your classpath with the following:

如果您使用的是 JDeveloper,那么您可以使用以下命令将库添加到您的类路径中:

Add the JAR files you want to be in the classpath to the project's libraries. (Double click on a project to go to project settings - libraries- and shuttle the correct libraries to the right , or add your own libraries.

将您想要在类路径中的 JAR 文件添加到项目的库中。(双击一个项目进入项目设置 - 库 - 并将正确的库移到右侧,或者添加您自己的库。

回答by e.doroskevic

It looks like you haven't constructed a path with the package you are willing to use inside your project.

看起来您还没有使用您愿意在项目中使用的包构建路径。

Please refer to the following threads:

请参考以下主题:

How to set the java.library.path from Eclipse

如何从 Eclipse 设置 java.library.path

How to setup classpath in Netbeans?

如何在 Netbeans 中设置类路径?

That should resolve the problem.

那应该可以解决问题。