Unnecessary…just chown folders (Running eclipse as user but project as superuser)

1. Download a jre from the Java site
2. extract it in a folder (e.g. /usr/lib/jre-1.6.0_27)
3. in Eclipse: Window->Preferences->Java->Installed JREs->Add…->ecc…
4. create the script below for this jre

. Rename your java application:

sudo mv /usr/lib/jvm/java-6-openjdk/jre/bin/java /usr/lib/jvm/java-6-openjdk/jre/bin/java.ori

2. Create the script /usr/lib/jvm/java-6-openjdk/jre/bin/java with the following content:

gksudo "/usr/lib/jvm/java-6-openjdk/jre/bin/java.ori $*"

3. Change the permissions to make it executable:

sudo cmod 0755 /usr/lib/jvm/java-6-openjdk/jre/bin/java

In this way, the java application asks always the root password and it starts with root privileges.


About peterpragmatist

Passionate about people and improving communication. Love to relax playing basketball, listening to music or having a quiet chat with some friends.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s