SF 1919441 LoadLibrary reference to x64 dll name had extra space in it
This commit is contained in:
54
build.xml
54
build.xml
@@ -16,10 +16,10 @@
|
|||||||
The file for MS Visual C++ 8.0 building 32 and 64 bit
|
The file for MS Visual C++ 8.0 building 32 and 64 bit
|
||||||
(releases up to 1.11 only supported 32 builds) looks something like:
|
(releases up to 1.11 only supported 32 builds) looks something like:
|
||||||
|
|
||||||
JDK=d:\\jdk1.5.0_11
|
JDK=c:\\dev\\jdk1.5.0_15
|
||||||
MSDEV_DIR=d:\\apps\\Microsoft Visual Studio 8\\VC
|
MSDEV_DIR=c:\\dev\\Microsoft Visual Studio 8\\VC
|
||||||
MSDEV_IDE_DIR=d:\\apps\\Microsoft Visual Studio 8\\Common7\\IDE
|
MSDEV_IDE_DIR=c:\\dev\\Microsoft Visual Studio 8\\Common7\\IDE
|
||||||
version=1.14-M1
|
version=1.14.1
|
||||||
|
|
||||||
DO NOT check compilation_tools.properties into source control as the
|
DO NOT check compilation_tools.properties into source control as the
|
||||||
values are specific to YOUR environment.
|
values are specific to YOUR environment.
|
||||||
@@ -126,39 +126,26 @@
|
|||||||
This module used to rely on that. Now it just checks to see if we have
|
This module used to rely on that. Now it just checks to see if we have
|
||||||
the right compilers.
|
the right compilers.
|
||||||
================================================================== -->
|
================================================================== -->
|
||||||
<available file="${compiler.x86}" property="canBuild.x86"/>
|
<available file="${compiler.x86}" property="compilerAvailable.x86"/>
|
||||||
<echo message="canBuild.x86=${canBuild.x86}" />
|
<echo message="compilerAvailable.x86=${compilerAvailable.x86}" />
|
||||||
<available file="${compiler.x64}" property="canBuild.x64"/>
|
<available file="${compiler.x64}" property="compilerAvailable.x64"/>
|
||||||
<echo message="canBuild.x64=${canBuild.x64}" />
|
<echo message="compilerAvailable.x64=${compilerAvailable.x64}" />
|
||||||
|
|
||||||
<!-- ======================================================================
|
<!-- ======================================================================
|
||||||
Compare the date/time of the DLL against that of the cpp source.
|
Compare the date/time of the DLL against that of the cpp source.
|
||||||
Up to date is only true if dll exists and is later than source
|
Up to date is only true if dll exists and is later than source
|
||||||
================================================================== -->
|
|
||||||
<uptodate property="dllUpToDate.x86" targetfile="${release.file.x86.dll}">
|
|
||||||
<srcfiles dir="${src.cpp}" includes="*.cpp" />
|
|
||||||
<srcfiles dir="${src.cpp}" includes="*.h" />
|
|
||||||
<!-- Check the build file itself as well -->
|
|
||||||
<srcfiles dir="${basedir}" includes="build.xml" />
|
|
||||||
</uptodate>
|
|
||||||
<echo message="dllUpToDate.x86= ${dllUpToDate.x86} (${release.file.x86.dll})" />
|
|
||||||
|
|
||||||
<uptodate property="dllUpToDate.x64" targetfile="${release.file.x64.dll}">
|
|
||||||
<srcfiles dir="${src.cpp}" includes="*.cpp" />
|
|
||||||
<srcfiles dir="${src.cpp}" includes="*.h" />
|
|
||||||
<!-- Check the build file itself as well -->
|
|
||||||
<srcfiles dir="${basedir}" includes="build.xml" />
|
|
||||||
</uptodate>
|
|
||||||
<echo message="dllUpToDate.x64= ${dllUpToDate.x64} (${release.file.x64.dll})" />
|
|
||||||
|
|
||||||
<!-- ======================================================================
|
|
||||||
We should build if we can build and the dll is not up to date
|
We should build if we can build and the dll is not up to date
|
||||||
================================================================== -->
|
================================================================== -->
|
||||||
<condition property="shouldBuild.x86">
|
<condition property="shouldBuild.x86">
|
||||||
<and>
|
<and>
|
||||||
<isset property="canBuild.x86"/>
|
<istrue value="${compilerAvailable.x86}"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="dllUpToDate.x86"/>
|
<uptodate targetfile="${release.file.x86.dll}">
|
||||||
|
<srcfiles dir="${src.cpp}" includes="*.cpp" />
|
||||||
|
<srcfiles dir="${src.cpp}" includes="*.h" />
|
||||||
|
<!-- Check the build file itself as well -->
|
||||||
|
<srcfiles dir="${basedir}" includes="build.xml" />
|
||||||
|
</uptodate>
|
||||||
</not>
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
@@ -166,10 +153,15 @@
|
|||||||
|
|
||||||
<condition property="shouldBuild.x64">
|
<condition property="shouldBuild.x64">
|
||||||
<and>
|
<and>
|
||||||
<isset property="canBuild.x64"/>
|
<istrue value="${compilerAvailable.x64}"/>
|
||||||
<not>
|
<not>
|
||||||
<isset property="dllUpToDate.x64"/>
|
<uptodate targetfile="${release.file.x64.dll}">
|
||||||
</not>
|
<srcfiles dir="${src.cpp}" includes="*.cpp" />
|
||||||
|
<srcfiles dir="${src.cpp}" includes="*.h" />
|
||||||
|
<!-- Check the build file itself as well -->
|
||||||
|
<srcfiles dir="${basedir}" includes="build.xml" />
|
||||||
|
</uptodate>
|
||||||
|
</not>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<echo message="shouldBuild.x64= ${shouldBuild.x64}" />
|
<echo message="shouldBuild.x64= ${shouldBuild.x64}" />
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ using the example build.xml as a template.
|
|||||||
<TR><TD>1.12</TD><TD>VC 98 (6.0) & 2003 64bit libs</TD><TD>1.4.2</TD><td>1.6.5</td><TD>3.2.2</TD><TD>32 and 64 bit</TD></TR>
|
<TR><TD>1.12</TD><TD>VC 98 (6.0) & 2003 64bit libs</TD><TD>1.4.2</TD><td>1.6.5</td><TD>3.2.2</TD><TD>32 and 64 bit</TD></TR>
|
||||||
<TR><TD>1.13</TD><TD>VC 2005</TD><TD>1.4.2</TD><TD>1.7.0</TD><TD>3.3</TD><TD>32 and 64 bit</TD></TR>
|
<TR><TD>1.13</TD><TD>VC 2005</TD><TD>1.4.2</TD><TD>1.7.0</TD><TD>3.3</TD><TD>32 and 64 bit</TD></TR>
|
||||||
<TR><TD>1.14</TD><TD>VC 2005</TD><TD>1.5.0</TD><TD>1.7.0</TD><TD>3.3</TD><TD>32 and 64 bit</TD></TR>
|
<TR><TD>1.14</TD><TD>VC 2005</TD><TD>1.5.0</TD><TD>1.7.0</TD><TD>3.3</TD><TD>32 and 64 bit</TD></TR>
|
||||||
|
<TR><TD>1.15</TD><TD>VC 2005</TD><TD>1.5.0</TD><TD>1.7.0</TD><TD>3.3</TD><TD>32 and 64 bit</TD></TR>
|
||||||
</table>
|
</table>
|
||||||
Microsoft Visual C++ 8.0 supports 64 bit builds. so no additional tools are required.
|
Microsoft Visual C++ 8.0 supports 64 bit builds. so no additional tools are required.
|
||||||
|
|
||||||
@@ -108,17 +109,36 @@ Open up the project properties and go to the "Java Build Path" properties panel.
|
|||||||
<li> Set the default build output directory to <code>jacob-project/release/java</code></li>
|
<li> Set the default build output directory to <code>jacob-project/release/java</code></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2> Troubleshooting Build Problems </h2>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Symptom: The jar is built but no dlls were compiled.<p>
|
||||||
|
Problem: compilation_tools.properties does not have the correct location for the Microsoft tools.<p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Sympton: Can't find jni.h or can't find C++ compiler<p>
|
||||||
|
Problem: compilation_tools.properties configured incorrectly. Either
|
||||||
|
paths are wrong or the separator is wrong. It requires two backslashes for a separator.<p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h1> Running Samples and Tests </h1>
|
<h1> Running Samples and Tests </h1>
|
||||||
Samples and JUnit test programs can be found in the source jar or in CVS. The programs
|
Samples and JUnit test programs can be found in the source jar or in CVS. The programs
|
||||||
can be run from a bat file or from inside the Eclipse IDE. The java library
|
can be run from a bat file or from inside the Eclipse IDE. The java library
|
||||||
path variable must be set to include the directory the jacob.dll is in. The
|
path variable must be set to include the directory the jacob.dll is in. The
|
||||||
simplest way to do that is to add it as a command line option.
|
simplest way to do that is to add it as a command line option. The following
|
||||||
|
assume that your jacob development area is located in c:\dev\jacob:
|
||||||
|
<pre>
|
||||||
|
-Djava.library.path=c:/jacob/release/x86
|
||||||
|
-Dcom.jacob.autogc=false
|
||||||
|
-Dcom.jacob.debug=false
|
||||||
|
-Xcheck:jni
|
||||||
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
JUnit test programs can be individually run from inside eclipse or en-masse
|
JUnit test programs can be individually run from inside eclipse or en-masse
|
||||||
via the <code>ant test</code> target.
|
via the <code>ant test</code> target.
|
||||||
|
|
||||||
Last Modified 7/2007 1.13M3
|
Last Modified 4/2008 1.15
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
@@ -1,5 +1,46 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
<!-- --------- -->
|
||||||
|
<h2>JACOB 1.15</h2>
|
||||||
|
<h3>Tracked Changes</h3>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" >
|
||||||
|
<tr>
|
||||||
|
<td width="100%" colspan="2"><b>Bugs</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top">1919441</td>
|
||||||
|
<td width="87%" valign="top">Type: loading 64 bit jacob.dll. Computed dll
|
||||||
|
name includes space that is not in name of actual dll </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top"> </td>
|
||||||
|
<td width="87%" valign="top"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" colspan="2"><b>Patches</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top"> </td>
|
||||||
|
<td width="87%" valign="top"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" colspan="2"><b>Feature Requests</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top"> </td>
|
||||||
|
<td width="87%" valign="top"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" colspan="2"><b>Known Issues</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top"></td>
|
||||||
|
<td width="87%" valign="top"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<!-- --------- -->
|
<!-- --------- -->
|
||||||
<h2>JACOB 1.14</h2>
|
<h2>JACOB 1.14</h2>
|
||||||
<h3>What's New</h3>
|
<h3>What's New</h3>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ Visual C redistributable installer SP1</A>
|
|||||||
<p></p>
|
<p></p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Jacob Command Line Settings</h2>
|
<h2>Jacob Command Line Settings</h2>
|
||||||
This library supports several differentommand line options:
|
This library supports several different command line options:
|
||||||
<table border=1>
|
<table border=1>
|
||||||
<tr><td colspan=3>
|
<tr><td colspan=3>
|
||||||
<h3>dll path location and dll name customization</h3>
|
<h3>dll path location and dll name customization</h3>
|
||||||
@@ -231,12 +231,12 @@ The Microsoft msdn web site</a>
|
|||||||
Jacob must know the location of the DLL when running the unit tests in Eclipse.
|
Jacob must know the location of the DLL when running the unit tests in Eclipse.
|
||||||
The simplest way to do this is to add the dll path to the unit as a VM argument.
|
The simplest way to do this is to add the dll path to the unit as a VM argument.
|
||||||
The argument should be specified based on where you installed the jacob source package.
|
The argument should be specified based on where you installed the jacob source package.
|
||||||
If you have jacob unpacked in d:/jacob_1_5 and built using build.xml,
|
If you have jacob unpacked in c:/dev/jacob and built using build.xml,
|
||||||
then the vm arguments would be:
|
then the vm arguments would be:
|
||||||
<br><code>-Djava.library.path=d:/jacob_1_5/release/x86</code> .
|
<br><code>-Djava.library.path=c:/dev/jacob/release/x86</code> .
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Last Modified 12/2007
|
Last Modified 4/2008 1.15
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
@@ -146,6 +146,8 @@ public final class LibraryLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
|
JacobObject.debug("Loading library " + path
|
||||||
|
+ " using System.loadLibrary ");
|
||||||
System.load(path);
|
System.load(path);
|
||||||
} else {
|
} else {
|
||||||
// Path was not defined, so use the OS mechanism for loading
|
// Path was not defined, so use the OS mechanism for loading
|
||||||
@@ -176,6 +178,8 @@ public final class LibraryLoader {
|
|||||||
name = getPreferredDLLName();
|
name = getPreferredDLLName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JacobObject.debug("Loading library " + name
|
||||||
|
+ " using System.loadLibrary ");
|
||||||
// System.out.println("Loading " + name);
|
// System.out.println("Loading " + name);
|
||||||
System.loadLibrary(name);
|
System.loadLibrary(name);
|
||||||
}
|
}
|
||||||
@@ -195,7 +199,7 @@ public final class LibraryLoader {
|
|||||||
return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "-"
|
return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "-"
|
||||||
+ DLL_NAME_MODIFIER_32_BIT;
|
+ DLL_NAME_MODIFIER_32_BIT;
|
||||||
} else {
|
} else {
|
||||||
return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "- "
|
return "jacob" + "-" + JacobReleaseInfo.getBuildVersion() + "-"
|
||||||
+ DLL_NAME_MODIFIER_64_BIT;
|
+ DLL_NAME_MODIFIER_64_BIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user