Need Jar Files for Appengine Samples - java

I need to run code samples that are on this page:
https://cloud.google.com/appengine/docs/java/datastore/queries
I've been able to locate jars for all but the following:
com.google.appengine.api.datastore.Query.Filter;
com.google.appengine.api.datastore.Query.CompositeFilter;
com.google.appengine.api.datastore.Query.CompositeFilterOperator;
Can anyone point me to where they are located?
I'm also a bit concerned that because I'm getting jar files individually
that I might run into some compatibility issues. Is there one
location that has jars for all the samples on the page I mentioned above?
Thx,
Steve

You need to download the GAE SDK and include it on you project. All those classes are included in there.
GAE is a pretty complex PAAS product. You'll need to setup the whole platform in order to use it, you cant just use some bits of it on its own.

Related

Plugins to add features to java

I'm working on a project that requires to add some features to an existing java application using Netbeans. After searching the net, i founded that I should use "plugins". I didn't hear of plugins before.
I have a java application that I should download it from the net, then lets say I have to add a button, when clicked, calls a function that is written in some class in the application. In other words I want to make a new class that is able to access the classes and functions that are written in this application.
What I understood from searching the net is that:
-In the downloaded project's folder there is a folder named plugins.
-This folder contains zip files that contains classes and other stuff.
-I should make a plugin and add it to this folder in order to add a specific feature to the application.
That's what I know, if there is something wrong in what I said, I'll be thankful to correct to me.
Now, my question is that I want a link or website that can teach me how to create and add a plugin to an existing java application. Thank you :)
That entirely depends on the java application you're talking about. Not every application has a Plugins functionality. And not every Java Application uses the same Plugin API. The best bet is to go to the site of the App you're talking about and see if they offer a documentation about their Plugin API.

Android PDF Viewer Library or muPDF library tutorials

