cancel
Showing results for 
Search instead for 
Did you mean: 

sapjco.jar and java webstart (jnlp)

Former Member
0 Kudos

Hi,

Has anybody created java web start application which connects to sap (by using sapjco.jar)?

My compiled application works correctly when I open it directly by pressing demo.jar (sapjco.jar is in appropriate directory), but when I've created .jnlp file which is responsible for calling my application, the error during calling method addClientPool is thrown. I am pretty sure that it occurs, because the application (in java web start version can't find sapjco.jar). I checked the file many times and it seems to be correct.

Did anybody face similar problem?

Pls help me if u know anything about that.

I list my .jnlp file below (quite a lot of code is in comment, so i suggest to focus on <resources>):


<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp  spec="1.2+" 
codebase="file:."  
href="demo.jnlp">

	<information>    
		<title>JBapi Connector - demo 1</title>    
		<vendor>Wapice - rako@wapice.com</vendor>    
		
		<!-- 
		<homepage href="docs/help.html"/>    
		-->
		<description>SwingSet2 Demo Application</description>    
		<description kind="short">A demo of the capabilities 
	    of the Swing Graphical User Interface.</description>    
	    
	    <!--
	    <icon href="images/swingset2.jpg"/>    
	    <icon kind="splash" href="images/splash.gif"/>   
	    --> 
	    
	    <offline-allowed/>  
	    
	    <!--   
	    <association mime-type="application-x/swingset2-file" extensions="swingset2">    
	    <shortcut online="false">      
	    <desktop/>      
	    <menu submenu="My Corporation Apps"/>    
	    </shortcut>
	    -->
	      
	</information>  
	<information os="linux">       
	    <title> SwingSet2 Demo on Linux </title>    
	    
	    <!--
	    <homepage href="docs/linuxhelp.html">  
	    -->
	</information> 
	<!-- 
	<security>      
	    <all-permissions/>  
	</security>  
	-->
	<resources>    
	    <j2se version="1.2+"/>    
	    <jar href="demo.jar" main="true"/> 
	    <jar href="sapjco.jar"/>
	</resources>  
	<application-desc main-class="com.wapice.connector.JBapiConnector"/>
</jnlp>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Maybe you fotgot two dlls which are necessary for sapjco works?

Try to put:

<resources os="Windows">

<nativelib href="sapjcodll.jar"/>

</resources>

into your jnlp file and the sapjcodll.jar is a wrapper for the two dlls needed and you have to put them into the top level in the sapjcodll.jar.

Wish it helps.

Dennis

Former Member
0 Kudos

Hi,

I used first of ur suggestions and didn't try the second one (since the first one works correctly).

I am very grateful for ur answer. It helped me to avoid many additional problems.

I give u 10 points.

Thanks again.

Hopefully I'll be able to help you in the future too.

BR,

Rafal

Answers (1)

Answers (1)

Former Member
0 Kudos

by the way, you may also want to load the libraries explicitly by adding the following lines into ur application.

static {

System.loadlibrary("librfc32")

System.loadlibrary("sapjcorfc");

}

If this helps, please reward points.

Dennis