本文介绍了JavaEE / NetBeans库引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要重新修改我的。我们的服务器上有一个网站,由我们的母公司(遍布全球的台湾)使用NetBeans开发。服务器上没有任何东西来自NetBeans,没有引用,构建文件,项目文件或任何东西。只是服务器运行网站所需的必要文件。我被赋予了维护本网站的责任,因为他们不再支持我们。因此,我将整个网站从域文件夹复制/粘贴到我的本地计算机并将其导入我的NetBeans。当我进入源代码时,我得到了一大堆错误。基本上95%的 import 语句都是错误的,因为它找不到指定的符号,或者包只是不存在。

I'm going rephrase my previous question. We have a website on our server that was developed by our parent company (across the globe in Taiwan) using NetBeans. Nothing on the server is from NetBeans, no references, build files, project files, or anything. Just the necessary files the server needs to run the website. I've been given the responsibility of maintaining this website because they no longer support us. So, I copied/pasted the entire website, from the domain folder, over to my local computer and imported it into my NetBeans. As I go into the source code, I get a whole bunch of errors. Basically 95% of the import statements are erroring out because it can't find the specified "symbol", or the package simply "doesn't exist".

我尝试使用项目属性 - >库并添加库和/或JAR /文件夹,我相信源代码试图引用它...但它似乎没有做到这一点,或者我做得不对。我只需要让这些darn引用工作..这里是一个有关文件的导入语句的小列表(RecordAdd.java):

I've tried working with the Project properties -> Libraries and adding libraries and/or JAR/Folder that I believe the source code is trying to reference..but it doesn't seem to do the trick, or I'm not doing it right. I just need to get these darn references working.. here is a small list of the import statements from the file in question (RecordAdd.java):

package asp.easp;

import asp.SessionBean1;
import com.icesoft.faces.component.ext.HtmlCommandButton;
import com.icesoft.faces.component.ext.HtmlCommandLink;
import com.icesoft.faces.component.ext.HtmlDataTable;
import com.icesoft.faces.component.ext.HtmlInputText;
import com.icesoft.faces.component.ext.HtmlInputTextarea;
import com.icesoft.faces.component.ext.HtmlMessage;
import com.icesoft.faces.component.ext.HtmlOutputText;
import com.icesoft.faces.component.ext.HtmlPanelGrid;
import com.icesoft.faces.component.ext.HtmlSelectOneMenu;
import com.icesoft.faces.component.jsfcl.data.DefaultSelectedData;
import com.icesoft.faces.component.jsfcl.data.DefaultSelectionItems;
import com.icesoft.faces.component.jsfcl.data.DefaultTableDataModel;
import com.icesoft.faces.component.jsfcl.data.SelectInputDateBean;
import com.icesoft.faces.component.panelpopup.PanelPopup;
import com.icesoft.faces.component.paneltabset.PanelTab;
import com.icesoft.faces.component.paneltabset.PanelTabSet;
import com.icesoft.faces.component.selectinputdate.SelectInputDate;
import com.icesoft.faces.component.selectinputtext.SelectInputText;
import com.sun.rave.faces.data.DefaultSelectItemsArray;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import java.util.ArrayList;
import java.util.Collection;
import javax.faces.FacesException;
import javax.faces.convert.DateTimeConverter;
import javax.faces.model.ListDataModel;
import util.RecordDetailInfoBean;
import asp.ApplicationBean1;
import asp.RequestBean1;
import com.coretronic.util.DateConvert;
import com.icesoft.faces.component.ext.HtmlSelectOneRadio;
import com.icesoft.faces.component.jsfcl.data.CachedRowSetWrapperDataModel;
import com.icesoft.faces.context.effects.Appear;
import com.icesoft.faces.context.effects.Effect;
import com.sun.data.provider.impl.CachedRowSetDataProvider;
import com.sun.jsfcl.data.CachedRowSetDataModel;
import com.sun.sql.rowset.CachedRowSetXImpl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Calendar;

