Yes, you can use a glass jar for hydroponics. Generally, people use leftover mason jars for growing hydroponics. One thing to keep in mind is that the mouth of the jar should be wide enough to place a net cup inside it. A net cup is a thing that holds the growing medium, and the plant and the roots are suspended from the net cup and touch the nutrient solution.