Kayaman wrote:I'm new at Java and that's why I posted to the forum.
I'd recommend avoiding using inner classes or at least learning how to use them before actually using them.
Or do you really need to have CaptureStream as an inner class?OK, this is my structure:
In any case you're trying to create one in a static method, where no enclosing instance of the outer class (GE4000) is available. So at the very least you'd need to make it a static nested class.
Shellback3 wrote:That's one valid way to do it, yes. Although whether startStream is static or not shouldn't matter in this case.
Do I understand correctly that the way to solve this is to put class CaptureStream into CaptureStream.java? That is, un-encapsulate it and then make startStream static?