There are certain available API's that can be used to control your webcam using java.
- Java Media Framework (JMF)
The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology.
- Freedom for Media in Java (FMJ)
FMJ is an open-source project with the goal of providing an alternative to Java Media Framework (JMF), while remaining API-compatible with JMF. It aims to produce a single API/Framework which can be used to capture, playback, process, and stream media across multiple platforms.Since FMJ is API-compatible with latest JMF, you may use existing JMF codes and run them.
Xuggler is the easy way to uncompress, modify, and re-compress any media file (or stream) from Java. This is more widely used for manipulation of media files and related operations.
You can refer the following links:
You can find tons of tutorials on them. I'm sure you can figure out an efficient way to control the shutter speed of your webcam using any of these API's. :)