title: Passing arguments to constructors using CreateObject in Coldfusion
body: <p>I'm trying to use a Java object in Coldfusion using the CreateObject function.</p>
  
  <p>This works fine when the constructor in the Java class doesn't take any arguments e.g.:</p>
  
  <pre><code>MyObject myObject = new MyObject();
  </code></pre>
  
  <p>Goes to</p>
  
  <pre><code>myObject = CreateObject("java",  "com.something.MyObject");
  </code></pre>
  
  <p>But I'm not sure how to pass arguments to the constructor for code like this:</p>
  
  <pre><code>MyObject2 myObject2 = new MyObject2(myArgment);
  </code></pre>
  
  <p>I'm sure this should be really simple, but I can't find this anywhere.</p>
  
  <p>Thanks,</p>
  
  <p>Tom</p>