Added screenshot for lots of text editors
[sixth-3d-demos.git] / tools / debug
1 #!/bin/bash
2
3 if [ "$1" != "T" ]; then gnome-terminal -e "'$0' T"; exit; fi
4
5 #
6 # This is a helper bash script that starts current Java project in debug mode
7 # with JRebel attached. It also opens its own terminal window, so you can run
8 # this script by simply clicking on it in file navigator.
9 #
10 #
11 # Script assumes:
12 #
13 #    + GNU OS 
14 #    + Gnome workspace
15 #    + JRebel is installed in /opt/jrebel
16 #
17
18
19 cd "${0%/*}"
20 cd ..
21
22
23 while true; do
24
25     # clear screen
26     printf "\033c"
27
28     # enable debugging
29     export DEBUG_OPTIONS="-Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000,server=y,suspend=n"
30
31     # enable JRebel
32     export REBEL_BASE="$HOME/.jrebel"
33     export JREBEL_OPTS="-agentpath:/opt/jrebel/libjrebel64.so -Drebel.project.path=`pwd`"
34
35     # enable LWJGL native libraries
36     export LWJGL_OPTS="-Djava.library.path=target/natives"
37     
38     # define Maven options
39     export MAVEN_OPTS="-Xmx4000m $DEBUG_OPTIONS $JREBEL_OPTS $LWJGL_OPTS"
40     
41     mvn compile exec:java -Dexec.mainClass="eu.svjatoslav.sixth.e3d.examples.launcher.Main"
42     
43     echo "press ENTER to reload application"
44     read
45
46 done