title: Send DNS queries in Java without using InetAddress
body: <p>I am trying to send DNS queries to a DNS root server(eg. 192.58.128.30) using JAVA. But the thing is, it is not allowed to use library functions like InetAddress.getByName(), how to proceed?</p>
  
  <p>I have tried this so far:</p>
  
  <pre><code>    public class Main{
          public static void main(String[] args) {
              DatagramSocket client = new DatagramSocket();
  
              String rawMessage = "example message";
              byte[] message = rawMessage.getBytes(); //converting the message into a byte array
  
              //creating datagram packet
              DatagramPacket packet =
              new DatagramPacket(rawMessage,rawMessage.length,InetAddress.getByName("192.58.128.30"),53);
  
              //sending packet using datagramSocket
              client.send(packet);
  
          }
      }
  </code></pre>
  
  <p>EDIT: The issue was solved.</p>