Downloading google app engine database (java project) - java

I would download the google app engine datastore. I'm following several guides, but none of those helps me.
My web.xml file is setted correctly for the use of remote_api.
I have installed the python sdk and relative google appengine launcher.
I run these instructions in ../Google/google_appengine:
bulkloader.py --dump --application=appID --url=http://appID.appspot.com/remote_api --filename=x.dump
The result is: "Have 11 entities, 0 previusly transferred"; "11 entities transferred in .. seconds"
But I don't find this file, so I don't know if the download is occurred.
I have to create the .dump file previously or it is created automatically.
I have the same problem also with the "--download_data" command.

It works if change the --filename path (where it saves the .dump file).
Probably ../Google/google_appengine folder is protected.

Related

Why am I getting parsing error when opening APK file from app cache?

I'm trying to download an APK file online from within my app and then install it using Java. My code basically, downloads the file to the device from my server and then uses an Intent to open the installation message from the package manager and allow the app to be installed.
It works perfectly for me... unless I save the file to cache instead of regular storage. If I save it to cache instead, I get an error that it could not parse the APK file.
I checked and it is downloading the entire file to the cache correctly, but it just not installing. Any ideas?
The only difference in my code is that instead of using Environment.getExternalStorageDirectory() + "/file.apk" I'm trying to use context.getCacheDir() + "/file.apk" as for my file path.
I want to put the file in the cache so that Android can handle the cleaning of the file and so that I don't need to worry about handling write permissions on different Android versions and the variations of dealing with external storage.

How to download application from Google Cloud Platform Java Flexible Environment

I am trying to download Application from GCP using this link: Downloading Your Application. But it looks like this works only for the Standard environment cos code executes without errors but nothing is actually downloaded after. Output is:
AM Host: appengine.google.com
AM Fetching file list...
AM Fetching files...
What will be the solution to achieve the same result in Flexible environment?
When you deploy an App Engine Flexible application, the source code is uploaded to Cloud Storage on your project in a bucket named staging..appspot.com. You can navigate in this bucket and download the source code for a specific version as a .tar file.
Alternatively, you can find the exact Cloud Storage URL for your source code by going to Dev Console > Container Registry > Build History and select the build for your version. You'll find the link to your source code under Build Information.
One thing to note however is that the staging... bucket is created by default with a Lifecycle rule that deletes files older than 15 days automatically. You can delete this rule if you want so that all versions' source code is kept indefinitely.

Where to find the created file in Android emulator in Windows

I created a simple file write/read app in Eclipse and have successfully tested that it could read what it wrote. The structure is fairly simple. I use FileOutputStream to write a samplefile.txt using openFileOutput and a FileInputStream using openFileInput to read it back. The only minor thing is that I don't know where is the file on my physical hard drive? Can anybody point me to where I could find the file in Windows?
If you dont give a absolute path the file will be creataed in aplication directory.
This is /data/data/packge-name-of-your-app/
e.g:
/data/data/com.example.test/
See more http://developer.android.com/training/basics/data-storage/files.html
Go to DDMS perspective, select the emulator which you are using, go to package explorer tag ,then you will get a list of folders hierarchy.
Go to /data/data/
Now you will see a list of packages installed, search for the package name of your app and expand it.
Here you will see the files which your application created when it was running.
P.S : You cannot find this file on the physical drive of your computer,because it is present in the storage of the emulated android virtual device. This storage cannot be directly accessed by you.

Unable to create log files in "c\program files\appName\" or "c\program files (X86)\appName\"

I am using JDK 1.6.0.25 with windows 7 64 bit OS and I have an stand alone application in java.After installing if I open application it creates logs folder and applogs.log file in build directory.
When I install it in "c\program files\" or "c\program files (X86)\" directory and If I open application it does not creates logs folder and applogs.log file.To create logs I have simple used "io api" of java.
I have searched a lot regarding this issue and found that there is no permission to write in c\program files\ or c\program files (X86)\
sol 1: by change the security option of folder to change the permission.
sol 2: by using java 7 and use method setPosixFilePermissions() to change the permission.
I don't want to use above both solution because there is some dependency.
I have one more application and having logging facility by using log4j api.I found that it creates log files in above conditions.
Please give me some some solution other than above solution or how it creates by log4j api.
You should use the user's home directory for something like that. The simplest approach is to read the Java System property user.home
System.getProperty("user.home")
How to get local application data folder in Java?

Applet Trouble : java.lang.NoClassDefFound

I'm having a bit of trouble with an applet using the SDK for the u.are.u 4500 biometric fingerprint reader.
When I test the applet locally using NetBeans, the applet works fine.
The problem is when I try to publish the applet.
I always get the "java.lang.NoClassDefFound".
I modified the java configuration so that the server config and my workstation config matches.
The SDK is installed in c:\java\jdk1.7.0_07
The JRE is installed in c:\java\jre7
The jar files for the biometric fingerprint reader are:
dpfpenrollment.jar
dpfpverification.jar
dpotapi.jar
dpotjni.jar
The CLASSPATH is:
C:\Java\jdk1.7.0_07\jre\lib\ext;
C:\Java\jdk1.7.0_07\jre\lib\ext\mysql-connector-java-5.1.22-bin.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpfpenrollment.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpfpverification.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpotapi.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpotjni.jar;
JAVA_HOME is:
c:\java\jre7
I have tried putting the jar files in the lib folder, put the result is the same.
I googled for this error, but nothing I find helps me solve this.
Any help is appreciated...
Thanks
The CLASSPATH is:
C:\Java\jdk1.7.0_07\jre\lib\ext;
C:\Java\jdk1.7.0_07\jre\lib\ext\mysql-connector-java-5.1.22-bin.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpfpenrollment.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpfpverification.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpotapi.jar;
C:\Java\jdk1.7.0_07\jre\lib\ext\dpotjni.jar;
No, no, no. As mentioned by EJP, that is not what the ext directory is for. Furthermore, the end users will not have those Jars in the ext directory, and even if they are, they will not be added to the run-time class-path of the applet.
If the applet requires those Jars, they need to be put in an accessible path on the server, while the codebase should point to that place and the archive attribute might be something like:
archive='mysql-connector-java-5.1.22-bin.jar,dpfpenrollment.jar,dpfpverification.jar,dpotapi.jar,dpotjni.jar'
The MySQL jar is a bit worrying as well. An applet should not have direct access to the DB, but that access should instead be mediated by server side functionality. If your applet can access the DB, a malevolent user can reverse engineer it and access the DB directly.

Categories