OSDN Git Service

Check for possible null pointer assignment when preparing resource
[neighbornote/NeighborNote.git] / nixnote.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
11 NIXNOTE=$(cd `dirname $0` && pwd)
12 # NIXNOTE=/usr/share/nixnote
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=1024M
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 NixNote 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 #Do any parameter overrides
65 while [ -n "$*" ]
66 do
67    eval $1
68    shift
69 done
70
71
72 ###################################################################
73 ###################################################################
74 ## You probably don't need to change anything below this line.   ##
75 ###################################################################
76 ###################################################################
77
78
79 #####################
80 # Setup environment #
81 #####################
82 NN_CLASSPATH=$NIXNOTE/nixnote.jar
83
84 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/apache-mime4j-0.6.jar
85 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/commons-codec-1.5.jar
86 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/commons-compress-1.2.jar
87 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/commons-lang3-3.0.jar
88 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/commons-logging-1.1.1.jar
89 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/evernote-api-1.20.jar
90 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/h2-1.3.158.jar
91 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/httpclient-4.1.1.jar
92 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/httpcore-4.1.jar
93 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/httpmime-4.1.1.jar
94 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/jaxen-1.1.3.jar
95 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/jazzy.jar
96 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/jtidy-r938.jar
97 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/libthrift.jar
98 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/log4j-1.2.14.jar
99 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/scribe-1.3.0.jar
100 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/pdfbox-app-1.6.0.jar
101 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/poi-3.7-20101029.jar
102 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/poi-ooxml-3.7.jar
103 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/poi-ooxml-schemas-3.7-20101029.jar
104 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/poi-scratchpad-3.7-20101029.jar
105 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/tika.jar
106 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/xmlbeans-2.3.0.jar
107 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/xsdlib-20060615.jar
108
109 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/qtjambi-linux32-4.5.2_01.jar
110 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/qtjambi-linux32-gcc-4.5.2_01.jar
111 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/qtjambi-linux64-4.5.2_01.jar
112 NN_CLASSPATH=$NN_CLASSPATH:$NIXNOTE/lib/qtjambi-linux64-gcc-4.5.2_01.jar
113
114 ###################
115 # Run the program #
116 ###################
117 cd $NIXNOTE
118 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 --home=$NN_HOME --sync-only=$NN_SYNCONLY
119 cd -