There's a couple ways to get JPME Phase I credit. Attend any of the war college command and staff courses (about a year), attend a foreign war college (pretty sure they give JPME I credit for that), go through the non-resident seminar program (one seminar per academic year, w/ 3 seminars total for navy), or complete the non-resident correspondence course (same mat'l as the seminar but done online).
Phase II credit is only earned by attending Joint Forces Staff College or either Nat'l War College/Industrial College of the Armed Forces (NWC and ICAF award phase I and II). JFSC requires that you have already completed Phase I requirements.
End run: if you're a JO, you've got a while but may want to look into the non-resident programs if the time permits. Have to be an O-3, some require O-4 select depending on the program (you can attend a war college from another service). War college stints were typically done post-DH, but it would seem that post-DH may be a bit late if they start using it for O-5/XO/CO screening. Best bet, work on it during your 1st shore tour if able.