Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiled and a new jar file created but not working #1

Open
aayush26 opened this issue Apr 19, 2016 · 1 comment
Open

Compiled and a new jar file created but not working #1

aayush26 opened this issue Apr 19, 2016 · 1 comment

Comments

@aayush26
Copy link

Using ubuntu 14. Copied all libs jar files into src.
javac -cp swt64.jar:bij.jar:ij.jar:ImageEditor.jar IrisRecognition.java

Error:

 location: class IrisRecognition
IrisRecognition.java:46: error: cannot find symbol
    private Vector <Feature[]> irisDb = new Vector(); // iris database
                    ^
  symbol:   class Feature
  location: class IrisRecognition
IrisRecognition.java:674: error: cannot find symbol
    private Sobel sobelObject;  //  @jve:decl-index=0:
            ^
  symbol:   class Sobel
  location: class IrisRecognition
IrisRecognition.java:675: error: cannot find symbol
    private NonMaxSuppression nonMaxSuppressionObject;
            ^
  symbol:   class NonMaxSuppression
  location: class IrisRecognition
IrisRecognition.java:676: error: cannot find symbol
    private HistThreshold histThresholdObject;
            ^
  symbol:   class HistThreshold
  location: class IrisRecognition
IrisRecognition.java:677: error: cannot find symbol
    private HoughLine lineHoughObject;  //  @jve:decl-index=0:
            ^
  symbol:   class HoughLine
  location: class IrisRecognition
IrisRecognition.java:688: error: cannot find symbol
    private HoughCircle houghCircle;
            ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:713: error: cannot find symbol
    private HoughCircle houghCircle2;
            ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:1011: error: cannot find symbol
    private ThreadCircle[] thc ;
            ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1022: error: cannot find symbol
    private void findCircleBruteForce(HoughCircle circleHoughObject3,
                                      ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:1042: error: cannot find symbol
    HoughCircle threadCircleHough ;
    ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:591: error: cannot find symbol
                        compareResult.setText("Iris won:\n" + Database.compare(gabor, irisDb, fileNames));
                                                              ^
  symbol: variable Database
IrisRecognition.java:758: error: cannot find symbol
        BufferedImage bufImg = AWTBufferedImageSWTImage.convertToAWT(image.getImageData());
                               ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:769: error: cannot find symbol
        sobelObject = new Sobel();
                          ^
  symbol:   class Sobel
  location: class IrisRecognition
IrisRecognition.java:770: error: cannot find symbol
        nonMaxSuppressionObject = new NonMaxSuppression();
                                      ^
  symbol:   class NonMaxSuppression
  location: class IrisRecognition
IrisRecognition.java:771: error: cannot find symbol
        histThresholdObject = new HistThreshold();
                                  ^
  symbol:   class HistThreshold
  location: class IrisRecognition
IrisRecognition.java:772: error: cannot find symbol
        lineHoughObject = new HoughLine();
                              ^
  symbol:   class HoughLine
  location: class IrisRecognition
IrisRecognition.java:773: error: cannot find symbol
        houghCircle = new HoughCircle();
                          ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:774: error: cannot find symbol
        houghCircle2 = new HoughCircle();
                           ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:798: error: cannot find symbol
        orig = Utils.extractRectangleFromArray(houghCircle.r, houghCircle.centerCords.x, 
               ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:800: error: cannot find symbol
        origcp = Utils.extractRectangleFromArray(houghCircle.r, houghCircle.centerCords.x, 
                 ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:810: error: cannot find symbol
        IrisAndPupilFullSize = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origcp,size,size));
                                                              ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:834: error: cannot find symbol
        CircleImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                     ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:855: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(acc,width,height));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:868: error: cannot find symbol
        SobelImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                    ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:879: error: cannot find symbol
        HystImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                   ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:891: error: cannot find symbol
        CircleImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                     ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:908: error: cannot find symbol
        HystImageLines = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                        ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:913: error: cannot find symbol
        int[] upper = Utils.getHalf(orig, halfHeight, width, true);
                      ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:914: error: cannot find symbol
        int[] lower = Utils.getHalf(orig, halfHeight, width, false);
                      ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:932: error: cannot find symbol
        orig = Utils.mergeArrays(upper, lower,mergePoint);
               ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:934: error: cannot find symbol
        OverlayImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                      ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:954: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(accUpper,180,rmax));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:957: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(accLower,180,rmax));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:981: error: cannot find symbol
        polFilter.filter(AWTBufferedImageSWTImage.convertToAWT(IrisAndPupilFullSize.getImageData()), imageNormalized1temp);
                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:982: error: cannot find symbol
        normalizedImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.convertToSWT(imageNormalized1temp)) ;
                                                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1002: error: cannot find symbol
        polFilter.filter(AWTBufferedImageSWTImage.convertToAWT(normalizedMask.getImageData()), imageNormalized1temp);
                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1003: error: cannot find symbol
        normalizedMask = new Image(Display.getDefault(),AWTBufferedImageSWTImage.convertToSWT(imageNormalized1temp));
                                                        ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1026: error: cannot find symbol
        thc = new ThreadCircle[variation*2];
                  ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1030: error: cannot find symbol
            thc[a] = new ThreadCircle(orig,width,height,i,a,this);
                         ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1121: error: cannot find symbol
        ij.ImagePlus imga = new ImagePlus("img", AWTBufferedImageSWTImage.convertToAWT(imgScaled.getImageData()));
                                                 ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1130: error: cannot find symbol
        ij.ImagePlus maska = new ImagePlus("mask", AWTBufferedImageSWTImage.convertToAWT(maskScaled.getImageData()));
                                                   ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1141: error: cannot find symbol
        gabor = MyGabor.filter(img, mask, imga.getWidth(), scales); //obliczamy gabora
                ^
  symbol:   variable MyGabor
  location: class IrisRecognition
