求add jars, add class folder的不同

heqingrong623 2009-07-02 04:45:55
我想问下,eclipse在工程中加入包文件中, add jars, add class folder 这两个选项有什么不同,
同样加入同样得包,使用 add class folder 却出现找不到org.apache.struts.action.*;等文件
...全文
381 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
霜之哀伤 2009-07-02
  • 打赏
  • 举报
回复
其他包也是只在Jar包中???

这个不可能吧,肯定是是什么地方已经把其他Jar包加上了。
heqingrong623 2009-07-02
  • 打赏
  • 举报
回复
意思是,,为什么用add class folder 其他加进去得包可以找到,却找不到org.apache.struts.action这些类包呢
霜之哀伤 2009-07-02
  • 打赏
  • 举报
回复
单纯的Jar包必须用add jars添加。
霜之哀伤 2009-07-02
  • 打赏
  • 举报
回复
class folder是目录的啊,相当于添加解压后的jar包。
视频人脸识别,取代jmf。。。 Introduction JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of computer vision (OpenCV, FFmpeg, libdc1394, PGR FlyCapture, OpenKinect, librealsense, CL PS3 Eye Driver, videoInput, ARToolKitPlus, and flandmark), and provides utility classes to make their functionality easier to use on the Java platform, including Android. JavaCV also comes with hardware accelerated full-screen image display (CanvasFrame and GLCanvasFrame), easy-to-use methods to execute code in parallel on multiple cores (Parallel), user-friendly geometric and color calibration of cameras and projectors (GeometricCalibrator, ProCamGeometricCalibrator, ProCamColorCalibrator), detection and matching of feature points (ObjectFinder), a set of classes that implement direct image alignment of projector-camera systems (mainly GNImageAligner, ProjectiveTransformer, ProjectiveColorTransformer, ProCamTransformer, and ReflectanceInitializer), a blob analysis package (Blobs), as well as miscellaneous functionality in the JavaCV class. Some of these classes also have an OpenCL and OpenGL counterpart, their names ending with CL or starting with GL, i.e.: JavaCVCL, GLCanvasFrame, etc. To learn how to use the API, since documentation currently lacks, please refer to the Sample Usage section below as well as the sample programs, including two for Android (FacePreview.java and RecordActivity.java), also found in the samples directory. You may also find it useful to refer to the source code of ProCamCalib and ProCamTracker as well as examples ported from OpenCV2 Cookbook and the associated wiki pages. Please keep me informed of any updates or fixes you make to the code so that I may integrate them into the next release. Thank you! And feel free to ask questions on the mailing list if you encounter any problems with the software! I am sure it is far from perfect... Downloads To install manually the JAR files, obtain the following archives and follow the instructions in the Manual Installation section below. JavaCV 1.3.3 binary archive javacv-platform-1.3.3-bin.zip (212 MB) JavaCV 1.3.3 source archive javacv-platform-1.3.3-src.zip (456 KB) The binary archive contains builds for Android, Linux, Mac OS X, and Windows. The JAR files for specific child modules or platforms can also be obtained individually from the Maven Central Repository. We can also have everything downloaded and installed automatically with: Maven (inside the pom.xml file) org.bytedeco javacv-platform ersion>1.3.3ersion> Gradle (inside the build.gradle file) dependencies { compile group: 'org.bytedeco', name: 'javacv-platform', version: '1.3.3' } sbt (inside the build.sbt file) libraryDependencies += "org.bytedeco" % "javacv-platform" % "1.3.3" This downloads binaries for all platforms, but to get binaries for only one platform we can set the javacpp.platform system property (via the -D command line option) to something like android-arm, linux-x86_64, macosx-x86_64, windows-x86_64, etc. Please refer to the README.md file of the JavaCPP Presets for details. Another option available for Scala users is sbt-javacv. Required Software To use JavaCV, you will first need to download and install the following software: An implementation of Java SE 7 or newer: OpenJDK http://openjdk.java.net/install/ or Sun JDK http://www.oracle.com/technetwork/java/javase/downloads/ or IBM JDK http://www.ibm.com/developerworks/java/jdk/ Further, although not always required, some functionality of JavaCV also relies on: CL Eye Platform SDK (Windows only) http://codelaboratories.com/downloads/ Android SDK API 14 or newer http://developer.android.com/sdk/ JOCL and JOGL from JogAmp http://jogamp.org/ Finally, please make sure everything has the same bitness: 32-bit and 64-bit modules do not mix under any circumstances. Manual Installation Simply put all the desired JAR files (opencv*.jar, ffmpeg*.jar, etc.), in addition to javacpp.jar and javacv.jar, somewhere in your class path. Here are some more specific instructions for common cases: NetBeans (Java SE 7 or newer): In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...". Locate the JAR files, select them, and click OK. Eclipse (Java SE 7 or newer): Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs...". Locate the JAR files, select them, and click OK. IntelliJ IDEA (Android 4.0 or newer): Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/ Copy all the JAR files into the app/libs subdirectory. Navigate to File > Project Structure > app > Dependencies, click +, and select "2 File dependency". Select all the JAR files from the libs subdirectory. After that, the wrapper classes for OpenCV and FFmpeg, for example, can automatically access all of their C/C++ APIs: OpenCV documentation FFmpeg documentation Sample Usage The class definitions are basically ports to Java of the original header files in C/C++, and I deliberately decided to keep as much of the original syntax as possible. For example, here is a method that tries to load an image file, smooth it, and save it back to disk: import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; import static org.bytedeco.javacpp.opencv_imgcodecs.*; public class Smoother { public static void smooth(String filename) { IplImage image = cvLoadImage(filename); if (image != null) { cvSmooth(image, image); cvSaveImage(filename, image); cvReleaseImage(image); } } } JavaCV also comes with helper classes and methods on top of OpenCV and FFmpeg to facilitate their integration to the Java platform. Here is a small demo program demonstrating the most frequently useful parts: import java.io.File; import java.net.URL; import org.bytedeco.javacv.*; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.indexer.*; import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; import static org.bytedeco.javacpp.opencv_calib3d.*; import static org.bytedeco.javacpp.opencv_objdetect.*; public class Demo { public static void main(String[] args) throws Exception { String classifierName = null; if (args.length > 0) { classifierName = args[0]; } else { URL url = new URL("https://raw.github.com/Itseez/opencv/2.4.0/data/haarcascades/haarcascade_frontalface_alt.xml"); File file = Loader.extractResource(url, null, "classifier", ".xml"); file.deleteOnExit(); classifierName = file.getAbsolutePath(); } // Preload the opencv_objdetect module to work around a known bug. Loader.load(opencv_objdetect.class); // We can "cast" Pointer objects by instantiating a new object of the desired class. CvHaarClassifierCascade classifier = new CvHaarClassifierCascade(cvLoad(classifierName)); if (classifier.isNull()) { System.err.println("Error loading classifier file \"" + classifierName + "\"."); System.exit(1); } // The available FrameGrabber classes include OpenCVFrameGrabber (opencv_videoio), // DC1394FrameGrabber, FlyCaptureFrameGrabber, OpenKinectFrameGrabber, OpenKinect2FrameGrabber, // RealSenseFrameGrabber, PS3EyeFrameGrabber, VideoInputFrameGrabber, and FFmpegFrameGrabber. FrameGrabber grabber = FrameGrabber.createDefault(0); grabber.start(); // CanvasFrame, FrameGrabber, and FrameRecorder use Frame objects to communicate image data. // We need a FrameConverter to interface with other APIs (Android, Java 2D, or OpenCV). OpenCVFrameConverter.ToIplImage converter = new OpenCVFrameConverter.ToIplImage(); // FAQ about IplImage and Mat objects from OpenCV: // - For custom raw processing of data, createBuffer() returns an NIO direct // buffer wrapped around the memory pointed by imageData, and under Android we can // also use that Buffer with Bitmap.copyPixelsFromBuffer() and copyPixelsToBuffer(). // - To get a BufferedImage from an IplImage, or vice versa, we can chain calls to // Java2DFrameConverter and OpenCVFrameConverter, one after the other. // - Java2DFrameConverter also has static copy() methods that we can use to transfer // data more directly between BufferedImage and IplImage or Mat via Frame objects. IplImage grabbedImage = converter.convert(grabber.grab()); int width = grabbedImage.width(); int height = grabbedImage.height(); IplImage grayImage = IplImage.create(width, height, IPL_DEPTH_8U, 1); IplImage rotatedImage = grabbedImage.clone(); // Objects allocated with a create*() or clone() factory method are automatically released // by the garbage collector, but may still be explicitly released by calling release(). // You shall NOT call cvReleaseImage(), cvReleaseMemStorage(), etc. on objects allocated this way. CvMemStorage storage = CvMemStorage.create(); // The OpenCVFrameRecorder class simply uses the CvVideoWriter of opencv_videoio, // but FFmpegFrameRecorder also exists as a more versatile alternative. FrameRecorder recorder = FrameRecorder.createDefault("output.avi", width, height); recorder.start(); // CanvasFrame is a JFrame containing a Canvas component, which is hardware accelerated. // It can also switch into full-screen mode when called with a screenNumber. // We should also specify the relative monitor/camera response for proper gamma correction. CanvasFrame frame = new CanvasFrame("Some Title", CanvasFrame.getDefaultGamma()/grabber.getGamma()); // Let's create some random 3D rotation... CvMat randomR = CvMat.create(3, 3), randomAxis = CvMat.create(3, 1); // We can easily and efficiently access the elements of matrices and images // through an Indexer object with the set of get() and put() methods. DoubleIndexer Ridx = randomR.createIndexer(), axisIdx = randomAxis.createIndexer(); axisIdx.put(0, (Math.random()-0.5)/4, (Math.random()-0.5)/4, (Math.random()-0.5)/4); cvRodrigues2(randomAxis, randomR, null); double f = (width + height)/2.0; Ridx.put(0, 2, Ridx.get(0, 2)*f); Ridx.put(1, 2, Ridx.get(1, 2)*f); Ridx.put(2, 0, Ridx.get(2, 0)/f); Ridx.put(2, 1, Ridx.get(2, 1)/f); System.out.println(Ridx); // We can allocate native arrays using constructors taking an integer as argument. CvPoint hatPoints = new CvPoint(3); while (frame.isVisible() && (grabbedImage = converter.convert(grabber.grab())) != null) { cvClearMemStorage(storage); // Let's try to detect some faces! but we need a grayscale image... cvCvtColor(grabbedImage, grayImage, CV_BGR2GRAY); CvSeq faces = cvHaarDetectObjects(grayImage, classifier, storage, 1.1, 3, CV_HAAR_FIND_BIGGEST_OBJECT | CV_HAAR_DO_ROUGH_SEARCH); int total = faces.total(); for (int i = 0; i < total; i++) { CvRect r = new CvRect(cvGetSeqElem(faces, i)); int x = r.x(), y = r.y(), w = r.width(), h = r.height(); cvRectangle(grabbedImage, cvPoint(x, y), cvPoint(x+w, y+h), CvScalar.RED, 1, CV_AA, 0); // To access or pass as argument the elements of a native array, call position() before. hatPoints.position(0).x(x-w/10) .y(y-h/10); hatPoints.position(1).x(x+w*11/10).y(y-h/10); hatPoints.position(2).x(x+w/2) .y(y-h/2); cvFillConvexPoly(grabbedImage, hatPoints.position(0), 3, CvScalar.GREEN, CV_AA, 0); } // Let's find some contours! but first some thresholding... cvThreshold(grayImage, grayImage, 64, 255, CV_THRESH_BINARY); // To check if an output argument is null we may call either isNull() or equals(null). CvSeq contour = new CvSeq(null); cvFindContours(grayImage, storage, contour, Loader.sizeof(CvContour.class), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); while (contour != null && !contour.isNull()) { if (contour.elem_size() > 0) { CvSeq points = cvApproxPoly(contour, Loader.sizeof(CvContour.class), storage, CV_POLY_APPROX_DP, cvContourPerimeter(contour)*0.02, 0); cvDrawContours(grabbedImage, points, CvScalar.BLUE, CvScalar.BLUE, -1, 1, CV_AA); } contour = contour.h_next(); } cvWarpPerspective(grabbedImage, rotatedImage, randomR); Frame rotatedFrame = converter.convert(rotatedImage); frame.showImage(rotatedFrame); recorder.record(rotatedFrame); } frame.dispose(); recorder.stop(); grabber.stop(); } } Furthermore, after creating a pom.xml file with the following content: ersion>4.0.0ersion> org.bytedeco.javacv demo ersion>1.3.3ersion> org.bytedeco javacv-platform ersion>1.3.3ersion> And by placing the source code above in src/main/java/Demo.java, we can use the following command to have everything first installed automatically and then executed by Maven: $ mvn compile exec:java -Dexec.mainClass=Demo Build Instructions If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, the project files were created for: Maven 3.x http://maven.apache.org/download.html JavaCPP 1.3 https://github.com/bytedeco/javacpp JavaCPP Presets 1.3 https://github.com/bytedeco/javacpp-presets Once installed, simply call the usual mvn install command for JavaCPP, its Presets, and JavaCV. By default, no other dependencies than a C++ compiler for JavaCPP are required. Please refer to the comments inside the pom.xml files for further details. Project lead: Samuel Audet [samuel.audet at gmail.com](mailto:samuel.audet at gmail.com) Developer site: https://github.com/bytedeco/javacv Discussion group: http://groups.google.com/group/javacv
================================================================================ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ Apache Tomcat Version 7.0.57 Release Notes ========= CONTENTS: ========= * Dependency Changes * API Stability * JNI Based Applications * Bundled APIs * Web application reloading and static fields in shared libraries * Tomcat on Linux * Enabling SSI and CGI Support * Security manager URLs * Symlinking static resources * Viewing the Tomcat Change Log * Cryptographic software notice * When all else fails =================== Dependency Changes: =================== Tomcat 7.0 is designed to run on Java SE 6 and later. In addition, Tomcat 7.0 uses the Eclipse JDT Java compiler for compiling JSP pages. This means you no longer need to have the complete Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment (JRE) is sufficient. The Eclipse JDT Java compiler is bundled with the binary Tomcat distributions. Tomcat can also be configured to use the compiler from the JDK to compile JSPs, or any other Java compiler supported by Apache Ant. ============== API Stability: ============== The public interfaces for the following classes are fixed and will not be changed at all during the remaining lifetime of the 7.x series: - javax/**/* The public interfaces for the following classes may be added to in order to resolve bugs and/or add new features. No existing interface will be removed or changed although it may be deprecated. - org/apache/catalina/* - org/apache/catalina/comet/* Note: As Tomcat 7 matures, the above list will be added to. The list is not considered complete at this time. The remaining classes are considered part of the Tomcat internals and may change without notice between point releases. ======================= JNI Based Applications: ======================= Applications that require native libraries must ensure that the libraries have been loaded prior to use. Typically, this is done with a call like: static { System.loadLibrary("path-to-library-file"); } in some class. However, the application must also ensure that the library is not loaded more than once. If the above code were placed in a class inside the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the application were reloaded, the loadLibrary() call would be attempted a second time. To avoid this problem, place classes that load native libraries outside of the web application, and ensure that the loadLibrary() call is executed only once during the lifetime of a particular JVM. ============= Bundled APIs: ============= A standard installation of Tomcat 7.0 makes all of the following APIs available for use by web applications (by placing them in "lib"): * annotations-api.jar (Annotations package) * catalina.jar (Tomcat Catalina implementation) * catalina-ant.jar (Tomcat Catalina Ant tasks) * catalina-ha.jar (High availability package) * catalina-tribes.jar (Group communication) * ecj-4.4.jar (Eclipse JDT Java compiler) * el-api.jar (EL 2.2 API) * jasper.jar (Jasper 2 Compiler and Runtime) * jasper-el.jar (Jasper 2 EL implementation) * jsp-api.jar (JSP 2.2 API) * servlet-api.jar (Servlet 3.0 API) * tomcat7-websocket.jar (WebSocket 1.1 implementation) * tomcat-api.jar (Interfaces shared by Catalina and Jasper) * tomcat-coyote.jar (Tomcat connectors and utility classes) * tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP) * tomcat-jdbc.jar (Tomcat's database connection pooling solution) * tomcat-util.jar (Various utilities) * websocket-api.jar (WebSocket 1.1 API) You can make additional APIs available to all of your web applications by putting unpacked classes into a "classes" directory (not created by default), or by placing them in JAR files in the "lib" directory. To override the XML parser implementation or interfaces, use the endorsed mechanism of the JVM. The default configuration defines JARs located in "endorsed" as endorsed. ================================================================ Web application reloading and static fields in shared libraries: ================================================================ Some shared libraries (many are part of the JDK) keep references to objects instantiated by the web application. To avoid class loading related problems (ClassCastExceptions, messages indicating that the classloader is stopped, etc.), the shared libraries state should be reinitialized. Something which might help is to avoid putting classes which would be referenced by a shared static field in the web application classloader, and putting them in the shared classloader instead (JARs should be put in the "lib" folder, and classes should be put in the "classes" folder). ================ Tomcat on Linux: ================ GLIBC 2.2 / Linux 2.4 users should define an environment variable: export LD_ASSUME_KERNEL=2.2.5 Redhat Linux 9.0 users should use the following setting to avoid stability problems: export LD_ASSUME_KERNEL=2.4.1 There are some Linux bugs reported against the NIO sendfile behavior, make sure you have a JDK that is up to date, or disable sendfile behavior in the Connector.
6427312: (fc) FileChannel.transferTo() throws IOException "system call interrupted"
5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN instead throws IOException
6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 2GB boundary
6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause "Value too large" exception
============================= Enabling SSI and CGI Support: ============================= Because of the security risks associated with CGI and SSI available to web applications, these features are disabled by default. To enable and configure CGI support, please see the cgi-howto.html page. To enable and configue SSI support, please see the ssi-howto.html page. ====================== Security manager URLs: ====================== In order to grant security permissions to JARs located inside the web application repository, use URLs of of the following format in your policy file: file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar ============================ Symlinking static resources: ============================ By default, Unix symlinks will not work when used in a web application to link resources located outside the web application root directory. This behavior is optional, and the "allowLinking" flag may be used to disable the check. ============================== Viewing the Tomcat Change Log: ============================== See changelog.html in this directory. ============================= Cryptographic software notice ============================= This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See for more information. The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code. The following provides more details on the included cryptographic software: - Tomcat includes code designed to work with JSSE - Tomcat includes code designed to work with OpenSSL ==================== When all else fails: ==================== See the FAQ http://tomcat.apache.org/faq/
================================================================================ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ Apache Tomcat Version 8.0.15 Release Notes ========= CONTENTS: ========= * Dependency Changes * API Stability * Bundled APIs * Web application reloading and static fields in shared libraries * Security manager URLs * Symlinking static resources * Viewing the Tomcat Change Log * Cryptographic software notice * When all else fails =================== Dependency Changes: =================== Tomcat 8.0 is designed to run on Java SE 7 and later. ============== API Stability: ============== The public interfaces for the following classes are fixed and will not be changed at all during the remaining lifetime of the 8.x series: - All classes in the javax namespace The public interfaces for the following classes may be added to in order to resolve bugs and/or add new features. No existing interface method will be removed or changed although it may be deprecated. - org.apache.catalina.* (excluding sub-packages) Note: As Tomcat 8 matures, the above list will be added to. The list is not c

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