Repository navigation
Expand file tree
/
Copy pathbuild_src_windows.html
More file actions
executable file
·239 lines (202 loc) · 7.01 KB
/
Copy pathbuild_src_windows.html
File metadata and controls
executable file
·239 lines (202 loc) · 7.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?php
include ("../links.php");
include ("../includes/header.html");
?>
<fieldset><h1>Compiling HDF-JAVA Source on Windows</h1></fieldset>
<p>
<h2>
Source Files</h2>
After you download and extract the source package, you will have the HDF Java
native C code and the Java source code for JNI, HDF-Object package and HDFView.
You need to compile the C source and Java source separately. The following
instructions tell you how to build the C source in Visual C++ and the Java
source from batch file.
<p>
<table WIDTH=100% BORDER COLS=2>
<caption><b>HDF Java Product Source</b></caption>
<tr>
<th> Source directory</th>
<th> Description</th>
</tr>
<tr>
<td> hdf-java/native/hdflib/</td>
<td> C header files and C source files for HDF4 Java Native Interface</td>
</tr>
<tr>
<td> hdf-java/native/hdf5lib/</td>
<td> C header files and C source files for HDF5 Java Native Interface</td>
</tr>
<tr>
<td> hdf-java/ncsa/hdf/hdflib/</td>
<td> Java source files for HDF4 Java Native Interface</td>
</tr>
<tr>
<td> hdf-java/ncsa/hdf/hdf5lib/</td>
<td> Java source files for HDF5 Java Native Interface</td>
</tr>
<tr>
<td> hdf-java/ncsa/hdf/object/</td>
<td> Java source files for HDF-Object package</td>
</tr>
<tr>
<td> hdf-java/ncsa/hdf/view/</td>
<td> Java source files for HDFView</td>
</tr>
</table>
<hr>
<h3>
Requirements</h3>
You need the following libraries in order to compile the HDF Java products.
<UL>
<LI>The Pre-Compiled HDF4 Binaries: obtain from
<a href="/release4/obtain.html">/release4/obtain.html</a>
<LI>The Pre-Compiled HDF5 Binaries: obtain from
<a href="/HDF5/release/obtain5.html">/HDF5/release/obtain5.html</a>
<LI> JPEG Library: obtain from
<a href="ftp://ftp.hdfgroup.org/lib-external/jpeg/">ftp://ftp.hdfgroup.org/lib-external/jpeg/</a>
<LI> GZIP Library: obtain from
<a href="ftp://ftp.hdfgroup.org/lib-external/zlib/">ftp://ftp.hdfgroup.org/lib-external/zlib/</a>
<LI> SZIP Library: obtain from
<a href="ftp://ftp.hdfgroup.org/lib-external/szip/">ftp://ftp.hdfgroup.org/lib-external/szip/</a>
<LI> JDK 1.5.0 or above
</UL>
<hr>
<h3>
Compile the HDF Java Native C</h3>
To compile the HDF Java Native C code, you need to have <b>Microsoft Visual C++</b>
installed on your machine. Two Windows Makefiles hdf-java/windows are provided
to help you to build the C source code.
<DL>
<DT><a href="jhdf.mak.txt">jhdf.mak</a>
<DD>Makefile to compile HDF4 Java Native C, native/hdflib/*.c files<br>
<b>Winsock functions, Ws2_32.lib, must be included, i.e. LINK32_FLAGS=... ws2_32.lib ...</b></DD></DT>
<DT><a href="jhdf5.mak.txt">jhdf5.mak</a>
<DD>Makefile to compile HDF5 Java Native C, native/hdf5lib/*.c files</DD></DT>
</DL>
You will need the nmake tool to run the makfile. The nmake tool come with Microsoft
Visual C++. The first step is to configure the makfile. Edit the nt_makefile to set
the dependent libraries and other requirements.
<hr>
<h3>
Compile the HDF Java Source Code</h3>
To compile the HDF Java Source Code, you need to have jdk1.5.0 or above
installed on your machine. A batch file under hdf-java/windows is provided to
help you to build the Java source code.
<DL>
<DT><a href="Makefile_java.bat.txt">Makefile_java.bat</a>
<DD>Batch to compile HDF Java source</DD></DT>
</DL>
You will need to configure the batch file before you run it. Edit the batch file
to set the dependent libraries and other requirements.
<p>
<table cellpadding="4" cellspacing="2" border="1" align="center">
<tr>
<td>
@ECHO OFF<br>
<br>
@REM =======================================================================<br>
@REM<br>
@REM Batch file to compile the HDF Java source code<br>
@REM<br>
@REM =======================================================================<br>
<br>
@REM set up your java home directory(requires jdk1.5.0 or above), for example<br>
@REM SET JAVAHOME=d:\java\jdk1.5.0<br>
SET JAVAHOME=<br>
<br>
@REM set up "HDF JAVA Product" home directory, for example<br>
@REM SET HDFJAVA=D:\work\hdf-java<br>
SET HDFJAVA=<br></td>
</tr>
</table>
<hr>
<h3>
Running the HDF Java code</h3>
After successfully run the makefile and batch file, the binaries of the HDF Java
products are packed and put at $(JAVAHOME)\lib.
<p>
<table BORDER COLS=2 >
<tr>
<th width=25% BGCOLOR="#CCDFF">Binary file</th>
<th width=75% BGCOLOR="#CCDDFF" colspan="2">Description</th>
</tr>
<tr>
<td>lib/jhdf.jar</td>
<td colspan="2">The Java HDF Interface, accesses the native HDF4 library</td>
</tr>
<tr>
<td>lib/jhdf5.jar</td>
<td colspan="2">The Java HDF5 Interface, accesses the native HDF5 library</td>
</tr>
<tr>
<td>lib/jhdfobj.jar</td>
<td colspan="2">The common HDF object package, ncsa.hdf.object</td>
</tr>
<tr>
<td>lib/jhdf4obj.jar</td>
<td colspan="2">The HDF4 object package, ncsa.hdf.object.h4</td>
</tr>
<tr>
<td>lib/jhdf5obj.jar</td>
<td colspan="2">The HDF5 object package, ncsa.hdf.object.h5</td>
</tr>
<tr>
<td>lib/jhdfview.jar</td>
<td colspan="2">The ncsa.hdf.view package, for HDFView only.</td>
</tr>
<tr>
<td> </td>
<td colspan="2" >lib/win/</td>
</tr>
<tr>
<td> jhdf.dll</td>
<td colspan="2">The native HDF4 library and JNI implementation (called by jhdf.jar)</td>
</tr>
<tr>
<td> jhdf5.dll</td>
<td colspan="2">The native HDF5 library and JNI implementation (called by jhdf5.jar)</td>
</tr>
</table>
<p>
Set the following batch file to run the HDFView
<p>
<code>
@ECHO OFF<br>
<br>
@REM =======================================================================<br>
@REM<br>
@REM Batch file to run the HDFView<br>
@REM<br>
@REM =======================================================================<br>
<br>
@REM set up your java home directory(requires jdk1.5.0 or above), for example<br>
@REM SET JAVAHOME=d:\java\jdk1.5.0<br>
SET JAVAHOME=<br>
<br>
@REM set up "HDF JAVA Product" home directory, for example<br>
@REM SET HDFJAVA=D:\work\hdf-java<br>
SET HDFJAVA=<br>
<br>
<br>
@REM Do not make changes under this line unless you know what you are doing.<br>
@REM =======================================================================<br>
<br>
SET PATH=%HDFJAVA%\lib\win;%PATH%<br>
<br>
@REM set the JNI classpath<br>
set JNI_CLASSPATH=%HDFJAVA%/lib/jhdf.jar;%HDFJAVA%/lib/jhdf5.jar<br>
<br>
@REM set the object package classpath<br>
set OBJ_CLASSPATH=%HDFJAVA%/lib/jhdfobj.jar;%HDFJAVA%/lib/jhdf4obj.jar;<br>
(continued)%HDFJAVA%/lib/jhdf5obj.jar;%HDFJAVA%\lib\netcdf.jar;%HDFJAVA%\lib\fits.jar<br>
<br>
@REM set the CLASSPATH<br>
set CLASSPATH=%JNI_CLASSPATH%;%OBJ_CLASSPATH%;%HDFJAVA%/lib/jhdfview.jar<br>
<br>
%JAVAHOME%\bin\java -mx999m -classpath %CLASSPATH% ncsa.hdf.view.HDFView -root %HDFJAVA%<br>
pause<br>
:END<br>
</code>
<?php
include ("../includes/footer.html");
?>