IrisRecognition.java:1145: error: cannot find symbol
        for(Feature ficzer: gabor) {
            ^
  symbol:   class Feature
  location: class IrisRecognition
IrisRecognition.java:1150: error: cannot find symbol
                    AWTBufferedImageSWTImage.convertToSWT(Utils.toBufferedImage(gab.getImage()))));
                                                          ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:1150: error: cannot find symbol
                    AWTBufferedImageSWTImage.convertToSWT(Utils.toBufferedImage(gab.getImage()))));
                    ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
Note: IrisRecognition.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
46 errors
timekeeper@timekeeper:~/Downloads/IrisRecognition-master/src$ javac -cp swt64.jar:bij.jar:ij.jar:ImageEditor.jar IrisRecognition.java > errlog.txt
IrisRecognition.java:45: error: cannot find symbol
    private Feature[] gabor; //gabor coords of currently processed iris
            ^
  symbol:   class Feature
  location: class IrisRecognition
IrisRecognition.java:46: error: cannot find symbol
    private Vector <Feature[]> irisDb = new Vector(); // iris database
                    ^
  symbol:   class Feature
  location: class IrisRecognition
IrisRecognition.java:674: error: cannot find symbol
    private Sobel sobelObject;  //  @jve:decl-index=0:
            ^
  symbol:   class Sobel
  location: class IrisRecognition
IrisRecognition.java:675: error: cannot find symbol
    private NonMaxSuppression nonMaxSuppressionObject;
            ^
  symbol:   class NonMaxSuppression
  location: class IrisRecognition
IrisRecognition.java:676: error: cannot find symbol
    private HistThreshold histThresholdObject;
            ^
  symbol:   class HistThreshold
  location: class IrisRecognition
IrisRecognition.java:677: error: cannot find symbol
    private HoughLine lineHoughObject;  //  @jve:decl-index=0:
            ^
  symbol:   class HoughLine
  location: class IrisRecognition
