简体   繁体   English

我的应用程序的Flex,Java,BlazeDS和配置文件

[英]Flex, Java, BlazeDS and config file for my application

I'm programming Rich web applications with Flex and Java on Flex Builder 3 using blazeDS and SharedObjects. 我正在使用blazeDS和SharedObjects在Flex Builder 3上使用Flex和Java对Rich Web应用程序进行编程。 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? 因此,我需要我的Java类在第一次读取它,但是读写文件的java的默认路径是c:\\ program files \\ Flex Builder 3,而不是tomcat webapps目录中的我的应用程序目录。从Java类的配置文件,而无需写在Java中硬编码的路径?

The SharedObjecs should only be written and read by your Flex application! SharedObjecs仅应由您的Flex应用程序编写和读取!

For accessing the file system (on the server side) from Java you can use an environment variable. 要从Java访问文件系统(在服务器端),可以使用环境变量。 Create and/or edit the setenv.sh|bat file in your tomcat/bin like this: 在您的tomcat/bin创建和/或编辑setenv.sh|bat文件,如下所示:

# setenv.sh
export MYAPP_HOME=/etc/myapp

# setenv.bat
set MYAPP_HOME=c:\myapp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM