Apache Tika - all files from directory listed in ArrayList - apache-tika

i need to lists all files with selected type by apache's Tika tool, my target is just to save all .doc, .docx etc files from selected directory to for example ArrayList

Related

untar files into single directory preserving the directory structure

It is possible, and if so how, to use tar to extract a zip while preserving the directory structure? Currently it just extracts everything into a single directory using the path as the file name.
Example file name
Farlex.581429F59E1D8_1.5.1.9_neutral__wyegy4e46y996.main\Assets\buttons\add.png

Grails run-app not reloading changes to other files under conf folder

I have some additional text files under grails-app/conf that I am reading explicitly with java.io.File. I am getting the base directory for conf using the classpath but then opening the files directly.
Specifically - I have a folder grails-app/conf/folder and reading a file like this:
new File(new File(this.class.getResource("/folder/").getFile(), "file.txt")
folder/file.txt is actually read from ~/.grails/2.2.2/projects/myProject/resources/folder
How do I get grails run-app to push these txt files out when changed, similar to .groovy files?

how to create a .hpub for baker framework with css and jquery files

I am very new to the baker framework,
however i knew that i have to create the hpub file
do we have to also zip our images, css and jquery files or we just have to zip the html files?
also, how to create book:// instead of http://
thank you
You have to zip up all the files into your hpub file. However note that you have to zip them without the parent directory jut the files that make up your content, images, css, etc
So, if your files for your hpub were in a directory called "MyGreatNewBook", from the command line you would make an hpub file like this:
cd MyGreatNewBook
zip -r ~/MyGreatNewBook.hpub .
this would zip up all your files and place the hpub file in your home directory.

Extracting a zip file to dynamic destination folder in Ruby on Rails

Well,I am using Rails 2.02 and ruby 1.8.6 in my application,I need to provide a feature to extract the zip file into dynamic destination folders.i.e Destination folder name is fixed based on that it has to search on PC for that folder and extract zip file into that PC.
For example,
In PC1 the destination folder path is C:/sites/myfolder
In PC2 the destination folder path is D:/demo/for/myfolder
In PC3 the destination folder path is C:/myfolder
In PC4 the destination folder path is F:/path/to/myfolder
Here,In this example my destination folder is myfolder,so in the above four cases the path is different for that.What I need was my rails application should search for the folder in pc and extract zip file into that.
Thanks for the help!

how to compile java files classnotfoundexception

I am having a java project having the directory structure as
java->applet and a few .java files
the applet folder further contains two folders and some .java files
I need to develop a jar file out of this project
I did so by writing the command line
jar cvfm myfile.jar *.java
(obviously by moving into corresponding directory)
when I checked by extracting the file(it was zipped as a Nokia application installer file)
it showed me only the classes in the applet folder not the folders in it
moreover i needed to use this jar file in a jquery plugin where i had written
var dasherApplet = $('applet');
dasherApplet.attr({
'height':'100%',
'width':'100%',
'archive':farfalla_path+'plugins/dasher/jardasher.jar',
'code':'JDasherApplet.java'
});
but it showed me the class not found exception
for this I checked the previous versions of the java applet; there the java files were replaced by .class files so i tried compiling a java file into .class by using the command line
C:/>javac filename.java
still all in vain this time it showed me
"cannot find symbol" error
what was interesting was that the errors generated were imitating the java files present in the same folder. I navigated to the directory where the file was stored still the same error
when i tried to simply run it by using
java filename.java
error was main class not found:JApplet.java
Please help me develop this applet
Firstly you need to compile all the jar files before running.
Secondly , you CANNOT run Applets using java filename.java .
As this link explains http://download.oracle.com/javase/tutorial/deployment/jar/build.html ,
jar cvf TicTacToe.jar TicTacToe.class audio images
Here audio and images are folders , so that is how you add folders to jar.
Also .jar files are not Nokia Application Installer files . Nokia simply associates them for installing apps (that is J2ME)

Resources