Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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 1291 times)
0 Members and 1 Guest are viewing this topic.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Posted 2004-04-28 11: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 11: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

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #2 - Posted 2004-04-28 11: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: 56
Projects: 11


Monkey for a head


« Reply #3 - Posted 2004-04-28 12: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

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #4 - Posted 2004-04-28 12: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

« JGO Spiffy Duke »


Medals: 212
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2004-04-28 13: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.

 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!