您可以在上一个问题的链接中看到网站文件层次结构的图片。有人可以帮助我在项目中使用这些参考资料吗?我在JavaEE方面经验很少,所以请假设我什么都不知道,因为我没有。我知道我已经提到过的东西就是我在这个工作一周后找到的东西。我可以提供有关项目的任何其他信息。非常感谢你提前。

You can see a picture of the file hierarchy of the website in the link above to my previous question. Can somebody please help me get these references working in my project? I have very little experience in JavaEE, so please assume I don't know anything, because I don't. The stuff I do know that I've mentioned is what I've come to find after working on this for a week now. I can provide any additional information you need about the project. Thank you very much in advance.

推荐答案

您应该首先确定webapp当前正在运行的应用服务器。您应该拥有相同的副本本地开发环境中的服务器。这可以是,,等。 Java EE是一个抽象 API,应用程序服务器是一个具体的实现,它包含真正的库,例如 javax。* 那些。我不做Netbeans(我是Eclipse用户),所以我不能详细介绍,但你应该至少在IDE中集成应用程序服务器并将项目作为Java EE项目导入并将其与应用程序关联服务器在那里。这样, javax。* 导入应该有效。至少,如果IDE有点聪明。

You should always first figure which application server the webapp is currently running in. You should namely have a copy of the very same server in your local development environment. That can be Tomcat 6/7, Glassfish 2/3, JBoss AS 5/6 or something. "Java EE" is an abstract API and the application server is a concrete implementation which contains the real libraries, such as the javax.* ones. I don't do Netbeans (I am an Eclipse user), so I can't go in detail, but you should at least integrate the application server in your IDE and import the project as a Java EE project and associate it with the application server in there. This way the javax.* imports should work. At least, if the IDE is a bit smart.

根据 com.sun.rave。* 导入,对于JSF的长期死亡Woodstock组件库而言,这是(幸运的是)的一部分,我猜测 webapp最初是在Netbeans 6.x(最高版本6.7)中开发的,而目标应用程序服务器是Glassfish v2。该IDE附带了一个所谓的 Visual JSF Editor ,它允许您将Web UI组件拖放到一起(并生成难以维护的代码)。我建议得到Netbeans 6.7的副本,这是Glassfish 2.1和Woodstock附带的最新版本。您可以下载。选择第二列中的一个,说Java(不是Java SE!)。这是238MB。

According the com.sun.rave.* imports, which is part of the (fortunately) for long dead Woodstock component library for JSF, I guess that the webapp was originally developed in Netbeans 6.x (max 6.7) and that target application server is Glassfish v2. That IDE shipped with a so-called Visual JSF Editor which allowed you to drag'n'drop web UI components together (and generated hard-to-maintain code). I'd suggest to get a copy of Netbeans 6.7 which was the latest which shipped with Glassfish 2.1 and Woodstock. You can download it here. Pick the one of the 2nd column, saying "Java" (not "Java SE"!). It's 238MB.

com.icesoft.faces。* 导入来自。看到这与Woodstock进口相结合,我猜测该项目曾经最后但并非最不重要的是,我强烈建议暂停大约半年或更长时间,并首先使用简单的Java EE教程/示例/项目,以便获得更好的整体想法。从零开始到JSF是一个相当陡峭和漫长的轨迹。我建议你自己完成

Good luck with maintaining the project. This is definitely not going to be easy if you haven't ever touched Java EE. If you want a bit more background info about Woodstock, check my answer on this question: Where is Visual Web Editor for JavaServer Faces on Netbeans Last but not least, I strongly recommend to take a pause of about half a year or longer and play around with simple Java EE tutorials/examples/projects first so that you get better overall idea. Going from nothing to JSF is a pretty steep and long traject. I'd suggest to get yourself through Java EE web development, where do I start and what skills do I need?

这篇关于JavaEE / NetBeans库引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 07:10