dc and ac Josephson effect in a superconductor Luttinger-liquid superconductor system