Open GoogleCodeExporter opened 9 years ago
The problem is in FileConfig.java of the Orkut API
(orkut-os-client\java\src\com\google\orkut\client\config\FileConfig.java).
There's a variable called CONFIG_FILE as follows:
public final String CONFIG_FILE = "sample/oauth.properties";
That's OK for when you run the sample through command line, but when you try to
build your own project with the orkut JAR it's a problem, because the JAR you
have generated has that preestablished path into it.
My solution was to delete that variable declaration and pass it as a String to
the FileConfig constructor like this:
public FileConfig(String propfile) throws IOException {
FileInputStream fileInputStream = new FileInputStream(propfile);
props = new Properties();
props.load(fileInputStream);
fileInputStream.close();
}
This way every time you call FileConfig you have to pass YOUR propfile path.
You should change all the calls to this constructor (there're not so many), in
BatchTransaction.java and Transport.java.
After that rebuild the project with "ant" / "ant dist" to re-generate the
"correct" JAR. And that's all.
Hope that helps,
Natalia
Original comment by natalia....@gmail.com
on 9 Nov 2010 at 2:53
Original issue reported on code.google.com by
snchandr...@gmail.com
on 31 May 2010 at 6:53