I'd probably use a map:
Map<String, Object1> m = new HashMap<>();
for( Object1 o1 : list1 ) {
m.put(o1.name, o1);
}
for( Object2 o2 : list2 ) {
Object1 o1 = m.get(o2.name);
if( o1 != null ) {
//do something
}
}
If multiple objects with the same name are allowed, you could use a map that supports this, e.g. Google Guava's Multimap, or a Map<String, List<Object1>> and maintain the lists yourself.
This should reduce the complexity to O(n+m), O(n) for building the map and O(m) for checking list2. There's some constant overhead for building the map but depending on the size of those lists it might be a considerable speedup.
Update:
I did a quick benchmark of sort-first and the map approach and although the sort-first might not be highly optimized (I used Collections.sort() and then iterate over both collections simultaneously), the map approach seems to quickly get more efficient.
Here are some results from my machine:
size sort-first map-lookup
100 2 ms 1 ms
500 5 ms 2 ms
1000 7 ms 3 ms
5000 20 ms 8 ms
10000 37 ms 14 ms
// DO MY STUFFis, but generally this approach is fine. Other possibility is HashMap, or if the objects are related then inherence and equals method comparing the objects names.