-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Compile time error #69
Comments
Can you please provide the error you got? It doesn't matter of which IDE are you using - this can be Eclipse, Netbeans or IntelliJ, it's enough to add webcam-capture-[version].jar to the classpath together with all dependencies from libs directory (you can find both in ZIP file). If you are using Maven, you don't have to add those files to classpath. Just include |
Ya i have added those jar files as you said. It prompts us to "create new class for Webcam" |
Which Webcam Capture version and IDE are you using? |
Webcam capture version 0.3.9 and netbeans version 7.2.1 |
paste your test code here,so we could have a look~ |
Version 0.3.9 has been tested many times, and no one reported missing classes. The problem you are describing appears probably because Netbeans is not able to find Webcam class and there are several reasons why this can happening:
|
So what can i do for that? How can i make it work? |
import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class TakePictureExample {
} |
I use Eclipse, not Netbeans, so if you switch to Eclipse I can send you working project if above won't help. You will just have to import it and add your own code. If you have lower Java version (e.g. 1.5), I can build new release for you. But first we need to figure out what is wrong within your configuration that cause described problem. |
The last thing, if anything help, is to simply to copy whole Webcam Capture source code and drop it into your project. Ok, I have to left you guys for a while since I have a regular band meeting today to practice a little bit. I will be back in several hours. Please let me know about your findings. |
There is a missing import at the start of your source file. You should add: import com.github.sarxos.webcam.Webcam; |
We are using JDK1.6. And i downloaded the jar file u mentioned and i am still getting that same error saying "create a new class for webcam" . |
The Webcam class is not auto imported in to your java file.just import it~using eclipse and idea will make your life easier . |
Does problem still exists after you add this line in your file imports? import com.github.sarxos.webcam.Webcam; |
Hi, At the link below you can find configured Eclipse project with working example you've provided: http://sarxos.pl/download/webcam-capture-project.zip That's all I can do in terms of this issue. If you still observe described problem, please check imports and review your Netbeans configuration. |
HI i actually run the TakePictureExample program. Java can't recognise the Webcam class so it prompts me to create new class for Webcam. |
....It's so strange~! |
Ok, please notice that TakePictureExample is originally located in com.github.sarxos.webcam package, so it does not need import because Webcam class is in the same package. Java does not force you to import classes within the same package (same here means simply that it has the same name). Example (this will compile without any problems): package boo.foo;
public class A {
} package boo.foo;
public class B {
public void main(String[] args) {
A var = new A();
}
} But when you move B to a different package (it was boo.foo, now we move it to (default), that is no package): public class B {
public void main(String[] args) {
A var = new A();
}
} This will cause error - class A not found. That's because it's not in the same package and there is no import. |
I will move all examples from com.github.sarxos.webcam to com.github.sarxos.webcam.example, so all imports will be automatically updated. This should not confuse users any more. |
the suggestions which u guys gave were very useful. our program is working properly :) :) 👍 👍 thanks a lot :) |
Hi, I want my program to take a snapshot using webcam, save it and load the image subsequently. But each time I run the program, the previous image saved is always loaded as the current image cannot be loaded until the project directory is refreshed. I am using eclipse. My question is how can my current image be recognised? The image file is saved as "test.jpg" |
Hi i downloaded the jar files you specified and included all the jar files into my project and complied the TestPictureExample. I get an error saying create new class for Webcam. What can i do? Should Actually i complied it using netbeans. Should i have to use another source to run this code?
The text was updated successfully, but these errors were encountered: