I'm programming Rich web applications with Flex and Java on Flex Builder 3 using blazeDS and SharedObjects. Now I need that my program will use configuration file. so, I need that my Java class will read it at the first time but the default path of java to read and write files is c:\program files\Flex Builder 3 and not my application directory inside the tomcat webapps directory How can I read the config file from the java class without write the path hardcoded in the java?
Asked
Active
Viewed 492 times
1 Answers
0
The SharedObjecs
should only be written and read by your Flex application!
For accessing the file system (on the server side) from Java you can use an environment variable.
Create and/or edit the setenv.sh|bat
file in your tomcat/bin
like this:
# setenv.sh
export MYAPP_HOME=/etc/myapp
# setenv.bat
set MYAPP_HOME=c:\myapp

splash
- 13,037
- 1
- 44
- 67