This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See then i modify it as: File f=new File("%JBOSS_HOME%\\test.txt"); f.createNewFile(); the "JBOSS_HOME" is definde in its "run.bat " file. the code still don't work. who can tell me : 1 how can i use the environment variable of os or app server? 2 how and where can i set up a envrionment variable as the base dir ? thank you.