OSDN Git Service

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