Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Eclipse and File Properties

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 08-03-2010
Member
 
Join Date: Dec 2009
Posts: 204
Eclipse and File Properties
  

Hello,
Here is my problem, I encode two classes in java, which I serve to read. With the properties, No pb, I can read a file.properties as I am not in eclipse. But I use eclipse, it sends a message that it can not find the file.properties while he is in the same folder where the two classes. Hope you guys will help me with the problem. Thanks in advance.

Reply With Quote
  #2  
Old 08-03-2010
Member
 
Join Date: Dec 2009
Posts: 211
Re: Eclipse and File Properties

Hello,
I have a similar kind of a problem with eclipse and the properties file. My tree is very simple. There is one package and all my classes are inside. To access the properties, I have defined getters. But if I go under my workspace and my package through a shell and that I run. Class, no pb to read. Properties gets all my values. That's when I'm in eclipse and I compile it to work more. But for my other projects without. Properties all compiles and runs. This is not a path bp. So, if any one has a solution for this then it would be great. Thanks for your help.
Reply With Quote
  #3  
Old 08-03-2010
Member
 
Join Date: Nov 2009
Posts: 347
Re: Eclipse and File Properties

Hello,
Because I think that goes right to the filename which you have mentioned in the Eclipse IDE. Properties instead of the road. What I think is that if this file is the same place as the two classes that are in the package my_package, then you must access it through "my_package / example.properties" and not by "example.properties" shortcut file. I hope you are getting the point what I am trying to explain here.
Reply With Quote
  #4  
Old 08-03-2010
Member
 
Join Date: Dec 2009
Posts: 204
Re: Eclipse and File Properties

Hello,
Thanks for your replies, but no, none of the solutions proposed is not working. I actually put the file in the root of the project, I also indicated the path. Nothing at all. My path of the file is as follows
Code:
workspace / MyProject / my_package / my-src.
In my src is my Properties files. I have a package. Yet when I go out of eclipse, everything works perfectly, but the properties file have a problem, I do not know what exactly is the problem with the properties file.
Reply With Quote
  #5  
Old 08-03-2010
Member
 
Join Date: Nov 2009
Posts: 333
Re: Eclipse and File Properties

Hello,
It will not always know exactly how you can access your files? You showed us several types of access but it is unclear what lies behind. Furthermore we do not know your tree if it works. Finally the error message could be useful to use for debugging. But now you just show us the code using a class (Access) which we know nothing about. I do not see how you could help with so little info. Any information on this is need to give you a exact solution for your problem.
Reply With Quote
  #6  
Old 08-03-2010
Member
 
Join Date: Nov 2009
Posts: 518
Re: Eclipse and File Properties

Hello,
I might suggest you put an absolute path to your properties file, but it's not clean and you can not move your project. If your file is in your src if you tell him "my_package / mes_src / some.properties" is usually good. And also I more suggestion, do not use backslashes for file paths. Whether you bristle under Linux or Windows, use the simple slashes or method file.separator () for separators. Try with my_package / src / some.properties. Hope the tips will help you with your problem.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Eclipse and File Properties"
Thread Thread Starter Forum Replies Last Post
Eclipse not compiling my Java file Valliy Software Development 4 25-07-2010 12:30 AM
Reading properties of a file TechGate Software Development 5 14-02-2010 05:46 AM
Properties of .ini file Logan 2 Software Development 5 25-01-2010 01:43 PM
how to browse ftp file in eclipse Ashton5 Technology & Internet 3 17-06-2009 04:58 PM
C#.net how to access properties of a file? Henrietta Software Development 1 11-08-2008 01:47 PM


All times are GMT +5.5. The time now is 01:27 PM.