Re: [google-appengine] How can I use java.io.File(filePath) in AppEngine?

2014-01-22 Thread Nick
This is how we load it during our DI phase: String certificate = "/someuniqueid-privatekey.p12"; File privateKey = new File(getClass().getResource(certificate).toURI()); ... builder.setServiceAccountPrivateKeyFromP12File(privateKey); In this example, the p12 file is in our src/main/resources.

Re: [google-appengine] How can I use java.io.File(filePath) in AppEngine?

2014-01-22 Thread Alejandro Gonzalez
Hello Juan, maybe with an example is more clear: URI keyURL; String fileName = "google_bigq.p12"; keyURL = BigQueryAPIManager.class.getClassLoader().getResource(fileName).toURI(); GoogleCredential credential = new GoogleCredential.Builder().setTrans

Re: [google-appengine] How can I use java.io.File(filePath) in AppEngine?

2014-01-22 Thread Juan de Dios Becerra
What you mean when say "then read file normally" is that I can use the same new ava.io.File(filePath) function? I guess this line: *InputStream stream = this.getServletContext().getResourceAsStream(path);* is only to collect the inputsream that you refer, but I don't use *stream * variable? El

Re: [google-appengine] How can I use java.io.File(filePath) in AppEngine?

2014-01-21 Thread Vinny P
On Tue, Jan 21, 2014 at 3:55 PM, Juan de Dios Becerra < j.becerra4...@gmail.com> wrote: > I am trying to use Google + Domains API in GAE, but when I try to create a > GoogleCredential I need to use this: > > .setServiceAccountPrivateKeyFromP12File(new java.io.File(filePath)) > > Where filePath is

[google-appengine] How can I use java.io.File(filePath) in AppEngine?

2014-01-21 Thread Juan de Dios Becerra
I am trying to use Google + Domains API in GAE, but when I try to create a GoogleCredential I need to use this: .setServiceAccountPrivateKeyFromP12File(new java.io.File(filePath)) Where filePath is a .p12 extension file(private key for authentication) this file I put in WEB-INF folder and I gra