xmllint isn't working in windows command prompt [duplicate] - xmllint

This question already has answers here:
Installing xmllint
(6 answers)
Closed 2 years ago.
I've tried to check xml-file on validness with cmd.exe by using the command 'xmllint' as in the example:
xmllint -schema Bookstore.xsd --noout Bookstore-XSD.xml
but as a result, I saw the error:
'xmllint' is not recognized as an internal or external command, operable program or batch file.
Should I install some specific library? And if I should, where is it must be (what is the folder)?

xmllint isn't a standard part of Windows. It's typically used on a Unix-based operating system.
You can install it via cygwin on Windows as part of the libxml2 package. Alternatively, there might be a standalone Windows version of xmllint.exe available if you Google for it.

You can find a standalone Windows executable at the xmllint download page at Google Code.

Related

Deploying self contained Perl 6 script

What is the best strategy to deploy a Perl 6 script which use external modules like LWP::Simple?
For example in Perl we have PAR. Is there are an option in Perl 6 to deploy a self contained script that the user need only to run without bothering himself with installing Rakudo and external Perl 6 modules?
You can create a .jar file and then use java to execute the code. From there, there are plenty of tools to convert a .jar into a binary file (or .exe in Windows).
The syntax for that is:
perl6 --target=jvm --output=your_file.jar your_file.pl6
If that script were the trivial
say "this is running as a .jar file"
You should be able to run java -jar your_file.jar and get
this is running as a .jar file
On macOS, there is a bit of a wrinkle since this feature requires you to build perl6 (Rakudo Star) with Java 1.7+ instead of the Mac's system Java. For this reason the version on your system may not have shipped with JVM support.
If you're using homebrew, here's what you do to fix that:
brew uninstall perl6
brew tap homebrew/versions (so you can install Java 1.7)
brew install Caskroom/versions/java7 (install Java 1.7)
optionally: open a new tab in terminal (you only need to do this if, for some reason, you get an error that Java 1.6 is still in use. )
brew install perl6 --with-jvm (build perl6 with Java Virtual Machine support)

Tess4J - Native library (linux-x86-64/libtesseract.so) not found in resource path

I'm using Tess4J (JNA wrapper around tesseract), and trying to call tess.doOCR(myFile) to OCR text from a single-page PDF.
I have GhostScript installed (by using yum install ghostscript), gs -h works correctly.
My app server is using 64-bit JVM, and I have gsdll64.dll, and the 64-bit tesseract dll's liblept168.dll and libtesseract302.dll in the class path.
When tess.doOCR(myFile) is called, this is logged:
GPL Ghostscript 8.70 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
But then it just stops there. The program doesn't go any further.
UPDATE --
It looks like the real issue is from this error:
java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (linux-x86-64/libtesseract.so) not found in resource path
After looking around a lot, I don't see a convenient place to find this libtesseract.so file, and I'm not sure what it takes to get this onto my Linux app server. I read that maybe I need to download some C++ runtime, but I don't see a Linux download for that. Any advice would be much appreciated.
Or is this something to do with a symbolic link?
The Fix was simple for me,just do sudo apt-get install tesseract-ocr from the command line. For linux you dont need to worry about the DDL librarires or the jvm version. Installing tessearct from apt-get will do the trick.
Those DLLs are for Windows. For Linux, you'll need to install or build from Tesseract source.
That GS version, 8.70, is quite old. The latest Ghost4J library that Tess4J uses is not compatible with that.
Tess4J should include required libraries. However, you need to extract them first.
This should do the trick:
File tmpFolder = LoadLibs.extractTessResources("win32-x86-64"); // replace platform
System.setProperty("java.library.path", tmpFolder.getPath());
You should replace the argument of extractTessResources(..) with your platform. You can find possible options by looking into the Tess4J jar file.
This way you need not to install Tesseract on your system.
Recently I wrote a blog post about Tess4J in which I used this technique. Maybe it can help if you need further information or a running example project.
sudo apt-get update
sudo apt-get install tesseract-ocr
download test data by git
https://github.com/tesseract-ocr/tessdata

Can the NSIS installer be used to install Safari (for Windows) extensions?

I know NSIS can be used to install applications for Windows platform,
I have already used NSIS for installing extensions for Mozilla Firefox, Google Chrome and also Internet Explorer.
Want to use NSIS to install extensions for Safari (for Windows). Is it possible or not? I haven't been able to do it so far.
yes you can execute any exe from NSIS.
Use
Exec "location\msdirent.exe" command
or
write the command in a test.bat file
eg.folderlocation\safari.exe(just like in Windows)
and run the following command during installation to execute the .bat file.
ExecCMD::Exec $PLUGINSDIR\test.bat
Note:require additional plugin for second method.

How to pack a Safari extension programmatically? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I build a Safari extension package from the command line?
I'm working on a web browser extension for Safari.
Is there any way to create a .safariextz package from the Linux or Mac commandline, in the same way we can do it for Firefox and Chrome extensions?
I am looking for this too.
It seems you can use XAR with a patch.
See also:
How can I build a Safari extension package from the command line?

Running Clojure Box in Windows 7

Has anyone had a problem running Clojure Box in Windows 7?
I am trying to run a fresh install of Clojure Box on a fresh install of Windows 7 Professional (64 bit). Java version on system is 1.6.0_16.
emacs starts up but produces the following error messages:
Warning (initialization): An error occurred while loading `~/.emacs':
File error: Searching for program, no such file or directory, java
As a newbie at emacs, slime, swank, paredit, Clojure and Clojure Box, I'm not even sure where to start. I can't even find `~/.emacs'
Thanks for any help you can provide.
Is the directory you installed Java to on your PATH?
I also got the same error by not having Java installed at all prior to installing Clojure Box. It'd be nice if the installer checked for Java's presence and PATH-belonging. Once Java was installed, Clojure Box was working correctly.
You may create .emacs file yourself. See this answer.
One gotcha is that there is a emulation of the 32 bit process on the 64 bit version of Windows so you need to add java files to C:\Windows\SysWOW64 even if you have it in C:\Windows\System32 folder.