Is it possible in Java to send a UDP packet with the \"Don\'t Fragment\" flag set using the standard API?
I don\'t see any relevant options on DatagramSocket or Datagram
The "Don't Fragment" flag is part of IP, not TCP or UDP. IP is the protocol 1 layer below TCP and UDP (TCP and UDP packets are wrapped in IP).
You would need the ability to create a raw socket, which is not available in standard Java. There seems to be a library called "RockSaw" which might be of use. Be aware that your program will need to have root/administrator permissions to access raw sockets.