Home > Ask the SAP software/management Experts > Java/SAP development Questions & Answers > How to call a JCo through a Java applet
Ask The SAP Expert: Questions & Answers
EMAIL THIS

How to call a JCo through a Java applet

Austin Sincock EXPERT RESPONSE FROM: Austin Sincock

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 15 June 2006
Executing a Java applet throws an exception when run through Internet Explorer. In the Eclipse environment, the applet works perfectly; logs on to R/3 with my user I.D. and password and executes a simple function module. It then returns back some parameter text and logs off. In Internet Explorer, when executing the HTML file, I get the following error message:

java.lang.NoClassDefFoundError.

How do I call JCo through a Java applet?



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Java/SAP development
How to provide an SAP R/3 4.5B application server with a Web service interface
Consuming a Web service from an SAP 4.6c R/3 application server
With Java development experience, should I go into SAP XI?
Answering basic BAPI questions
Viewing a list of SAP interfaces
Which SAP implementation phase is Java necessary for?
Interface a locally developed application with SAP
Should an ABAP professional know Java?
Storing SAP information from a JCo connector
Integrating SAP with C++, Java, and Powerbuilder on Sybase and Oracle DBs

SAP Java and J2EE
SAP CTO Sikka: SAP's innovation gets overlooked
SAP CTO expects today's SAP applications to be running in 2020
Tips on SAP ABAP
How to provide an SAP R/3 4.5B application server with a Web service interface
Consuming a Web service from an SAP 4.6c R/3 application server
SAP NetWeaver Configuration and Customization
Is C, C++ and Java knowledge required when learning SAP?
How to be a self-taught NetWeaver and ABAP expert
Getting started with a NetWeaver career
An ABAP user wants to learn XI

SAP interface technologies
SAP CTO expects today's SAP applications to be running in 2020
SAP TechEd 09 keynoters: Managing change today like trying to board a speeding train
SAP's Web 2.0 strategy makes way for social networking in business apps
Error when clicking the SAP GUI logon button
SAP applications demo: BP's key mapping
Viewing a list of SAP interfaces
Interface a locally developed application with SAP
Will there always be an implicit commit in an RFC?
Is there a way to search within IDocs using a purchase order number?
Configuring the JDBC Connector Service to perform database lookups

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Application Link Enabling  (SearchSAP.com)
IDoc  (SearchSAP.com)
Remote Function Call  (SearchSAP.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


The problem lies with the fact that your applet class cannot 'see' the sapjco.jar file. Because the applet runs in its own container, it does not have access to the local CLASSPATH variable set by your operating system. There are two mechanisms to make the sapjco.jar file visible to the applet.

The easiest way to do this is to copy the sapjco.jar file into the "lib/ext" directory underneath your Java JRE home directory. Find the JRE/lib/ext directory in the directory where you installed the Java JDK. Copy sapjco.jar here, then restart your applet.

The second mechanism would be used for deploying your applet to a wider audience across your network. In that case, you would need to physically store the sapjco.jar file on the Web server that will be hosting your applet. This should be contained in the same directory in which your applet is being deployed (for more information perform a Google search for "deploying applet as war"). You will also need to specify where the applet can find this jar using the CACHE_ARCHIVE attribute in the applet tag of the HTML document used to deploy the applet. Set the CACHE_ARCHIVE attribute equal to the local path on the server where sapjco.jar can be found (ex. PARAM NAME="CACHE_ARCHIVE" VALUE="/webserver/jcodirectory/sapjco.jar").




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SAP White Paper Topics
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts