2013年9月22日星期日
java application into exe files . How to get exe file path where
------ Solution ---------------------------------------- ----
string current_dir = Environment.CurrentDirectory; \ \ get the root directory
string config_file = current_dir + "\ \ owaoma.ini"; \ \ root directory of the file
java forums, long time did not come
in. net is written as
java main method is also with this function when running system.out.println (current_dir) output in the root directory of the black form that is exe position
---- - For reference only ---------------------------------------
xml file put exe program and sibling to a folder. With new File ("test", "test.xml"); This run inside Eclipse and build jar runs without problems, but when students become exe missing tips I can not find the path , and then I get the absolute path , but this is the absolute path for the system temporary path . Eg : C: \ Documents% 20and% 20Settings \ liying \ Local% 20Settings \ Temp \ test \ test.xml. Get absolute path method is this. URL urls = getClass (). GetResource ("GlobleValue.class"); path = urls.getFile (). Replace ('/', File.separatorChar); < br> ------ For reference only ---------------------------------------
wood was it ? Seeking support
------ For reference only ------------------------------------ ---
resolved. Oh . Thank you upstairs
------ For reference only ---------------------------------- -----
ask is how to solve this problem ?
------ For reference only -------------------------------------- -
prawn , can provide about the java is how to solve it ? Urgent Oh !
订阅:
博文评论 (Atom)
没有评论:
发表评论