IrisRecognition.java:688: error: cannot find symbol
    private HoughCircle houghCircle;
            ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:713: error: cannot find symbol
    private HoughCircle houghCircle2;
            ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:1011: error: cannot find symbol
    private ThreadCircle[] thc ;
            ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1022: error: cannot find symbol
    private void findCircleBruteForce(HoughCircle circleHoughObject3,
                                      ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:1042: error: cannot find symbol
    HoughCircle threadCircleHough ;
    ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:591: error: cannot find symbol
                        compareResult.setText("Iris won:\n" + Database.compare(gabor, irisDb, fileNames));
                                                              ^
  symbol: variable Database
IrisRecognition.java:758: error: cannot find symbol
        BufferedImage bufImg = AWTBufferedImageSWTImage.convertToAWT(image.getImageData());
                               ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:769: error: cannot find symbol
        sobelObject = new Sobel();
                          ^
  symbol:   class Sobel
  location: class IrisRecognition
IrisRecognition.java:770: error: cannot find symbol
        nonMaxSuppressionObject = new NonMaxSuppression();
                                      ^
  symbol:   class NonMaxSuppression
  location: class IrisRecognition
IrisRecognition.java:771: error: cannot find symbol
        histThresholdObject = new HistThreshold();
                                  ^
  symbol:   class HistThreshold
  location: class IrisRecognition
IrisRecognition.java:772: error: cannot find symbol
        lineHoughObject = new HoughLine();
                              ^
  symbol:   class HoughLine
  location: class IrisRecognition
IrisRecognition.java:773: error: cannot find symbol
        houghCircle = new HoughCircle();
                          ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:774: error: cannot find symbol
        houghCircle2 = new HoughCircle();
                           ^
  symbol:   class HoughCircle
  location: class IrisRecognition
IrisRecognition.java:798: error: cannot find symbol
        orig = Utils.extractRectangleFromArray(houghCircle.r, houghCircle.centerCords.x, 
               ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:800: error: cannot find symbol
        origcp = Utils.extractRectangleFromArray(houghCircle.r, houghCircle.centerCords.x, 
                 ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:810: error: cannot find symbol
        IrisAndPupilFullSize = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origcp,size,size));
                                                              ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:834: error: cannot find symbol
        CircleImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                     ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:855: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(acc,width,height));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:868: error: cannot find symbol
        SobelImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                    ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:879: error: cannot find symbol
        HystImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                   ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:891: error: cannot find symbol
        CircleImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(origFiltered,width,height));
                                                     ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:908: error: cannot find symbol
        HystImageLines = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                        ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:913: error: cannot find symbol
        int[] upper = Utils.getHalf(orig, halfHeight, width, true);
                      ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:914: error: cannot find symbol
        int[] lower = Utils.getHalf(orig, halfHeight, width, false);
                      ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:932: error: cannot find symbol
        orig = Utils.mergeArrays(upper, lower,mergePoint);
               ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:934: error: cannot find symbol
        OverlayImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(orig,width,height));
                                                      ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:954: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(accUpper,180,rmax));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:957: error: cannot find symbol
        HoughAccImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.createSWTimage(accLower,180,rmax));
                                                       ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:981: error: cannot find symbol
        polFilter.filter(AWTBufferedImageSWTImage.convertToAWT(IrisAndPupilFullSize.getImageData()), imageNormalized1temp);
                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:982: error: cannot find symbol
        normalizedImage = new Image(Display.getDefault(),AWTBufferedImageSWTImage.convertToSWT(imageNormalized1temp)) ;
                                                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1002: error: cannot find symbol
        polFilter.filter(AWTBufferedImageSWTImage.convertToAWT(normalizedMask.getImageData()), imageNormalized1temp);
                         ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1003: error: cannot find symbol
        normalizedMask = new Image(Display.getDefault(),AWTBufferedImageSWTImage.convertToSWT(imageNormalized1temp));
                                                        ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1026: error: cannot find symbol
        thc = new ThreadCircle[variation*2];
                  ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1030: error: cannot find symbol
            thc[a] = new ThreadCircle(orig,width,height,i,a,this);
                         ^
  symbol:   class ThreadCircle
  location: class IrisRecognition
IrisRecognition.java:1121: error: cannot find symbol
        ij.ImagePlus imga = new ImagePlus("img", AWTBufferedImageSWTImage.convertToAWT(imgScaled.getImageData()));
                                                 ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1130: error: cannot find symbol
        ij.ImagePlus maska = new ImagePlus("mask", AWTBufferedImageSWTImage.convertToAWT(maskScaled.getImageData()));
                                                   ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
IrisRecognition.java:1141: error: cannot find symbol
        gabor = MyGabor.filter(img, mask, imga.getWidth(), scales); //obliczamy gabora
                ^
  symbol:   variable MyGabor
  location: class IrisRecognition
IrisRecognition.java:1145: error: cannot find symbol
        for(Feature ficzer: gabor) {
            ^
  symbol:   class Feature
  location: class IrisRecognition
IrisRecognition.java:1150: error: cannot find symbol
                    AWTBufferedImageSWTImage.convertToSWT(Utils.toBufferedImage(gab.getImage()))));
                                                          ^
  symbol:   variable Utils
  location: class IrisRecognition
IrisRecognition.java:1150: error: cannot find symbol
                    AWTBufferedImageSWTImage.convertToSWT(Utils.toBufferedImage(gab.getImage()))));
                    ^
  symbol:   variable AWTBufferedImageSWTImage
  location: class IrisRecognition
Note: IrisRecognition.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
46 errors

@aayush26
Copy link
Author

aayush26 commented Apr 19, 2016

Compiled all *.java files together:
javac -cp swt64.jar:bij.jar:ij.jar:ImageEditor.jar IrisRecognition.java AWTBufferedImageSWTImage.java Database.java MyGabor.java Feature.java NonMaxSuppression.java HistThreshold.java HoughCircle.java HoughLine.java ThreadCircle.java Sobel.java Utils.java

It compiled successfully with only 2 warnings.

To create jar:

  1. echo Main-Class: IrisRecognition >manifest.txt
    2.jar cvfm IrisRecognition.jar manifest.txt *.class

But when I run it:
java -jar IrisRecognition.jar

Output: (Error)

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

What went wrong?

@aayush26 aayush26 changed the title Unable to compile IrisRecognition.java Compiled and a new jar file created but not working Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant