Put the pickups in the cavity just like it should be in the endd, but with all four cables accessible.
Then you get a signal cable and temporarily connect two of the wires to the jack. (Just hold one of the wires to the sleeve and one to the tip. It will probably buzz like hell, but that doesn't matter right now.)
Start by holding for instance the brown wire to the sleeve of the plug, and try each of of the other wires until you get a signal. (Remember to pluck a string on the bass between each try). You now have 3 possible combinations. Should be easy to figure out. When you get signal you have found the first pair of wires. The two other wires is now the other pair.
Then you need to figure out what's positive and what's negative. Twist one cable from each pair and connect to the sleeve of your signal cable. The other two wires go to the tip of the signal cable. You may want to tape the wires to the cable for this as you'll introduce lots of noise by touching the bare wires. Try playing a few notes. Then you change the polarity of only ONE of the two pairs. One combination will sound better than the other. Wire it up the way it sounds best.
The only thing left now is to get the J pickup in phase with the P pickup. Do this the same as the previous step, but now you have to connect the j pickup into the wiring harness of the bass.
This method is a bit of trial and error, but it probably won't take you much more than 10-15 minutes to do.
edit:
Is it possible that one wire isn't necessary at all?
I'm finding that yellow+ white works as hot with green alone as ground, and brown left hanging. Could that be right?
Then the two coils probably aren't separate.
Try connecting brown and white/yellow to ground and the other of white/yellow to signal (hot).
The green is probably a coil tap. Don't connect that one to anything.
(White/yellow must be reversed if the J is out of phase with the P pickup.