Compress a folder with all subfolders into a .jar file - jar

I have a directory of files with sub-folders and I want to compress it all in a jar file.
Later on , I need to use it in my project and add this jar file into my library section at eclipse.

Right click on a blank area in explorer window, go to New > Compressed (zipped) Folder. Drop whatever you want into it, and then rename the extension to *.jar.
source

Related

How to put files in a folder and generate .zip file?

I want to generate a .zip file which contains some files and folders. The file inside the folder might be contained in some other paths and I want to put files in another folder and generate a .zip file from them.
By other words, I don't want to physically generate the folder with files. The files might be on some roots and I want to generate folder virtually to put them on the .zip file.
Imports System.IO.Compression
ZipFile.CreateFromDirectory("source","destination.zip",CompressionLevel.Optimal,False)
As an example if I have these files on my website:
- ~/files/image/1.jpg
- ~/files/pdf/2.pdf
- ~/intro.docx
I want to put them on a zip which when I extract it, the files will be as follows:
- ~/files/1.jpg
- ~/files/2.pdf
- ~/intro.docx
For the source put the root folder and it will do it
example :
This is yours
- ~/files/image/1.jpg
- ~/files/pdf/2.pdf
- ~/intro.docx
But before this there is a root folder whic is the ~ just simpily put as a source

Uploading a file with VS2010 "Publish" to custom directory

I have a file I need to have published with my ASP.NET site to the server. I put it in the project root and set 'Copy to Output Directory' to 'Copy if newer'. When I publish, it copies the file to a 'bin' sub-directory. No good! I need it at the root of the site. Other files (such as my *.aspx files) that are right next to it in my project get copied to the root. How do I set it so this file also get copied to the root?
Change the "Copy to Output Directory" to "Do Not Copy", then Set the Build Action to "Content". Copy to output directory copies the file to the bin folder. You would use that feature to copy a license file needed for the assemblies for example. Setting the build action to Content causes the file to be sent to the server in its relative place.

How do you include .java files and .html files in a .jar file when you take Clean and Build in Netbeans 7?

If you have files in the build/classes/folderToJar Netbeans7 takes the .class files and make a .jar file when you take Clean and Build.
But how can you have .java files and .html files go into the .jarfile as well?
First Create a package(Say html) under Source Packages
copy all of your html files to this package(when you create a package,a folder in the name of your package will be created inside your project src folder, so copy files to it)
You can access your html file from your program as
URL someURL = yourclass.class.getResource("/html/yourhtml.html");

opening Flex project without .actionScriptProperties

I need to import a flex project into FlashDevelop.
However I am unable to find the .actionScriptProperties file.
How would I be able to import the project?
It would be great if someone could help me out with it.
Usually Flex Builder project contains:
src/ directory - source files (.as and .mxml)
libs/ directory - .swc files (if exists)
Usually FlashDevelop project contains:
1) src/ directory - place here files from src directory of FB project
2) lib/ directory - place here .swc files (if exists) from libs directory of FB project
3) on each swc files (if exists) you need make right click and select "Add to Library".
4) Make right click on main class file and select "Document Class"
This is main. May be there are other files. But I can not say what you have because I not know what files you have.
actually i canĀ“t import a FB project to FD whit the options in the menus but i can fix it creating a new project in the folder of the FB project and putting files in folders identified by FD it works for me

Qt and DESTDIR being ignored?

My app folder is "app"
It contains both .pro and source files
It has a "bin" folder.
the "DESTDIR = bin\" in my .pro file
however, when building from Qt-Creator, a sibling folder is being created, called "app-build-desktop" and the binaries are stored there under a new "bin" folder.
why is this happening? why is another sibling folder being created and hosts a new bin folder instead of just creating the binary file in my existing "bin" folder.
In the "Projects" area (on the left pane of Qt Creator) there is a "Shadow build" option in the Build Settings. You can uncheck this to disable it.
That being said, it is a useful feature, for example for keeping your actual source directory clean of temporary files that you have to ignore in source control.

Resources