<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clearview Informatics &#187; Cognos 8 SDK</title>
	<atom:link href="http://www.clearviewinformatics.com/category/cognos-8-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clearviewinformatics.com</link>
	<description>Business Productivity Solutions in the Cloud.</description>
	<lastBuildDate>Thu, 28 Jan 2010 02:26:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Compiling the Cognos 8 SDK Java Samples on Windows</title>
		<link>http://www.clearviewinformatics.com/2008/05/15/setting-up-the-cognos-8-sdk-java-samples/</link>
		<comments>http://www.clearviewinformatics.com/2008/05/15/setting-up-the-cognos-8-sdk-java-samples/#comments</comments>
		<pubDate>Thu, 15 May 2008 14:26:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Cognos 8 SDK]]></category>

		<guid isPermaLink="false">http://www.clearviewinformatics.com/2008/05/15/setting-up-the-cognos-8-sdk-java-samples/</guid>
		<description><![CDATA[When the Cognos 8 SDK is installed, the java libraries (jar files) are installed in the ..\c8\sdk\java\lib folder. The sample applications are located in individual directories in the ..\c8\sdk\java folder. Also included are two scripts, build-samples.bat (for Windows) and build-samples.sh (for Unix and Linux) for compiling the java samples. Here are the steps for compiling [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When the Cognos 8 SDK is installed, the java libraries (jar files) are installed in the ..\c8\sdk\java\lib folder. The sample applications are located in individual directories in the ..\c8\sdk\java folder. Also included are two scripts, build-samples.bat (for Windows) and build-samples.sh (for Unix and Linux) for compiling the java samples. Here are the steps for compiling the samples:<br id="sflo0" /><span id="more-106"></span><br id="sflo1" />1. Verify that you have a JDK installed. Cognos 8 requires JDK 1.4 or higher. The JDK can be downloaded from Sun Microsystems <a id="r_i5" title="here" href="http://java.sun.com/javase/downloads/index.jsp" target="_blank">here</a>.<br id="px4l0" /></p>
<p><a href="http://www.clearviewinformatics.com/wp-content/uploads/2008/05/snag-00171.png"><img class="alignright alignnone size-full wp-image-108" style="float: right;" title="snag-00171" src="http://www.clearviewinformatics.com/wp-content/uploads/2008/05/snag-00171.png" alt="" width="416" height="131" /></a></p>
<p>2. Check that the JDK location is in the Windows PATH environment variable. To do this, type &#8217;set path&#8217; from the command prompt.<br id="mif20" /></p>
<p>3. Open up the file CRNConnect.java in the ..c8sdkjavacommon folder. Edit the following line (line 102), if necessary, to reflect the location and port number of your Cognos 8 server:</p>
<pre><span style="font-family: Courier New;">public static String CM_URL = "http://localhost:9300/p2pd/servlet/dispatch";</span></pre>
<p>4. In the build-samples. bat file, modify the following line to reflect where the JDK is installed:</p>
<pre id="rn3z26" class="code">set JAVA_HOME=c:/jdk1.4.2_15 <br id="iane0" /></pre>
<p>5. If necessary, modify this line to point to where Cognos 8 is installed:<br id="rn3z1" /></p>
<p>6. Run build-samples.bat to compile the samples. This script will compile the sample code and create .class files in the folders. In each of the folders there will be a run.bat file.</p>
<p><img id="o:-61" style="width: 842px; height: 608px;" src="http://docs.google.com/File?id=dg3hk3rm_217cqk4kfcv_b" alt="" /></p>
<p>7. To test your compiled sample code, execute the run.bat file in the CapabilitiesGUI directory to run the sample Capabilities application.</p>
<pre id="rn3z26" class="code">
<div id="yjwa" style="padding: 1em 0pt; text-align: left;"><img id="qfbk0" style="width: 704px; height: 106px;" src="http://docs.google.com/File?id=dg3hk3rm_218hrtt2ddn_b" alt="" /></div>
</pre>
<p>8. If the URL is correct, click the OK button to connect to Cognos 8.</p>
<p><span id="lyt_0"><strong>Troubleshooting</strong></span></p>
<p>Upon running the sample code, the following error will occur if the java compiler compatibility flag needed to be set:</p>
<p><span style="font-family: Courier New;">Exception in thread &#8220;main&#8221; java.lang.UnsupportedClassVersionError: Bad version number in .class file.</span><br id="u8y30" /><br id="u8y31" />The samples will use the JRE that ships with Cognos 8. The error occurs because the java complier defaults to a version that is not compatible. To set the compatibility, in the build-samples.bat file, add the following two switches after &#8220;%JAVAC%&#8221;: -source 1.4 -target 1.4</p>
<p>The line will read as follows:<br id="n3rv0" /><br id="i-pm0" /><span style="font-family: Courier New;">&#8220;%JAVAC%&#8221; -source 1.4 -target 1.4 -classpath &#8220;%CLASSPATH%&#8221; Alerts/*.java CancelExec/*.java Common/*.java CapabilitiesGUI/*.java ContentStoreExplorer/*.java CreateDrillThrough/*.java DeployPackage/*.java DispatcherControl/*.java ReportCopyMove/*.java EventTrigger/*.java ExecReports/*.java ExecReportsAt/*.java GroupsAndRolesGUI/*.java HandlersCS/*.java PermissionsGUI/*.java PrintReport/*.java QueryCM/*.java RenderReport/*.java ReportAdd/*.java ReportCreate/*.java ReportDelete/*.java ReportParams/*.java ReportSpec/*.java ReportUpgrade/*.java runreport/*.java SaveAs/*.java Scheduler/*.java Security/*.java SendEmail/*.java Submit/*.java TesterCM/*.java ViewAll/*.java ViewCMReports/*.java ViewCMPackages/*.java</span><br id="i-pm1" style="font-family: Courier New;" /><br id="i-pm2" />Execute build-samples.bat again to recreate the class files.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Compiling+the+Cognos+8+SDK+Java+Samples+on+Windows+http://86c7m.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.clearviewinformatics.com/wp-content/plugins/tweet-this/icons/tt-twitter-micro3.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.clearviewinformatics.com/2008/05/15/setting-up-the-cognos-8-sdk-java-samples/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
