Instead of root.join(...) you can use root.fetch(...) which returns Fetch<> object.
but it can be used in similar manner. Fetch<> is descendant of Join<>
You just need to cast Fetch<> to Join<> it should work for EclipseLink and Hibernate
...
Join<MyEntity, RelatedEntity> join = (Join<MyEntity, RelatedEntity>)root.fetch("relatedEntity");
...