im new toward linux command.. Im using Mac Osx Mountain Lion as my operating system and eclipse to compile my java program..
The problem is that im trying to run/compile/debug my java application as root user on eclipse.
Following the step/answer from rednammoc in " How do I run my application as superuser from Eclipse? "
The step require me to write a executable script to make my jre to run as root user, however in the script there is a part where it uses the command gksu, which i assume only available on linux platform and not on Mac Osx platform and when i run my program, it show gksu command not found. So the question is,
Can I some how install gksu on my Mac Osx?
or is there any command that i can use to replace gksu?
Below are the script copied from the link,
#!/bin/bash
# file: /usr/lib/jvm/java-6-openjdk/jre/bin/java
# descr: Starter for jdk. Runs jdk as root when
# cmd-line-arg "--run-as-root" is specified.
#
jre="/usr/lib/jvm/java-6-openjdk/jre/bin/java.ori"
run_as_root=false
args=
# Filter command-line argument
for arg in "$@"
do
case "$arg" in
--run-as-root) run_as_root=true
;;
*) args="$args $arg"
;;
esac
done
# Remove leading whitespaces
args=$(echo $args | sed -e 's/^[ \t]*//')
if $run_as_root
then
echo "WARNING: Running as root!"
gksu "$jre $args"
else
$jre $args
fi