File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to use java properties from an interface

 
bob morkos
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone help with my code below, for it to work. Or is it not possible from an interface point of view. How can I go about it? Any help would be gladly appreciated. Thanks in advance.

[This message has been edited by Peter Tran (edited November 16, 2001).]
 
dan moore
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Bob,
not quite sure what you're trying to do here, but definitely the interface thing is a problem. interfaces are for defining constants and method signatures (method names, parameters, parameter types and method return types). you cannot put any significant code in them.
probably best off sticking to a class for now (replace interface with class), put all your code in a TransformIf() constructor, move filePath etc. to top of your class.
i would give you more help, but the embedded subliminal.message is making me worried that there is a moral dimension to all this.
hope that helps.
cheers, dan.
 
bob morkos
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I want is to have a class that loads my properties and in which I can call my variables anywhere in my application like an interface. By just implementing the interface, I get all the variables intialized in the interface. What I was doing is the same but instead of an interface, I wanted to use properties. Thanks again for replying and I hope you understand what I 'm trying to do.

Originally posted by dan moore:
hi Bob,
not quite sure what you're trying to do here, but definitely the interface thing is a problem. interfaces are for defining constants and method signatures (method names, parameters, parameter types and method return types). you cannot put any significant code in them.
probably best off sticking to a class for now (replace interface with class), put all your code in a TransformIf() constructor, move filePath etc. to top of your class.
i would give you more help, but the embedded [b]subliminal.message
is making me worried that there is a moral dimension to all this.
hope that helps.
cheers, dan.[/B]

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic