In this work, the $$\varvec{J}$$
J
-, M- and $$\varvec{L}$$
L
-integrals of two line charges and two line forces in generalized plane strain are derived in the framework of three-dimensional (3D) electrostatics and three-dimensional compatible linear elasticity, respectively, in order to study the interaction between them. The key point in this derivation is achieved by expressing the $$\varvec{J}$$
J
-, M- and $$\varvec{L}$$
L
-integrals of point charges and point forces in three dimensions in terms of the corresponding three-dimensional Green functions, that is, the three-dimensional Green function of the Laplace operator and the three-dimensional Green tensor of the Navier operator, respectively. The major mathematical tool used in deriving the $$\varvec{J}$$
J
-, M- and $$L_3$$
L
3
-integrals of line charges and line forces from the corresponding $$\varvec{J}$$
J
-, M- and $$\varvec{L}$$
L
-integrals of point charges and point forces is the method of embedding or method of descent of Green functions to two dimensions (2D) from the corresponding Green functions in 3D. The analytical expressions of $$\varvec{J}$$
J
-, M- and $$L_3$$
L
3
-integrals of line charges and line forces in antiplane and plane strain are derived and discussed. The $$\varvec{J}$$
J
-integral is the electrostatic part of the Lorentz force (electrostatic interaction force) between two line charges in electrostatics and the Cherepanov force between two line forces in elasticity. The M-integral of two line sources (charges or forces) equals half the electrostatic interaction energy in electrostatics and half the elastic interaction energy in elasticity of these two line sources, respectively. The $$L_3$$
L
3
-integral of two line sources (charges or forces) is the z-component of the configurational vector moment or the rotational moment representing the total torque about the z-axis caused by the interaction of the two line sources. An important outcome is that the $$\varvec{J}$$
J
-integral is twice the negative gradient of the M-integral, leading to the result that the $${\varvec{J}}$$
J
-integral for line charges and line forces is a conservative force (with the corresponding interaction energy playing the role of the potential energy) and consequently an irrotational vector field. Finally, the obtained $$\varvec{J}$$
J
-, M- and $$L_3$$
L
3
-integrals being functions of the distance and of the angle, are able to describe the physical behaviour of the interaction of two line sources (charges and forces), since they represent the fundamental and necessary quantities, that is, the interaction force, interaction energy and total torque produced by the interaction of these two line sources.