Skip to Content

"<accessrules>" entries in the ".classpath" file are not recognized

Posted in

Hi,

the code:

package de.soffel.hellorcp;
import javax.smartcardio.CommandAPDU;
public class Test3 {
}

compiles fine under eclipse, if an access rule for the project is defined.
Defining an access rule leads to the following ".classpath" file:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
		<accessrules>
			<accessrule kind="accessible" pattern="javax/smartcardio/**"/>
		</accessrules>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

Compiling this code with ant4eclipse fails with the following error:

[ant4eclipse:jdtCompiler] ----------
[ant4eclipse:jdtCompiler] 1. ERROR in D:\workspaces\a4e_hellorcp\de.soffel.hellorcp\src\de\soffel\hellorcp\Test3.java (at line 2)
[ant4eclipse:jdtCompiler] import javax.smartcardio.CommandAPDU;
[ant4eclipse:jdtCompiler]        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ant4eclipse:jdtCompiler] Access restriction: The type CommandAPDU is not accessible due to restriction on required library C:\Programme\Java\jdk1.6.0_18\jre\lib\rt.jar
[ant4eclipse:jdtCompiler] ----------

Ant4eclipse seams not to recognize the "" entry in the ".classpath" file.

Is this a bug or a missing feature? Shall I open a jira? It would be a great help for out project, if a4e would support this.

Thanks for your work on a4e and best regards,

Georg.

Missing feature

Hi Georg,

it's a missing feature. Currently we don't support accessrules in class path entries.

We already have an issue for this, feel free to vote for it ,-)

http://www.javakontor.org:8080/jira/browse/AE-64

Regards,
Gerd