How to create windows shortcut using Ant? كيفية انشاء ويندوز باستخدام الاختصار نمله؟
Why do you need to create a shortcut using Ant? لماذا الحاجة الى انشاء الاختصار باستخدام نمله؟ When do you need to create that ? وعندما هل انت بحاجة الى ايجاد ذلك؟ These might the questions that you will be thinking at this moment when you had a look into this topic. هذه الاسءله يمكن ان تكونوا في التفكير في هذه اللحظة عندما كان ينظر في هذا الموضوع. Yep I am here to answer these questions. Yep انا هنا للاجابة على هذه الاسءله. I just made this topic just to create a buzz thats it but actually you can make Ant to execute any operating system specific commands through your build. أنا فقط الذي ادلى به هذا الموضوع فقط لايجاد طنين thats ولكنها في الواقع يمكنك جعل نمله لتنفيذ اي اوامر محددة لنظام التشغيل الخاص بك عن طريق بناء. It may be shortcut, or if you want to execute any operating system specific command you can make use of this tutorial. قد يكون من الاختصار ، او اذا كنت تريد ان تعدم اي نظام تشغيل قيادة محددة يمكنك الاستفادة من هذا البرنامج التعليمي. Ant currently supports widely used and famous operating systems like Windows, Apple, Linux, Solaris, AIX etc. You can get the list of supporting operating system from sun specification. النملة تستخدم على نطاق واسع في الوقت الراهن تؤيد الشهيرة وانظمة التشغيل مثل ويندوز ، تفاح ، لينكس ، سولاريس ، الخ اكس يمكنك الحصول على قائمة دعم نظام التشغيل من الشمس والمواصفات. You can get your current operating system by executing the following line of code in your java program يمكنك الحصول على نظام التشغيل الحالي الخاص بك عن طريق تنفيذ السطر التالي من المدونه الخاصة بك في برنامج جافا
System.getProperty( "os.name" ); System.getproperty ( "os.name") ؛ When do you need to use this? عندما تفعل انت بحاجة الى استخدام هذا؟ This may not be useful for web application developers but they can also use this while building their enterprise or web application to automate few things. ان هذا قد لا يكون من المفيد تطبيق لمطوري الويب ولكنها يمكن ايضا ان تستخدم هذا في حين ان بناء شبكة مؤسسات الأعمال لديها ، أو تطبيق لاتمته بضعة أشياء. But desktop application developers who may use Swing sets etc may find this tip very useful. التطبيقات المكتبيه ولكن من ايار / مايو استخدام مجموعات سوينغ الخ قد تجد هذه النصيحه مفيدة جدا. You can achieve this by using Exec Task in Ant which is the counter part of Runtime.exec in java. يمكنك تحقيق ذلك عن طريق استخدام اكسيك مهمة في النملة التي هي جزء من مكافحة runtime.exec في يافا. Here I am not going to explain you about How to run or create Ant Build. وأنا هنا لن اشرح لكم عن كيفية ادارة او انشاء بناء النملة. It does not fall under this scope of short tutorial. انها لا تندرج في اطار هذا النطاق قصيرة من البرنامج التعليمي.
Here we go, before getting into the tutorial we will see how to execute a windows command to get the environmental variable path هنا نذهب ، قبل الدخول في الدورة التعليميه وسوف نرى كيفية تنفيذ ويندوز القيادة للحصول على مسار المتغير البيئي
cmd is the command prompt for windows higher than win 98 and ‘/c’ is mandatory to execute the command in the command shell. CMD هي الاوامر لأعلى من ويندوز 98 وفوز '/ ج' الزاميه لتنفيذ القيادة والتوجيه في قيادة شل. To know more about Exec task kindly refer لمعرفة المزيد عن اكسيك مهمة يرجى الرجوع here هنا . Now coming to the point, to create a shortcut unless you don’t have any Windows Resource Kits or read made utilities you have to use VB Script to create shortcuts. الان الى هذه النقطه ، لانشاء اختصار ، الا اذا كنت لا تملك اي ويندوز الموارد مجموعات أو اقرأ ما تقدم المرافق لديك لاستخدام الخامس باء سكريبت لايجاد طرق مختصرة. The script will be making use of WScript. السيناريو سيتم الاستفادة من wscript. Shell of windows to do the job. شل من ويندوز لاداء هذه المهمة. Kindly follow the code snippet given below which creates a shortcut file for a java archive file, يرجى متابعة القصاصه الواردة ادناه مما يخلق ملف الاختصار لملف أرشيف جاوة ،
Save the above code as shortcut.vbs. انقاذ shortcut.vbs المدونه اعلاه. Pls find the corresponding code snippet for part of the ANT Build that uses exec task Pls ايجاد المقابلة القصاصه لجزء من النملة التي تستخدم في بناء اكسيك مهمة





























