I get java is not recognized as an internal or external command operable program or batch file. I tried changing the patch in environment variables to C:\Program Files (x86)\Java wich is the folder my java installer says it's in as I reinstalled this multiple times. still no java found. what can I do?
Your path should add <path to java home>\bin, instead of <path to java home>.
I would also suggest to remove white spaces from the path, because they might cause problems.
Sent from my Gingerbread on Dream using XDA App
Related
Hello all,
I need some help signing my APK files. I have done everything correctly up to the point of signing the file.
I am running the command:
jarsigner -verbose -keystore -my-release-key.keystore oriental.apk alias_name
Jar signer then asks for my password I set up. i put in the password and get:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 1110 but got 1119 bytes)
I have scoured the web for hours and tried a few things. All lowercase name ofr the apk file as suggested somewhere. i am at a loss.
Anyone know how to fix this?
Need to do this on an unsigned apk file...
I ran into this same problem for an android apk using Eclipse. I don't know if your running into the exact same problem. But, I'm guessing the principles are similar.
To fix this I had to do the jarsigner on an unsigned apk file. If you are using Eclipse, the apk is signed with a temporary key (which I think the android market won't allow).
If your using something else, you can see if your apk is already signed using syntax like:
$ jarsigner -verify -verbose my_application.apk
To get an unsigned apk in Eclipse, right click on application name in the Package Explorer window and choose Android Tools, then choose "Export Unsigned Application Package...". Save the package to a new location.
Once you have an unsigned apk. Run the jarsigner command you were using on the unsigned apk file.
This is also possibly explained better (at least for an android user using Eclipse) at:
http://developer.android.com/guide/publishing/app-signing.html
Like I said earlier if your not using Eclipse to generate an apk, possibly the tool your using has similar options to create an unsigned apk file.
Using autosign in Win7 and get an error about Java not being an internal or external command. How can one resolve this?
zeroplace said:
Using autosign in Win7 and get an error about Java not being an internal or external command. How can one resolve this?
Click to expand...
Click to collapse
From the sounds of it either you dont have java installed or its path not set on your pc.
Droid Heaven said:
From the sounds of it either you dont have java installed or its path not set on your pc.
Click to expand...
Click to collapse
Thank you Droid. I will check those out. I figured I would get a smart a** comment or someone saying search. Thank you for not being like most. Will let you know.
Looks like everything is setup properly. I even tried reinstalling Java. Still getting the same error. Im stumped.
ok i was getting lots of errors
go to system properties (windows key+pause break shortcut)
then advanced then choose enviroment variables
then classpath click and edit
make sure the path goes directly to the testsign.jar mine is ;.;C:\Users\SI\Desktop\AutoSign\testsign.jar
the select path and edit same again this one goes to your autosign folder
mine is ;.;C:\Users\SI\Desktop\AutoSign
also download Auto-Sign v0.65(do a search)unrar
put your .zip rom in folder named as update.zip
select autosign.exe select update.zip from drop down and click autosign
hope this helps
Make sure "java.exe" is in your PATH evironment variable.
Open a command prompt and type "java.exe"
If it says 'java.exe' is not recognized ....
Then you have not set your PATH environment correctly.
I found a easier alternative to using autosign.bat for signing files.
You still need the file "testsign.jar" but you don't have to modify your CLASSPATH environment variable.
Just make sure the testsign.bat and testsign.jar are together in a directory that is also in your path.
Just copy the following code to a batch file named "testsign.bat":
Code:
@echo off
if "%1"=="" goto usage
if not exist "%1" goto notfound
ECHO.
ECHO **************
ECHO Signing File!
ECHO **************
ECHO.
java -classpath "%~dp0testsign.jar" testsign %1
ECHO.
ECHO File signed successfully if no Errors above.
ECHO.
goto end
:notfound
echo.
echo Error, File not found "%1"
echo.
goto end
:usage
echo.
echo Error in script usage. The correct usage is:
echo %0 [FileToSign.zip]
echo.
echo You may also simply drag and drop a file onto this batch file in Windows Explorer.
echo.
:end
pause
okay, so there is a bug in the custom ROM that i put on my phone and it requires some ADB commands to fix
i am trying to install Android SDK to get ADB, but it tells me that i need to install Java JDK
so i've downloaded the 6u23 version of JDK for my windows x64, and installed it ... and i ran the Android SDK installer again, and it still says that i dont have Java JDK installed
how do i install the Android SDK?
right, so i've downloaded the Android SDK zip file , and adb.exe is not under the /tools folder
where can i get adb.exe??
use path to find java
I think you need to add to your environmental variables in the line "path" append to the back end of it < ;path to java>. The path to java may be like C:\Program Files\Java.
You get to environmental variables by going Control Panel > System > Advanced Settings.
donob09 said:
I think you need to add to your environmental variables in the line "path" append to the back end of it < ;path to java>. The path to java may be like C:\Program Files\Java.
You get to environmental variables by going Control Panel > System > Advanced Settings.
Click to expand...
Click to collapse
I've got the same issue. No matter what I try I can not get SDK to recognize the fact that JDK 6u23 is on the Vista_64 I'm running.
I've tried to edit the system variable path, but I must be missing something. I'm not really sure of the proper commnad string, and there are even a couple of places that look attempt worthy, so that is what I did, I edited the path, rebooted and still nothing, undid that change and tried it uncer environment variables, still nothing. So I've gone back and undone the changes. Any details on the editing process you suggest might just to the trick. Thanks for helping a nub.
EDIT: Ok, here is what worked for me: In the advanced system settings, environment variables, I noticthed that the CLASSPATH had the path string commenced with "." and ";" thats a dot and a colon. i.e. .;C:\Program Files\Java... This was something that windows or oracle or some sub-routine must have put in place. I certainly didn't them there. I decided to delete the two special charaters so the string for my is set thus: CLASSPATH C:\Program Files\Java\jre 1.6.0... After I changed it, I ran the windows installer and the program went right through, reported finding JDK and intalled the components in SDK. What a relief cuz I was high centered on a rock. Glad I noticed that and deciede to take a hack at it. Just lucky I guess.... Cheers all!
Hey guys, I am new to this forum so apologies if I'm posting in the wrong category. I want to run some psd files I have through drawPatch9 but I can only seem to get as far as the android-sdk-windows folder in command prompt (windows 7). I have the correct jdk and can run eclipse with no probs, just can't navigate to android-sdk-windows/tools. I get "system cannot find specified path" when I try "cd tools". I also tried tabbing through android-sdk-windows folder and I only get add-ons, docs, SDK Manager, SDK Readme and uninstall, no tools or platform-tools directories. I couldn't find a solution here or elsewhere, hoping someones ran into this before. Thanks in advance.
I can't believe no one's answered this. The SDK tools were moved to android/platform-tools, and you will need to open the SDK Manager and install the platform-tools package.
u can also add the directory to your path environment variables.
Assuming your running windows rightclick mycomputer>properties>advanced system settings>environment variables.
system variables box find path click edit and add the complete path use ; as a seperator
this way you can execute the tools from any directory
Sent from my LG-P999 using XDA
It seems it is not an easy thing to start android development. I followed the official instruction and tried to run the MyFirstApp example from developer.android.com on my Windows 7 64bit machine with AVD. But after 2 days effort, I am still cannot make it work for me in Eclipse and in adb command line.
The best I reached in command line approach is the following -- the second block with italic words shows the error I got:
Code:
E:\Workspace\MyFirstApp>ls bin
AndroidManifest.xml build.prop
AndroidManifest.xml.d classes
MyFirstApp-debug-unaligned.apk classes.dex
MyFirstApp-debug-unaligned.apk.d classes.dex.d
MyFirstApp-debug.apk dexedLibs
MyFirstApp.ap_ proguard.txt
MyFirstApp.ap_.d res
[I][B]E:\Workspace\MyFirstApp>adb install bin\MyFirstApp-debug.apk
failed to copy 'bin\MyFirstApp-debug.apk' to '/data/local/tmp/MyFirstApp-debug.a
pk': No such file or directory
rm failed for /data/local/tmp/MyFirstApp-debug.apk, No such file or directory[/B][/I]
I hope somebody can help me about these:
1. I am in Windows with AVD, why adb want to find /data/local/tmp, which is linux style location?
2. where does the adb try to copy the apk file to? My SDK is installed under "C:\Users\myname\AppData\Local\Android\android-sdk". There is no space in the address path. The source apk file is ready and should not be the cause of that error, I think.
3. Any configuration of the installed SDK needs to be modified in Windows machine? I think the SDK manager should be able to figure out what the machine is and download/install appropriate components for the user. Is that right?
I have similar or the same issue by using Eclipse.
thanks,