Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (307)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  default properties file  (Read 992 times)
0 Members and 1 Guest are viewing this topic.
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Posted 2004-04-28 13:12:48 »

A *loooong* time ago I remember playing with a file that went in your cwd or somewhere on the classpath that was loaded, by default, and the properties in it were stuffed into the system properties. I'm not sure if the method for loading some 'default' properties exists any more (I certainly don't use it), but I am sure it at least used to, and its one of those things thats is going to drive me mad if I don't find out Smiley. So, does anyone have any ideas what the file was called, java.properties, or system.properties i thought. Any ideas?

Endolf

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #1 - Posted 2004-04-28 13:33:39 »

Don't you just use the java.util.properties package, and then programmatically store / retrieve / delete whatever you want?

Or am I missing the point entirely?

malloc will be first against the wall when the revolution comes...
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Reply #2 - Posted 2004-04-28 13:42:56 »

Thats what I do now, yes, but i'm sure there was a file that was automatically loaded into system properties if it existed.

Endolf

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #3 - Posted 2004-04-28 14:08:38 »

Whenever I've used Preferences, all the get* methods need a default arg which is used if the actual value isn't found, which is how I handle defaults (plus a big class which defines all the defaults).

You could write a load of defaults, then export it as xml. Then distribute the xml and load it into preferences first time you run your app. Could cause problems if people go manually tinkering in the registry though.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline endolf
« League of Dukes »

JGO Coder


Medals: 4
Projects: 1


Current project release date: sometime in 3003


« Reply #4 - Posted 2004-04-28 14:26:11 »

Ok, I think i mis stated this. I know how to load a properties files, I know about including defaults in the get methods, this is a specific query as to something that is bugging me. I'm sure I have used in the past a file, dumped in cwd or somewhere in the classpath, that no matter what code I ran, and with no adjustments to it, would automatically get loaded. Usefull for sticking in system properties for debugging/logging information that you don't have the code for, when you can be bothered to type -D on the command line in a startup script of some sort.

It's not about solving a problem, it's about remembering something I used to do. It's bugging me that I can't remember, even though i'm not going to use it. Like trying to remeber how to write text to the screen in pascal, i'm *never* going to need to use it again, but the other day it was bugging me as to how I used to do it.

Hope thats clearer, although english is my first language, i'm still crap at it Smiley

Endolf

Offline kevglass
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« Reply #5 - Posted 2004-04-28 15:04:23 »

Quote

Hope thats clearer, although english is my first language, i'm still crap at it  


Had to quote it, Smiley

The file you're thinking of is "java.properties", we used it at Lucent for that LDAP thing, I don't think the java world still supports it, as I rememeber it was something to do with the ORB we were using at the time.. Visibroker? used to pull all the properties out and stick them in system properties. Or was it to do with the signing process...

Damn, now you've got me started..

Kev

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
mrbenebob (19 views)
2013-06-19 14:55:23

BrassApparatus (29 views)
2013-06-19 08:52:37

NegativeZero (32 views)
2013-06-19 03:31:52

NegativeZero (34 views)
2013-06-19 03:24:09

Jesse_Attard (39 views)
2013-06-18 22:03:02

HeroesGraveDev (75 views)
2013-06-15 23:35:23

Vermeer (76 views)
2013-06-14 20:08:06

davedes (77 views)
2013-06-14 16:03:55

alaslipknot (69 views)
2013-06-13 07:56:31

Roquen (92 views)
2013-06-12 04:12:32
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!