Paul Clapham wrote:I would start by finding out what "doesn't work" means. Have a look at our FAQ entry ItDoesntWorkIsUseless for tips on how to do that.
Also, I wrapped your posted code in the "Code" tags for you. See how much easier it is to read now? To do that, just select your code after you paste it into the posting box and click the "Code" button you'll see above the box.
Ernest Friedman-Hill wrote:Well, my friend, the very constructor you link to in your first post is the one that takes an OpenDocument as a constructor argument. It is a public class, and it's a public constructor. Altogether, this suggests that what I propose is not only entirely possible, but absolutely doable. If something's going wrong, it's possible that
1) You don't have this library available to the compiler (i.e., not on class path)
2) You're using a different version of the library than the one documented there
3) You've got other classes with the same names, and the compiler is importing the wrong ones
4) Something else is wrong.
In any case, if you were to share your actual compiler error messages, I am sure we could get you back on the right path.
Ernest Friedman-Hill wrote:Hi,
Welcome to JavaRanch!
Well, that class takes an OpenDocument as a constructor argument, and OpenDocument, in turn, has a public constructor that takes a File. So in theory,
Now, whether this makes any sense to do, I can't tell you -- the documentation for this library seems very weak, and I don't know if these classes are intended to be used this way.