The interaction of an air bubble (isolated in water or attached to a boundary) with shock waves induced by electric sparks is investigated by high-speed photography. The interaction is closely related to the counter-jet induced by the impact of shock waves. The formation of a counter-jet in an air bubble is related to the liquid jet formed in the same air bubble, but the mechanism is different with that of the counter-jet formation in a collapsing cavitation bubble. The formation of a counter-jet in an air bubble is related to discharge energy, air bubble size and radius of shock wave. With a given energy of the spark discharge, the formation of a counter-jet in an air bubble is related to δ / ε (the ratio of the dimensionless bubble-bubble distance to the dimensionless air bubble radius). The counter-jet will only be produced when δ / ε is in the range of 1.2-2.2. The counter-jet in an air bubble is of an important nuclei-generating mechanism.