Protected nested class not accessible to derived classes in other package
<p>Here is what I'm trying to accomplish</p>

<p>File 1: ./net/Class1.java</p>

<pre><code>package net;

public class Class1
{
    protected static class Nested
    {

    }
}
</code></pre>

<p>File 2: ./com/Class2.java</p>

<pre><code>package com;

import net.Class1;

public class Class2 extends Class1
{
    Nested nested = new Nested();
}
</code></pre>

<p>Here is the error I'm getting</p>

<pre><code>&gt;javac ./net/Class1.java ./com/Class2.java
.\com\Class2.java:7: error: Nested() has protected access in Nested
        Nested nested = new Nested();
</code></pre>

<p>Is this error expected? Am I doing something wrong?</p>
