<p>I need to get the Class of an object at runtime.</p>

<p>For an non-abstract class I could do something like:</p>

<pre><code>public class MyNoneAbstract{
    public static Class MYNONEABSTRACT_CLASS = new MyNoneAbstract().getClass();
</code></pre>

<p>But for an abstract class this does NOT work (always gives me <code>Object</code>)</p>

<pre><code>public abstract class MyAbstract{
    public static Class MYABSTRACT_CLASS = MyAbstract.class.getClass();
</code></pre>

<p>This code will be running in JavaME environments.</p>

You just need
```
```
MyAbstract.class
```
```
That expression returns the Class object representing MyAbstract.