User Tools

Site Tools


headless_eclipse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
headless_eclipse [2014/06/18 05:55]
yann More details on the MANIFEST.MF file!
headless_eclipse [2017/09/06 01:54] (current)
Line 67: Line 67:
 === Does the current plug-in require other plug-ins / JARs to compile? === === Does the current plug-in require other plug-ins / JARs to compile? ===
  
-If the current plug-in requires other plug-ins / JARs to compile, these plug-ins / JARs must be declared in "Dependencies -> Required Plug-ins" ​OR "Build -> Extra Classpath Entries". The difference between the two sections is important.+If the current plug-in requires other plug-ins / JARs to compile, these plug-ins / JARs must be declared in ''​Dependencies -> Required Plug-ins''​ **OR** ''​Build -> Extra Classpath Entries''​. The difference between the two sections is important.
  
-"Dependencies -> Require Plug-ins" ​only accepts plug-ins, not JARs. Plug-ins listed in this section becomes accessible to the current plug-ins, i.e., their classes are visible to the current plug-in according to their visibility ("Runtime -> Exported Packages"). +''​Dependencies -> Require Plug-ins'' ​only accepts plug-ins, not JARs. Plug-ins listed in this section becomes accessible to the current plug-ins, i.e., their classes are visible to the current plug-in according to their visibility (''​Runtime -> Exported Packages''​). 
  
-"Build -> Extra Classpath Entries" ​only accepts JARs. These JARs will be used to compile the plug-ins but are not related to its running.+''​Build -> Extra Classpath Entries'' ​only accepts JARs. These JARs will be used to compile the plug-ins but are not related to its running.
  
 === Does the current plug-in require other plug-ins / JARs to run? === === Does the current plug-in require other plug-ins / JARs to run? ===
  
-If the current plug-in requires other plug-ins / JARs to run, these plug-ins / JARs must be declared in "Dependencies -> Required Plug-ins" ​OR "Runtime -> Classpath". The difference between these two sections is also important.+If the current plug-in requires other plug-ins / JARs to run, these plug-ins / JARs must be declared in ''​Dependencies -> Required Plug-ins''​ **OR** ''​Runtime -> Classpath''​. The difference between these two sections is also important.
  
-"Dependencies -> Required Plug-ins" ​only accepts plug-ins, not JARs. Plug-ins listed in this section become accessible to the current plug-ins, i.e., any class belonging to the package listed in their respective ​"Runtime -> Exported Packages" ​sections is accessible. They must be available in the runtime configuration ("config.ini") of the Eclipse application in which the current plug-in will run, else the current plug-in will not load and the log file in the workspace ​".metadata" ​will contain a ClassNotFoundError.+''​Dependencies -> Required Plug-ins'' ​only accepts plug-ins, not JARs. Plug-ins listed in this section become accessible to the current plug-ins, i.e., any class belonging to the package listed in their respective ​''​Runtime -> Exported Packages'' ​sections is accessible. They must be available in the runtime configuration (''​config.ini''​) of the Eclipse application in which the current plug-in will run, else the current plug-in will not load and the log file in the workspace ​''​.metadata''​ folder ​will contain a ''​ClassNotDefFoundError''​.
  
-"Runtime -> Classpath ​" ​only accepts JARs. These JARs will be "​embedded"​ in the current plug-in and their classes accessible to it. JARs added to this section automatically appear in the "Build -> Binary Build" ​section and in the "bin.includes" ​statement of the "build.properties" ​file.+''​Runtime -> Classpath'' ​only accepts JARs. These JARs will be "​embedded"​ in the current plug-in and their classes accessible to it. JARs added to this section automatically appear in the ''​Build -> Binary Build'' ​section and in the ''​bin.includes'' ​statement of the ''​build.properties'' ​file.
  
 === Does the current plug-in require access to the classes in other plug-ins / JARs? === === Does the current plug-in require access to the classes in other plug-ins / JARs? ===
  
-If the current plug-in requires classes in other plug-ins / JARs, these plug-ins / JARs must be declared in "Dependencies -> Required Plug-ins" ​OR "Dependencies -> Imported Packages" ​OR "Runtime -> Classpath""Dependencies -> Required Plug-ins" ​and "Runtime -> Classpath" ​have been discussed above. ​"Dependencies -> Imported Packages" ​is used to bypass the Eclipse class-loading mechanism, as explained below.+If the current plug-in requires classes in other plug-ins / JARs, these plug-ins / JARs must be declared in ''​Dependencies -> Required Plug-ins''​ **OR** ''​Dependencies -> Imported Packages''​ **OR** ''​Runtime -> Classpath''​''​Dependencies -> Required Plug-ins'' ​and ''​Runtime -> Classpath'' ​have been discussed above. ​''​Dependencies -> Imported Packages'' ​is used to bypass the Eclipse class-loading mechanism, as explained below.
  
  
Line 100: Line 100:
 When using the ''​Import-Package''​ statement and if the plug-in shares some common package with another plug-in, Eclipse gets confused and claims that other plug-in cannot use classes in this package, even if it is exported by all the plug-ins involved. Therefore, it is important to have different packages, which can of defeat the purpose of having plug-in in the first place. It is true, though, that ''​Import-Package''​ statement, by instructing Eclipse to by-pass its class-loading mechanism, disturb this mechanism. When using the ''​Import-Package''​ statement and if the plug-in shares some common package with another plug-in, Eclipse gets confused and claims that other plug-in cannot use classes in this package, even if it is exported by all the plug-ins involved. Therefore, it is important to have different packages, which can of defeat the purpose of having plug-in in the first place. It is true, though, that ''​Import-Package''​ statement, by instructing Eclipse to by-pass its class-loading mechanism, disturb this mechanism.
  
 +
 +==== Plug-ins Referenced in ''​config.ini''​ but Missing ====
 +
 +The ''​config.ini''​ file contains, among other things, the locations of the plug-ins (actually, their JAR files or folders) required by an Eclipse application. If one of more plug-ins are missing, i.e., there is a discrepancy between the ''​config.ini''​ file and the folder containing the plug-ins JARs and folders, then Eclipse will throw an error and the "​configuration area" will contain a log file detailing the missing plug-ins.
headless_eclipse.1403070922.txt.gz ยท Last modified: 2017/09/06 01:54 (external edit)