Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using "forbidden" class in Java?

Tags:

java

eclipse

My employer needs a Java class that extends org.eclipse.rse.core.subsystems.SubSystem, for an Eclipse plugin. Unfortunately the access rules on the library that implements it (org.eclipse.rse.ui_3.3.318.201404091445.jar, if it helps) marks everything "forbidden" that it doesn't expressly allow, and that class isn't expressly allowed.

I can change the access rule to allow access to that class, but will that cause problems when the plugin is installed on another machine?

like image 824
Head Geek Avatar asked Aug 18 '15 13:08

Head Geek


1 Answers

Eclipse help clearly documents that

References to types from a forbidden package result in class loading errors at runtime.

http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Feditors%2Fmanifest_editor%2Faccess_rules.htm

So it is not advisable at all to override this.

like image 79
jozzy Avatar answered Nov 01 '22 21:11

jozzy