Accessing POI.jar externally through classpath in an eclipse product - excel

I have developed an eclipse plugin product for which I am using POI.jar to create an excel sheet. I have placed the poi.jar in a folder 'lib' and added the jar into classpath of plugin. When I export the plugin product, it works fine. e.g.: lib/poi-3.14-20160307.jar
But when I place the poi.jar in an external folder and access it through an environment path, after exporting the product it is not working. Please see the attached image. e.g.: external:$PRODUCT_PATH$/poi-3.14-20160307.jar where PRODUCT_PATH is an environment variable which points to a specific location.
This is the error I am getting:
import org.apache.poi.hssf.usermodel.HSSFCell;
The import org.apache.poi cannot be resolved.
import org.apache.poi.hssf.usermodel.HSSFRow;
The import org.apache.poi cannot be resolved.

The below link helped me to solve my problem.
stackoverflow.com/questions/27562370/
I have added two entries for the same jar in runtime-classpath. One pointing to the 'lib' folder kept in the project and other one pointing to the external path. while exporting it will use the jar kept in 'lib' folder for compilation. after exporting the product remove the jar from the 'lib' folder.
It will use the external path to access the jar while running the exported product.

Related

Export the "App_Code" Folder

I am trying to export my entire site including the "App_Code" folder which contains my site codes' folder, but the folder did not export. I read the Kentico document that I can export it as long as I checked the "Export site folders" option when selecting the export options, but it did not happen as I expected. When I check the "App_Code" folder on the target server after importing, I could see the site folder did not import.
I guess I probably miss some things, could you please help me?
Please check first your project type like Website Or Web Application from Source and Target locations.
If source and target is website then App_Code folder is available on target.
If source is website and target is web application then Old_App_Code folder is available on target.
Example :
App_Code (or Old_App_Code if you installed Kentico as a web application)
Global (exports with any site, if the Export global folders option is selected during the export process)
(exports with the given site if the Export site folders option is selected during the export process)
Follow below steps:
You need to select Export global folders option while export then all files under the following folders will be added to the export package:
~/App_Code/Global/
~/CMSGlobalFiles/
~/CMSScripts/Custom/
You need to select Import global folders option while import then the import process includes global files originally exported from the following folders:
~/App_Code/Global/
~/CMSGlobalFiles/
~/CMSScripts/Custom/
Reference URLs -
https://docs.xperience.io/k12sp/deploying-websites/exporting-and-importing-sites/export-folder-structure
https://docs.xperience.io/k12sp/deploying-websites/exporting-and-importing-sites/exporting-sites
https://docs.xperience.io/k12sp/deploying-websites/exporting-and-importing-sites/importing-a-site-or-objects

How to create a build.xml for a project that has multiple directories?

I have a Java project with the current directory structure:
Classes
Jars
Properties
Config
Each of these folders have some files which when I run make creates a project.
Now I have added another folder named client, which has two sub-folders: sampleRequests and YANG, along with one or two more files.
I do not know how to change my build.xml so that it incorporates the client folder and the sub-directories too.
I already have the build.xml for the earlier code where ai am copying my files. So lets say if I am using $out_dir for my project folder, can I simply use $out_dir/client/sampleRequests for this. Or the format is totally different. Stuck in a limbo. Please help.

deleted css files are accessing and web application is running those files

I made a static folder where I saved all css files to be used in my flask web development project. It is not reflecting the changes while I was doing some change .When I deleted that static folder then also it is accesing the files.
I have not clue from where it is accessing..
Please solve this problem
Thanks in advance
gallery.css file is not present:-
but accessing this file:-
try going to your project directory (not in your IDE, but the folder where the project is located)
find any/all directories named
__pycache__
and delete them.
clear all browser cache.
rerun the app in your IDE

Need to include a DocumentFormat.OpenXML dll in project

I have a customization project where I'm importing an Excel file content into the Lot/Ser No. Allocation grid. This works fine on my machine, but I had to download the DocumentFormat.OpenXml dll and include a reference in my class library project in order to do this. I've created a customization project, but when someone else tries to use it, that reference and that file are not there. I've tried to include it in the files section of the customization manager, but I have no way of doing that (can't browse to a file) - not that that would make any difference anyway, since that's the bin folder of the website, and not the class library.
Bottom line: Is there a way to include a dll file that's used in the class library project references in a customization package?
Add the dll file in Bin folder of your local website -> the file should appear in the Add Files dialog inside Customization Project Manager
Select the dll file in the Add Files dialog and click Save
After that, DocumentFormat.OpenXml.dll becomes a part of your customization package, which will always deploy it together with your extension library
Ruslan provided a good answer explaining how to include your custom DLL, however you might want to know that there are built in functions to read Excel files which make inclusion of third-party libraries unnecessary. Please refer to the following article: http://asiablog.acumatica.com/2016/03/reading-excel-file-acumatica.html?m=1

How to add AssemblySettings.dll.config file in a class library files in C#

I have created a Class library file in c# named as AssemblySettings. Then i added Configuration files. When i build the project, in bin folder config files and AssemblySettings.dll.config file was created.Then i want to add assembly settings in AssemblySettings.dll.config. But in solution explorer .dll.config file was not created. Kindly help me.
This file appears as app.config in Solution Explorer. The build process changes the name to NameOfAssembly.dll.config and puts it in the build folder.

Resources