Installing Hive on Windows 8.1 error "Missing Hive Execution Jar: C:\hive\lib/hive-exec-*.jar" - hive

I am following these instructions to install Hive on Windows 8.1
I downloaded Hive tar from [Hive Apache page] (http://www.apache.org/dyn/closer.cgi/hive/) and extracted to folder c:\hive\
I have added a new System Variable set to HIVE_HOME = c:\hive
I have added c:\hive\bin to Path
I already have Hadoop 2.7.5 up and running fine.
When I try to run hive at command line I get following error:
"Missing Hive Execution Jar: C:\hive\lib/hive-exec-*.jar"
Some of the other SO question/answers suggest .jar files are in other folders.
But I can't find any .jar files in the extracted folders.
I don't want to download any .jars as other answers suggest. Shouldn't required .jar file be in the tar file?
I have vague impression that maybe Hadoop has the required .jar files, and there is something I need to do to tell Hive to get those?

Ok so it looks like you do have download a previous version tar file of Hive and extract it to use the .jar files in its /lib folder.
I had originally downloaded apache-hive-2.1.0 and set that up but it didn't have the .jar files in its /lib folder.
So I went to http://apache.mirror.iweb.ca/hive/ and downloaded hive-1.0.1 and which had .jar files in it.
Then copied those in the empty /lib file in apache-hive-2.1.0 installation.
Now Hive is working fine!

Related

Bundle a file in Chromium

I want to add an exe file in Chromium 88 and use c++ to execute it, but after run command
autoninja -C out\Default mini_installer
it showed error about wrong file path of exe file.
how can i put an exe file and bundle it in Chromium ?
To bundle a file in Chromium, you will have to modify src/chrome/installer/mini_installer/chrome.release. Here's how it looks like: https://source.chromium.org/chromium/chromium/src/+/master:chrome/installer/mini_installer/chrome.release;l=1?q=chrome.release&sq=&ss=chromium
Just to make sure it's updatable when you update/upgrade your Chromium version on a user's machine, it should be placed inside VersionDir folder. For example in your case
# Chrome version dir entries, sorted alphabetically.
# Place your file here:
chromium_foo_file.exe: %(VersionDir)s\
For example if 88.0.0.0 is the version of your Chromium then after the installation is complete, this chromium_foo_file.exe will reside in 88.0.0.0 directory. Also place that file in your out\Default build folder before compiling mini_installer, so that it will be included automatically when building it

Converting svg to pdf with Batik not working on Ubuntu 11.10

I am attempting to convert a svg image to pdf using the Batik SVG toolkit on Ubuntu-11.10.
I have Batik 1.7 and Fop 0.95 installed. When running the following in the terminal:
java -jar /usr/java/share/batik-rasterizer.jar -m application/pdf /home/user/Batik_Test/colors.svg
-scriptSecurityOff
I get the following error:
Error while converting files: Error: cannot access transcoder for image of type application/pdf
The one thing I did notice was that the file 'pdf-transcoders.jar' was not on the machine so I added that to /usr/share/java on the off chance that was the problem but that did not make a difference.
I would appreciate any help from anyone out there with experience using Batik on ubuntu. What am I missing?
-J
if you have the java executable batik-rasterizer.jar in /usr/java/share/ directory, you can create a dir named lib in this same path (/usr/java/share/)
so to have
/usr/java/share/lib
in this latest dir (lib) you will copy the pdf-transcoder.jar so to have
/usr/java/share/lib/pdf-transcoder.jar
anyway, you need also other libs in addition to this, so, it is better for you, copy the whole content of lib directory contained in batik binary distribution zip file
http://mirror.nohup.it/apache//xmlgraphics/batik/batik-1.7.zip
to
/usr/java/share/lib/
only *content*, not lib, if you want copy the whole lib at once, you need to put in
/usr/java/share/
If you are executing Batik from fedora using the .jar file it is quite painful due to the java ignoring the -classpath flag. I assume batik in /usr/share/java Select the location according to your system One solution could be the following: create a scratch directory (I assume you are superuser, anyway you always can sudo commands)
mkdir scratch
cd scratch
jar -xf /usr/share/java/batik-rasterizer.jar
This output the content of the jar file into scratch, then create a MANIFEST.MF file or take the output one from the dump
cp META-INF/MANIFEST.MF .
Now edit the MANIFEST.MF file (I like to use vi, anyone use their preferred one)
vi MANIFEST.MF
Add a Class-Path: line into the MANIFEST.MF as for example:
Class-Path: batik-all.jar xmlgraphics-commons.jar xml-commons-apis-ext.jar pdf-transcoder.jar avalon-framework.jar avalon-framework-api.jar apache-commons-logging.jar apache-commons-io.jar
Then close the file and recreate the jar file
jar cmf MANIFEST.MF /usr/share/java/batik-rasterizer.jar org/*
Include all jar that batik has nested classes
Then you can use it!
java -jar /usr/share/java/batik-rasterizer.jar -scriptSecurittyOff -m image/png -d image.png image.svg
for example, and that's it!

No 'server' JVM at '...'

I'm running a java application that we distribute as a server-side system. I'm trying to write a launcher ("write" is somewhat of an overstatement here, I'm basically just copying the Java.exe file so that we can get the desired name in the process explorer of windows). This exe is in our bin/ directory of our application file tree.
Now, we also have a jre/ directory in our file tree, which is where Java.exe actually resides (we ship our product with the Java environment). When I use Java.exe as the launcher, which is located in \jre\jre1.6.0_21\bin, or if I place the copy (call this exectuable 'Orange.exe') I made in this directory, it works just fine. But, if I put my 'Orange.exe' in the bin\ directory, then I get the following error:
Error: no 'server' JVM at 'C:\Program Files\Java\jre6\bin\server\jvm.dll'
I think I understand what is happening here - I want to use the server version of the jvm.dll file, which is in our jre directory. The problem is, I don't understand WHY it doesn't look in the jre\jre1.6.0_21 directory in my application path. I've set my JAVA_HOME environment variable to this location. It seems like it's defaulting to another, system-wide expected location.
Does anyone know how I can change this, so that it looks in my application-provided java environment directory? Ideally, this will be an environment variable, as I need to call this application with parameters using a batch file.
There is a little trick to get the server JVM up and running:
Copy "server" folder from the JDK's JRE's bin folder example: C:\Program Files\Java\jdk1.6.0\jre\bin\server
Paste the "server" folder to JRE's bin folder example: C:\Program Files\Java\jre1.6.0\bin
Done
See official readme for details.
I've just been struggling with this same problem in Eclipse and I noted that as suggested by the answer above the JBoss site has a thread on this issue saying the same as the answer above to copy files from the jdk to the jre folder.
I noticed that you can avoid having to do this if you define the runtime to be the jdk when you create the server. I didn't find how to edit an existing server though.
AFAIK, the JRE usually doesn't ship with a server VM (only the client VM). If you really need the server VM, you have to use the JDK installation.
See Oracle Java for Developers Download page for JRE's with Server VM.
I had the same problem here but, in my case, I just had not properly update the JAVA_HOME and my PATH for my recently installed JDK.
I just updated it to my new JDK location and the server started just fine.
Windows looks for DLLs in LIBPATH environment variable.
And make sure your 1.6.0_21 is somewhere first in PATH.
I solved the same problem by setting the JAVA_HOME path to C:\Program Files (x86)\Java\jre1.8.0_131\bin
The easiest fix is simply to copy the contents of client folder inside bin and put in a newly created folder 'server' inside bin.
Copy from C:\Program Files (x86)\Java\jre1.8.0_261\bin\client
Paste in C:\Program Files (x86)\Java\jre1.8.0_261\bin\server
*server is the new folder
Make sure that server/jvm.dll file must be there when we are trying to run servers like servicemix.
Copy "server" folder from the JDK's JRE's bin folder example: C:\Program Files\Java\jdk1.6.0\jre\bin\server
Paste the "server" folder to JRE's bin folder example: C:\Program Files\Java\jre1.6.0\bin
I paced problem, I went through above..That's working fine.
Thanks!

how to use DEXtoJar

I find the solution to decompile a file dex to jar from this link http://code.google.com/p/dex2jar/downloads/list but i don't understand how to use it.
Follow the below steps to do so_
Rename your APK file(e.g., rename your APK file to .zip Ex- test.apk -> test.zip) & extract resultant zip file.
Copy your .dex file in to dex2jar folder.
Run setclasspath.bat. This should be run because this data is used in the next step.
Go to Windows Command prompt, change the folder path to the path of your dex2jar folder and run the command as follows:
d2j-dex2jar.bat classes.dex
enjoy!! Your jar file will be ready in the same folder with name classes_dex2jar.jar.
Hope this helps you and All reading this... :)
Download dex2jar https://code.google.com/p/dex2jar/downloads/list
Run dex2jar on apk d2j-dex2jar.sh someApk.apk
open jar file in JD GUI http://jd.benow.ca/
Follow this guide: https://code.google.com/p/dex2jar/wiki/UserGuide
--Update 10/11/2016--
Found this ClassyShark from Google's github pretty easy to view code from APK.
https://github.com/google/android-classyshark
// make sure that you downloaded release https://github.com/pxb1988/dex2jar/releases (for the ppl who coldnt find this link in /dex2jar/downloads/list
Step 1 extract the contents of dex2jar.*.*.zip file
Step 2 copy your .dex file to the extracted directory
Step 3 execute dex2jar.bat <.dex filename> on windows, or ./dex2jar.sh <.dex filename> on linux
Simple way
Rename your test.apk => test.zip
Extract test.zip then open that folder
Download dex2jax & Extract
Copy classes.dex file from test folder
Past to dex2jar Extracted folder
if use windows press Alt & D keys then type cmd press Enter(open to cmd)
run the command d2j-dex2jar.bat classes.dex
Download JD-GUI
Move classes-dex2jar.jar file to JD-GUI
Everything Done..
old link
the link http://code.google.com/p/dex2jar/downloads/list is old, it will redirect to https://github.com/pxb1988/dex2jar
dex2jar syntax
in https://github.com/pxb1988/dex2jar, you can see your expected usage/syntax:
sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
can convert from apk to jar.
want dex to jar
if you have dex file (eg. using FDex2 dump from a running android apk/app), then you can:
sh d2j-dex2jar.sh -f ~/path/to/dex_to_decompile.dex
can got the converted jar from dex.
example:
/xxx/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f com.huili.readingclub8825612.dex
dex2jar com.huili.readingclub8825612.dex -> ./com.huili.readingclub8825612-dex2jar.jar
want jar to java src
if you continue want convert from jar to java sourcecode, then you, have multiple choice:
using Jadx directly convert dex to java sourcecode
first convert dex to jar, second convertjartojava sourcecode`
Note
how to got d2j-dex2jar.sh?
download from dex2jar github release, got dex-tools-2.1-SNAPSHOT.zip, unzip then got
you expected Linux's d2j-dex2jar.sh
and Windows's d2j-dex2jar.bat
and related other tools
d2j-jar2dex.sh
d2j-dex2smali.sh
d2j-baksmali.sh
d2j-apk-sign.sh
etc.
what's the full process of convert dex to java sourcecode ?
you can refer my (crifan)'s full answer in another post: android - decompiling DEX into Java sourcecode - Stack Overflow
or refer my full tutorial (but written in Chinese): 安卓应用的安全和破解
If anyone is still looking for an easy way to decompile an APK (with resource decompiling), have a look at the tools I have created: https://github.com/dirkvranckaert/AndroidDecompiler
Just checkout the project locally and run the script as documented and you'll get all the resources and sources decompiled.
You can decompile your .apk files and download online.
http://www.javadecompilers.com/
Download latest dex2jar from here -> dex2jar
Run this command on linux -> sh d2j-dex2jar.sh classes.dex
Download java decompiler from here - > JD-GUI
Drag and drop the classes-dex2jar.jar file to JD-GUI
If you're looking for the version for windows get it from source forge:
https://sourceforge.net/projects/dex2jar/
It has the d2j-dex2jar.bat file you need
Download Dex2jar and Extract it.
Go to Download path
./d2j-dex2jar.sh /path-to-your/someApk.apk
if .sh is not compilable, update the permission: chmod a+x d2j-dex2jar.sh.
It will generate .jar file.
Now use the jar with JD-GUI to decompile it
After you extract the classes.dex file, just drag and drop it to d2j-dex2jar
Can be used as follow:
Download dex2jar here and extract it.
Download Java decompiler here (If you want to investigate .class file)
Get you release .apk file and change its extension with .zip
Extract .zip and find the classes.dex and classes2.dex
Paste these files into dex2jar folder where .bat file exist of dex2jar (normally names as d2j-dex2jar)
From dex2jar folder, open cmd [Shift+right click to see option to open cmd/power shell]
Type the command in cmd: d2j-dex2jar release.apk
You will get the .class file, open this file into Java Decompiler.
The below url is doing same as above answers. Instead of downloading some jar files and doing much activities, you can try to decompile by:
http://apk-deguard.com/

Install Eclipse plugin - "no repository found at jar"

I am trying to install a plugin I wrote.
Using Eclipse Add/Remove Software, I am using the "Add Archive" and choosing the zip file I just distributed.
(Plugin written and tested in eclipse-RPC and I try to install on MyEclipse)
During the installation I get: "no repository found at jar" error.
Any clue?
Please post the contents of the file, e.g. it's file and folder structure.
It seems that the ZIP file is not in the format of an Archived Update Site.
The ZIP file should contain the following items in the root:
plugins/
features/
site.xml
artifacts.xml
contents.xml