| Author |
Message |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Nov 25, 2014 8:08 PM Post subject: Custom Element |
|
Hi Dear all I have been working on custom element how imports like below can be handled at begin of custom element java file? items : ExternalChartContext ExternalChartIf ExternalElementContext and etc...
import com.proatech.bioera.external.ExternalChartContext; import com.proatech.bioera.external.ExternalChartIf; import com.proatech.bioera.external.ExternalElementContext; import com.proatech.bioera.external.ExternalInit2If; import com.proatech.bioera.external.ExternalSinkIf; import com.proatech.bioera.external.ExternalSourceIf;
|
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Nov 25, 2014 8:33 PM Post subject: |
|
I think you need to add custom.jar to your classpath. It is located under ext folder and contains those classes you are trying to import. More information here:
http://www.bioera.net/manual.html#_Toc403982654
|
|
 |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Nov 25, 2014 8:46 PM Post subject: |
|
Dear jarek thanks for your reply and answering I have been seen that page before. maybe those classes exist in external.jar file but when I add it into my project the project yet report errors under imports like this import com.proatech.bioera.external.ExternalElementContext;
|
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Nov 26, 2014 12:14 AM Post subject: |
|
| It is custom.jar, NOT external.jar |
|
 |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Nov 28, 2014 8:38 AM Post subject: Solved |
|
| tnx Jarek |
|
 |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Nov 30, 2014 6:39 PM Post subject: how to add jar file into program? |
|
Hi dear jarek I have been completed programming custom element and make its .jar file this is the files structure in that .jar file
souce package>default package> palayer_controler (this file implemented the interfaces) in this file the other java class has constructed and called SO after copying this .jar fileinto ext folder how I can set path for this class classpath and path in software custom element ? any comment can be helpful thanks in advance |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Nov 30, 2014 10:09 PM Post subject: |
|
You do NOT set a classpath anywhere.
After you copied your jar file into ext folder, all you need to do is enter full name of your class with the package.
For example:
com.yourpackage.YourClass
That is on assumption you put your class YourClass in com.yourpackage package. |
|
 |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Dec 2, 2014 6:00 AM Post subject: CusomElement setting |
|
Hi dear jarek thanks for your replies. I reflected all your comments to my project but I dont see anything not working and not error reporting! how I can send my project class tree snapshot to you? |
|
 |
BHR
Joined: Nov 25, 2014 Posts: 20
|
Posted: Dec 2, 2014 12:53 PM Post subject: video tutorial |
|
Dear Jarek is it possible to make a tutorial \"how add a .jar file as custom element\" and put it on youtube or this site?
|
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1073
|
Posted: Dec 2, 2014 10:05 PM Post subject: |
|
Creating a custom element requires some java knowledge.
Jar creation is well explained in many tutorials about java, for example:
http://docs.oracle.com/javase/tutorial/deployment/jar/
If you have not done that before, you should first learn and experiment with a test jar and see how it works outside of BioEra, before you do this for custom element.
Please note, that in order to create a custom element you do not have to create a jar. You can put your classes inside \"impl\" folder like described in the manual. Jar is more convenient for final packaging and redistribution. But for the initial implementation it is not necessary.
I created a demo jar file with the same code which is used in the custom element example. It can be put in the ext folder and should execute the same (impl folder should be made empty to make sure the classes in there do not interfere). You could simply edit its content using a program like winzip (jar file can be edited with tools used for .zip files).
http://proatech.com/design/CustomTest.jar |
|