OSDN Git Service

3b1285544f427d92916834a358e2fd79744ed1ba
[neighbornote/NeighborNote.git] / nevernote.sh
1 #! /bin/sh
2
3 ###########################################
4 # Location variables.  Edit the variables #
5 # below to your specific installation.    #
6 # The ones below are examples only.       #
7 ###########################################
8 NEVERNOTE=$HOME/NeverNote
9 JAMBI_LOCATION=$HOME/qtjambi
10 JAMBI_VERSION=4.5.2_01
11 JAMBI_PLATFORM=linux32-gcc
12 JAVA_LIB_DIR=/usr/share/lib
13
14 ########################################
15 # Memory settings.  These can be tuned #
16 # to your specific needs.  The greater #
17 # the memory allocated the better      #
18 # your response may be, but the more   #
19 # resources the program will consume.  #
20 # Lower numbers may hurt performance   #
21 # but will reduce resource held by     #
22 # the program.  If you get errors      #
23 # that say "out of memory" you need    #
24 # to increase these values.            #
25 ########################################
26 # Initial heap size
27 NN_XMS=256M
28 # Maximum heap size
29 NN_XMX=512M
30
31 ## The young generation
32 # the young generation will occupy 1/2 of total heap
33 NN_NEW_RATIO=1
34
35 ## GC option
36 ## recommend Incremental Low Pause GC for desktop apps 
37 NN_GC_OPT=-Xincgc
38 ## recent multi-core CPU may show good performance
39 #NN_GC_OPT=-XX:+UseParNewGC
40 #NN_GC_OPT=-XX:+UseConcMarkSweepGC
41 ## same as default
42 #NN_GC_OPT=-XX:+UseParallelGC
43
44 ## debug
45 #NN_DEBUG=-agentlib:hprof=format=b
46 #NN_DEBUG=-agentlib:hprof=cpu=samples,format=a
47 #NN_DEBUG=-verbose:gc 
48
49 ########################################
50 # This next variable is optional. It   #
51 # is only needed if you want to run    #
52 # multiple copies of NeverNote under   #
53 # the same Linux user id.  Each        #
54 # additional copy (after the first)    #
55 # should have a unique name.  This     #
56 # permits the settings to be saved     #
57 # properly.  If you only want to run   #
58 # one copy under a single userid, this #
59 # can be commented out.                #
60 ########################################
61 #NN_NAME="sandbox"  
62
63
64 ###################################################################
65 ###################################################################
66 ## You probably don't need to change anything below this line.   ##
67 ###################################################################
68 ###################################################################
69
70
71 #####################
72 # Setup environment #
73 #####################
74 NN_CLASSPATH=$NEVERNOTE/nevernote.jar
75 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/evernote.jar
76 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/h2-1.2.136.jar
77 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/libthrift.jar
78 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/log4j-1.2.14.jar
79 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/lib/PDFRenderer.jar
80 NN_CLASSPATH=$NN_CLASSPATH:$NEVERNOTE/commons-lang-2.4.jar
81 NN_CLASSPATH=$NN_CLASSPATH:$JAMBI_LOCATION/qtjambi-$JAMBI_VERSION.jar
82 NN_CLASSPATH=$NN_CLASSPATH:$JAMBI_LOCATION/qtjambi-util-$JAMBI_VERSION.jar
83 NN_CLASSPATH=$NN_CLASSPATH:$JAMBI_LOCATION/qtjambi-$JAMBI_PLATFORM-$JAMBI_VERSION.jar
84
85
86 ###################
87 # Run the program #
88 ###################
89 cd $NEVERNOTE
90 java -Xmx$NN_XMX -Xms$NN_XMS -XX:NewRatio=$NN_NEW_RATIO $NN_GC_OPT $NN_DEBUG -classpath $NN_CLASSPATH cx.fbn.nevernote.NeverNote --name=$NN_NAME
91 cd -