Hi Jacopo! your script works, but I think that more correct one will be: =============================================== echo off %~d0 set OFBIZ_HOME=%~p0..\ echo on cd %OFBIZ_HOME% "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar echo off ===============================================
wich produces: D:\Java\workspace2\ofbiz>tools\startofbiz.bat D:\Java\workspace2\ofbiz>echo off D:\Java\workspace2\ofbiz>cd \Java\workspace2\ofbiz\tools\..\ D:\Java\workspace2\ofbiz>REM "D:\Java\jdk1.6.0_29_i586\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar D:\Java\workspace2\ofbiz>echo off and D:\Java\workspace2\ofbiz\tools>startofbiz.bat D:\Java\workspace2\ofbiz\tools>echo off D:\Java\workspace2\ofbiz\tools>cd \Java\workspace2\ofbiz\tools\..\ D:\Java\workspace2\ofbiz>REM "D:\Java\jdk1.6.0_29_i586\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar D:\Java\workspace2\ofbiz>echo off With yours, the cd command is pretty ugly (note the filename inline) even it works (not from another drive letter): D:\Java\workspace2\ofbiz>tools\startofbiz.bat D:\Java\workspace2\ofbiz>echo off D:\Java\workspace2\ofbiz>cd tools\startofbiz.bat\..\..\ D:\Java\workspace2\ofbiz>REM "D:\Java\jdk1.6.0_29_i586\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar D:\Java\workspace2\ofbiz>echo off Thats because %0 returns the script name but %~p0 returns the path portion of the command. Also note that I added one more line: %~d0 That is to ensure that it will work if called from a diferent drive letter (nothing to do on Linux): C:\Windows\System32>D:\Java\workspace2\ofbiz\tools\startofbiz.bat C:\Windows\System32>echo off D:\Java\workspace2\ofbiz>cd \Java\workspace2\ofbiz\tools\..\ D:\Java\workspace2\ofbiz>REM "D:\Java\jdk1.6.0_29_i586\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar ofbiz.jar D:\Java\workspace2\ofbiz>echo off Someone else could test and report? ThankU!! Jose F. ----- Mensaje original ----- > De: "Jacopo Cappellato" <jacopo.cappell...@hotwaxmedia.com> > Para: dev@ofbiz.apache.org > Enviados: Viernes, 23 de Marzo 2012 11:02:16 > Asunto: Re: "bin" folder for executable files/scripts > Actually, the /d shouldn't be required: > =========================================== > echo off > set OFBIZ_HOME=%0\..\..\ > echo on > cd %OFBIZ_HOME% > "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar > ofbiz.jar > echo off > =========================================== > Thanks, > Jacopo > On Mar 23, 2012, at 10:57 AM, Jacopo Cappellato wrote: > > I did progress on this: I was able to move all the scripts to the > > "tools" folder; I didn't add the "bin" subfolder to it because the > > existing files in the "tools" folder are not used and can be > > removed: in this way we will have a "tools" folder containing all > > the platform dependent scripts. > > But now I need some help from Windows users: > > > > could you please try to create a "startofbiz.bat" file in the > > "tools" folder with the following content: > > =========================================== > > echo off > > set OFBIZ_HOME=%0\..\..\ > > echo on > > cd /d %OFBIZ_HOME% > > "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=512m -jar > > ofbiz.jar > > echo off > > =========================================== > > > > Then you should try to run it from the home folder: > > > > tools\startorfbiz.bat > > > > and from the tools folder: > > > > cd tools > > startorfbiz.bat > > > > Both should work fine: I already did this work for the sh files but > > I couldn't test the above mechanism for Windows. > > > > I would really appreciate your feedback. > > > > Thanks, > > > > Jacopo > > > > > > On Mar 21, 2012, at 11:34 AM, Prince Sewani wrote: > > > >> Well the 'bin' clashing with eclipse default is really a concern > >> to being with, the learning curve is yet steep, and with to dos of > >> IDE's as of now, > >> everyone is pretty much acquainted. Also in-case we change it to > >> 'bin' in the main folder, > >> then there'll be an additional set of documentation required for > >> that to help users on different Operating systems. > >> > >> Unless we go like opentaps (felt that on a few things) and then > >> one is not really able to use it (Just a comment No offense). > >> > >> > >> "tools/bin" sounds great, unless that also doesn't call of any > >> other clash or so. > >> > >> Regards > >> Prince > >> > >> > >> > >> > >> ________________________________ > >> From: Mansour Al Akeel <mansour.alak...@gmail.com> > >> To: dev@ofbiz.apache.org > >> Sent: Monday, March 19, 2012 4:13 PM > >> Subject: Re: "bin" folder for executable files/scripts > >> > >> bin is good enough. > >> > >> > >> On Mon, Mar 19, 2012 at 3:34 AM, Jacques Le Roux > >> <jacques.le.r...@les7arts.com> wrote: > >>> Hi Jacopo, > >>> > >>> tools/bin sounds good to me > >>> > >>> Jacques > >>> > >>> From: "Jacopo Cappellato" <jacopo.cappell...@hotwaxmedia.com> > >>> > >>>> Thanks everyone for the valuable comments! > >>>> I am trying to finalize this thread: there seems to be consensus > >>>> to move > >>>> all the executable scripts into a folder to keep things > >>>> organized. > >>>> For the name of the folder: > >>>> * some of you think that the "bin" (as I originally suggested) > >>>> should be > >>>> used because it is often used for this purpose > >>>> * some of you are worried that this could interfere with some > >>>> commonly > >>>> used IDEs (e.g. Eclipse) that use the bin folder for output and > >>>> need to be > >>>> configured to use a different standard name > >>>> > >>>> After reviewing what we have now in OFBiz I am wondering if we > >>>> could use > >>>> the already existing "tools" folder; its current layout is: > >>>> tools/api-java16 > >>>> tools/src > >>>> > >>>> option a: add all the executables to tools/ folder directly > >>>> option b: create a subfolder tools/bin and add all the > >>>> executables there > >>>> > >>>> What do you think? > >>>> > >>>> Jacopo > >>>> > >>>> On Feb 29, 2012, at 5:45 PM, Jacques Le Roux wrote: > >>>> > >>>>> Then we could recommend to name .bin for instance > >>>>> But I wonder if this will not be a source of problem for > >>>>> newbies... > >>>>> > >>>>> And also for Windows users, bin is not a standard name at all > >>>>> > >>>>> Jacques > >>>>> > >>>>> From: "Adrian Crum" <adrian.c...@sandglass-software.com> > >>>>>> > >>>>>> That's fine with me. We just need to update the Eclipse > >>>>>> configuration > >>>>>> files. > >>>>>> > >>>>>> -Adrian > >>>>>> > >>>>>> On 2/29/2012 3:20 PM, J. Eckard wrote: > >>>>>>> > >>>>>>> I think that eclipse / eclipse users should have to > >>>>>>> accommodate the > >>>>>>> directory structure of OFBiz, not the other way around. > >>>>>>> > >>>>>>> > >>>>>>> On Feb 29, 2012, at 9:58 AM, Jacopo Cappellato wrote: > >>>>>>> > >>>>>>>> Thanks for the feedback! Any suggestion for the name of the > >>>>>>>> folder? I > >>>>>>>> was hoping to use a "standard" name, that is why I initially > >>>>>>>> proposed the > >>>>>>>> "bin" folder... but since that is not an option we will have > >>>>>>>> to think to > >>>>>>>> something else (unless we use the existing "tools" folder > >>>>>>>> but I am not sure > >>>>>>>> about the intended usage of that). > >>>>>>>> > >>>>>>>> Jacopo > >>>>>>>> > >>>>>>>> > >>>>>>>> On Feb 27, 2012, at 8:45 PM, Jacques Le Roux wrote: > >>>>>>>> > >>>>>>>>> +1 > >>>>>>>>> > >>>>>>>>> Jacques > >>>>>>>>> > >>>>>>>>> From: "Adrian Crum"<adrian.c...@sandglass-software.com> > >>>>>>>>>> > >>>>>>>>>> Sounds great, but don't use "bin" - that folder is created > >>>>>>>>>> by > >>>>>>>>>> Eclipse and it is in the SVN ignore list. > >>>>>>>>>> > >>>>>>>>>> -Adrian > >>>>>>>>>> > >>>>>>>>>> On 2/27/2012 7:10 PM, Jacopo Cappellato wrote: > >>>>>>>>>>> > >>>>>>>>>>> The number of executable files (*.sh and *bat) in the > >>>>>>>>>>> OFBiz home > >>>>>>>>>>> folder is rather big: what if we create a "bin" folder > >>>>>>>>>>> and we move all of > >>>>>>>>>>> them there? In this way users will have a place where > >>>>>>>>>>> they will find all the > >>>>>>>>>>> executable files only and the main folder will be > >>>>>>>>>>> cleaner. > >>>>>>>>>>> > >>>>>>>>>>> Jacopo > >>>> > >>>> > >>>> > >