I'm trying to read pdf files in my android application. I don't want to use the default pdf reader and simply open a new intent because I need my own GUI, and want to use the first page as a cover. Therefore I need to make my own pdf reader. I did some research and came across muPDF and Android PDF Viewer Library.
I tried to follow tutorial to implement Android PDF Viewer Library, from the github description. But the problem is that it loads pdf file forever. Do I need to do something else than just the steps in the description?
I can't find any tutorials for the muPDF library, are there any? How to implement it?
If there is no useful answer for the previous two questions, are there any good pdf library out there with tutorials and good documentation?
Thank you, hopefully, I will be able to solve my problem
MuPDF is a very good library, you can definitely use it. If you need a complete example of Android app using MuPDF, I suggest you to take a look at this customizable magazine app on Github.
first of all, if you want to use MUPDF inside an existing android app project you can follow the guide you find at this link (all credits go to the author, I didn't write this).
I am trying as well to integrate a very simple PDF reading/printing solution inside my app and i am struggling to strip down/simplify the MuPdf application demo you get by following that guide. I already managed (somehow) to remove annotation and file-picking features, but i would really need some help as well to get all the job done. There's really a lot of stuff and absolutely no documentation about this. I am simply trying to read the code and figure out what is needed and what is not, removing features one by one and being driven by the errors you get in catlog.
Also, as we both (if I understood correctly your needs) need just the PDF rendering features, would be great if someone points out how to (if possible) disable some of the unnecessary features built in the MuPDF library when building it from source (as DjVu support, just as an example).
Hope this helps, even if it is not a real answer to your question.
This is how I succeeded in building a MuPDF lib on windows with Cygwin, android-ndk
Download MuPDF 1.3 Source from https://code.google.com/p/mupdf/downloads/list
unzip to folder c:/mupdf-1.3-source
Install Cygwin:
Download and run Run setup-x86.exe from http://cygwin.com/install.html
when installing cygwin, make sure you selected make packages and C++ compilers
Make generate. open cygwin terminal, run
cd /cygdrive/
cd c/mupdf-1.3-source
make generate
Install android-ndk:
download android-ndk-r9d-windows-x86.zip and unzip it to
c:/android-ndk-r9d
Build mupdf lib: on windows cmd console:
preparation:
cd c:/mupdf-1.3-source/platform/android
copy local.properties.sample local.properties
edit local.properties, uncomment
#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
and change to
sdk.dir=REAL andforid-sdk Folder
build:
while still on c:/mupdf-1.3-source/platform/android, run:
/android-ndk-r9d/ndk-build
Upon the completion of the build, a folder named libs will be created under
c:/mupdf-1.3-source/platform/android
Create android apk.
Open eclipse, create a new android project from existing code, browse to c:/mupdf-1.3-source/platform/android, now you can create a mupdf apk.
Starting with Android 5.0 you can also use Android's internal PDF renderer and for manipulating PDF you can always use iTextg - just some alternatives for the future.
This SO answer lists some steps on how to rip essential pieces from the MuPDF Java sample app to one's own.
Preferably, I'd like to have a "ready to use" Java library I could attach to as a dependency. Is JNI preventing this or is it simply that no-one's gotten up to doing one?
Well, jmupdf is there (mentioned in this duplicate) but that lists Windows and Linux (not specifically Android) as the tested platforms. It seems desktop and dead to me (no changes in 12 months). At least compared to the vibrance of MuPDF itself.

Implementing Rest Api JAVA client android eclipse

I am a newbie to Android development so apologies if i am missing something obvious here. I am using Eclipse to put together a simple Android program that will consume a couple of Rest web services. I am attempting to use the Resting API to accomplish this.
I have copied the Resting JAR file into the libs folder of my project and its in the build path however I can't reference any of the Resting classes, i attempt to include the appropriate imports but they fail to resolve.
Has anyone got a complete sample of using Resting to consume a restful web service? Should I look to use a different library perhaps? Simplicity is key for me so the lighter the library the better.
Thanks hugely for any advice you may have
I think the resting jar file may be an archive file which in turn contains all the jar files required to use resting. You need to open the archive using a tool like winrar, extract all the jars inside, put them in the lib folder of your project and reference.
Resting seems fairly simple and lightweight. Mostly, one step.
I haven't used Resting API but I have used Jersey and it is easy to use. Give it a try. As per the referencing things, things should resolve once you add the dependencies. You might need to read a bit how Eclipse handles that.
Resting sample code:
List products = new RestingBuilder("http://myapis.com/productservice",Product.class)
.setPort(8080)
.setVerb(Verb.GET)
.setTransformationType(TransformationType.JSON)
.setConnectionTimeout(3000)
.build();

Multiple library in tomcat both new and old version

A developer left from my company and the project he is working on, handover to me.
I download the file commons-fileupload-1.2.2.jar(59Kb) to upload the file. When I want to paste the copy of commons-fileupload-1.2.2.jar(59Kb) in WEB-INF\lib. I have seen that commons-fileupload.jar(21Kb) already exist.But this is old and not fulfill my requirement, because all the classes that have in commons-fileupload-1.2.2.jar(59Kb) not found in commons-fileupload.jar(21Kb).
So, I use commons-fileupload-1.2.2.jar(59Kb) library
50% classes in commons-fileuploadjar(21Kb) also have in commons-fileupload-1.2.2.jar(59Kb) but not all.
Will It create problem in future after deployment or not,because classes duplicate ?
Replace the old jar with new jar and test the file upload functionality before you promote to production. There wont be any problems. If at all there are any then you will catch them during testing anyway. In fact, you doesn't have any other option as old version is not meeting your requirement anyway.

How do I include JavaHelp with my Eclipse project?

I am writing some applications that require to have a Help Contents system tied to it. I came across JavaHelp which seems perfect for what I need.
The issue I am having is that when you download JavaHelp, it comes with its own bin folder which looks like you are suppose to use separately. However, I am pretty sure if I just copy some of the JAR files I should be able to just place them in the hierarchy in my Eclipse and use it in the project.
What JAR(s) would I need to copy so I can use JavaHelp in my application?
Update
I got JavaHelp working rather easily. I had issues with the built in Eclipse Help though. But I appreciate both of your answers!
If anyone is interested in knowing how to add JavaHelp to your project (doesn't have to be Eclipse specific), I will be more than happy to provide the answer here.
The JavaHelp README details the redistributable jar files that are supplied in the download. Select the jar that suits your needs and add it to your Eclipse project.
While JavaHelp is a good api, Eclipse has its own api for help, and (IMO) it's a much better option for SWT based applications. See this developerworks article on developing help using the Eclipse help system.
If you're actually creating a swing application, and want to package java help with it, you'll need to create the help documents (help topics, helpset file, map file, TOC, index, full-text search db) and then package those files into a jar for distribution with your application. See the JavaHelp Users Guide for details.
For running the help viewer from the Eclipse IDE (and from your application at runtime), all you need is the jar file jhall.jar from the JavaHelp distribution.

Categories

Resources