Let $R$ be a commutative ring with nonzero identity. In this paper, we introduce the notion of weakly $(2,J)$-ideals as a generalization of $(2,J)$-ideals. A proper ideal $I$ of $R$ is called a weakly $(2,J)$-ideal if whenever $a,b,c \in R$ and $0 \neq abc \in I$, then $ab \in I$ or $ac \in Jac(R)$ or $bc \in Jac(R)$. Besides giving various examples and properties of weakly $(2,J)$-ideals, we investigate the relations between weakly $(2,J)$-ideals and other classical ideals such as $(2,J)$-ideals, weakly $J$-ideals, weakly $(2,n)$-ideals and weakly $2$-absorbing primary ideals. Finally, we characterize weakly $(2,J)$-ideals of the trivial ring extensions and amalgamation of a ring along an ideal to construct non-trivial and original examples of weakly $(2,J)$-ideals.