wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes I want to use java properties from an interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "I want to use java properties from an interface" Watch "I want to use java properties from an interface" New topic
Author

I want to use java properties from an interface

bob morkos
Ranch Hand

Joined: Sep 06, 2001
Posts: 104
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

Joined: Nov 04, 2001
Posts: 68
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.


dan moore, infomatiq ltd.<br />email dan@infomatiq.co.uk<br /><a href="http://www.infomatiq.co.uk" target="_blank" rel="nofollow">http://www.infomatiq.co.uk</a>
bob morkos
Ranch Hand

Joined: Sep 06, 2001
Posts: 104
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
 
subject: I want to use java properties from an interface
 
Similar Threads
properties file
writing to file
HttpServletResponse obj lost after using System.getProperty
Related String
Relative Path Problem