Предупреждение: в безымянном пакете не найдены классы.

Итак, я пытаюсь запустить Builder:

import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_highgui.*;
import com.googlecode.javacv.CanvasFrame;

public class Smoother {


public static void main(String[] args) {

    //Load image img1 as IplImage
    final IplImage image = cvLoadImage("img1.png");

    //create canvas frame named 'Demo'
    final CanvasFrame canvas = new CanvasFrame("Demo");

    //Show image in canvas frame
    canvas.showImage(image);

    //This will close canvas frame on exit
    canvas.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);        
}    

}

Но у меня есть :

Warning: Could not load class bin.ClassMain: java.lang.NoClassDefFoundError: bin/ClassMain (wrong name: ClassMain)
Warning: No classes found in the unnamed package
JavaCPP version 0.3
Copyright (C) 2011-2012 Samuel Audet <[email protected]>
Project site: http://code.google.com/p/javacpp/

Licensed under the GNU General Public License version 2 (GPLv2) with Classpath exception.
Please refer to LICENSE.txt or http://www.gnu.org/licenses/ for details.

Usage: java -jar javacpp.jar [options] [class or package names]

where options include:

    -classpath <path>      Load user classes from path
    -d <directory>         Output all generated files to directory
    -o <name>              Output everything in a file named after given name
    -nocompile             Do not compile or delete the generated source files
    -header                Generate header file with declarations of callbacks functions
    -jarprefix <prefix>    Also create a JAR file named "<prefix>-<platform.name>.jar"
    -properties <resource> Load all properties from resource
    -propertyfile <file>   Load all properties from file
    -D<property>=<value>   Set property to value
    -Xcompiler <option>    Pass option directly to compiler

Однако я загружаю:

_ javacv: https://code.google.com/p/javacv/downloads/detail?name=javacv-0.3-bin.zip _ JDK : http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html _ OpenCV(OpenCV-2.4.3 .exe): http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.3/

В Eclipse i «Добавить внешние JAR-файлы»: _ javacpp.jar _ javacv.jar _ javacv-windows-x86_64.jar

Я также добавляю проект в путь сборки. Я добавляю "C:\opencv\build\x86\vc10\lib;C:\opencv\build\common\tbb\ia32\vc10;C:\opencv\build\x86\vc10\ staticlib;%CLASSPATH% "в CLASSPATH я добавляю " C:\opencv\build\common\tbb\ia32\vc10\;C:\opencv\build\x86\vc10\bin\;" в PATH

Если у вас есть идея решить мою проблему, мне интересно


person Nouve    schedule 06.03.2013    source источник


Ответы (1)


у вас проблемы с путем попробуйте использовать

CLASSPATH
C:\opencv\build\x86\vc10\lib;C:\opencv\buil­d\x86\vc10\staticlib;%CLASSPATH% 
PATH
C:­\opencv\build\x86\vc10\bin\; 
person MoadKey    schedule 13.04.2013