Thursday, July 30, 2009

Run .jar file on Linux




Hi everyone,

Today, I am bringing to you a very nice thing, if you have written java code on windows, exported it as a .jar file and used it on Windows but was unable to do this on linux though you have JDK installed on linux, then this is the right place for you !!

To do this surely you must have a correct and runnable java code with a main class.

Steps:
======

If you are using netbeans right click on the project and then click clean and build, on eclipse right click on the project and then choose export and choose as runnnable jar file.

This will create a .jar file in your project folder (for netbeans inside the dist folder).

You will open your nice terminal and start by creating a "launcher" which is a shell script that you create so that it can run your .jar file.

In this example I made a simple watch and the jar file is named SimpleWatch.jar, ok?


you will type:


cd /usr/local/bin


then


gksudo gedit SimpleWatchLauncher.sh


the last command will open the Text editor you copy and paste this

#! /bin/bash
cd /home/khaled/NetBeansProjects/SimpleWatch/dist
java -jar /home/khaled/NetBeansProjects/SimpleWatch/dist/SimpleWatch.jar


Of course you will replace "/home/khaled/NetBeansProjects/SimpleWatch/dist" with the path of the directory that contains your .jar file

Save and exit the Text editor






Type this in the terminal (Make sure you are in /usr/local/bin)

sudo chmod +x /usr/local/bin/SimpleWatchLauncher.sh



That's it you are done !!!


now open your terminal and type:

cd /usr/local/bin/


Click enter
then type


SimpleWatchLauncher.sh



Your application will Run isA and you will now that Java is really platform independent :D

Wednesday, July 29, 2009

فرانكو لعربي







عاملين إيه ؟
البوست ده أصلا أنا كاتبه كله فرانكو مش كاتب ولا كلمة فيه بالحروف العربي اللي على الكيبورد !! إزاي بقى ده عن طريق برنامج جامد جدا مايكروسوفت نزلته اسمه Maren البرنامج ده تقدر تخليه يحول الكلام الفرانكو إلى عربي وإنت بتكتب والصراحة البرنامج جامد جدا و التوقع بتاعه رائع جدا لكن في حاجة مهمة كنت عاوز أقولها إن على اد ماالبرنامج ده و ال برامج اللي زيه بتخلينا نكتب عربي أكتر على الانترنت على اد ماهي يخلينا نستغنى تماما عن الحروف العربي وتقريبا ننساها لاننا كده بجد عمرنا ماهانسخدم الزراير العربي على الكيبورد لاننا ياما هانكتب فرانكو أصلا أو هانكتب فرانكو مترجم عربي

عموما البرنامج جامد جدا وأكيد هستخدموا بالذات في بوستس على البلوج هنا في اللابل الجديد اللي اسمه بالعربي
الحاجة برده الجديدة إن مايكروسوفت نزلت البرنامج ده ببلاش يمكن عشان عارفة إن قليل قوي من المستخدمين العرب ممكن يدفعوا فلوس مقابل سفتوار بس ياريت مايكروسوفت تنزل نسخ تشتغل على انظمة تانية غير الويندوز زي لينكس وأبونتيو وكمان ماك .... يا رب



ممكن تنزل البرنامج من اللينك ده

واتفرج على الفيديو اللذيذ ده كمان عن البرنامج


سلام

Tuesday, July 7, 2009

Clean you Vista










Hi everyone,

If you are using Windows Vista like me, you may have noticed that the free space on your C drive where you installed Windows decreases even if you install no new software on it. This is caused by many things, the most important ones are temporary internet files which are files stored on your hard to enable you surf the internet faster, Temp folder which may be up to five GB which saves configurations about applications you ran on your computer, the hibernate files which enables your computer to hibernate.

You can clean them up and free space so you can speed up your system by using the clean up disk tool
Start -> Accessories -> System tools -> Disk Clean Up

Any way if you really want to clean every thing and get more space, I recommend a tool called CCleaner (Crap Cleaner), it just Free 3.8 MBytes and still it cleans your folders safely and fast, it cleaned about 9 GB from my C Drive !!!

Go to CCleaner