Compiling with external JARs using Eclipse

I've spent 3 days on this and I still don't seem to be any nearer solving the problem. I am using a couple of external JAR files within my project and everything is working fine within the IDE, it's when I come to compile my own JAR that I'm having problems. I've tried created my JAR by choosing file->export, but it doesn't seem to pull in the external JARs. My class paths must be correct as I can run it within the IDE, but I'm missing something.
Next I discovered ANT and had a play with that. After some toil I got it to generate a JAR, but it has two problems. 1. The manifest file cannot be found, but let's forget about that for now, as I haven't really looked into it. 2. The generated JAR is only 250Kb, when (if the external JARs are packaged with it) it should be closer to 5Mb. Again I've set my class paths in the External Tools dialog, but still nothing.
Could someone please try and point me in the right direction. I've even spent a couple of hours at Borders reading up on ANT and Eclipse, that where my ANT script came from, but it hasn't got me the result I need. If it's any help my build.xml is below
<?xml version="1.0" encoding = "UTF-8"?>
<project name="C_G" default="Main Build" basedir=".">
    <property name="bin" location="bin"/>
    <property name="src" location="."/>
    <property name="jardir" location="${bin}/lib"/>
    <property name="jarfile" location="${jardir}/c_g.jar"/>
    <property name="build.compiler"
    value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
    <target name="Main Build" depends="Initialize, Compile, Jar">
        <echo message="Ant Building"/>
    </target>
    <target name="Initialize">
        <delete dir="${bin}"/>
        <delete dir="${jardir}"/>
        <mkdir dir="${bin}"/>
        <mkdir dir="${jardir}"/>
    </target>
    <target name="Compile" depends="Initialize">
        <javac srcdir="${src}"
            destdir="${bin}">
        </javac>
    </target>
    <target name="Jar" depends="Initialize, Compile">
        <jar destfile="${jarfile}" basedir="${bin}"/>
    </target>
</project>

Damn it, so I do have to tackle the 'manifest not
found problem' first then. I would have though
Eclipse would have made a better job at making the
manifest file.All I can say: RTFM. This is not an Eclipse support forum. Maybe it does, and you use some incorrect settings.
I just placed it into the root of the JAR, but when I
run it can't find itIt doesn't belong there. It goes into a directory named META-INF

Similar Messages

  • Problem exporting JAR using Eclipse with JNIlib

    Hi all,
    I have a java application that is using an external JAR. The external JAR is coupling with a JNIlib.
    When I 'export' my application to a runnable JAR in Eclipse, the external JAR is extracted and included in my runnable JAR. However, when I execute the runnable JAR, some functions of the application is not working due to missing library. After I put JNIlib into my Java/Extension, the runnable JAR then works fine.
    I want to distribute the JAR to other people, but I can't ask them all to put JNIlib in their Java/Extension.
    Does anyone have an idea? I am a novice to Java, it took me awhile to figure out how to create a runnable JAR.
    Thank you very much.
    Eagle.

    first , it says unable to access jar file .
    upon deeper inspection i found that background processes is created behind thus the jar file been activated but the UI doesnt show up? any more idea of where my codes gone wrong? which seems perfect for me
    anyway thanks but i still .. it says unable to access jar file

  • How to use external JARs in Eclipse

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in my classpath,so I choose [Project] -> [Properties] -> Java Build Path -> Libraries -> Add External JARs and add WarShell.jar to the list.
    But when I run the program I got a Exception:NoClassDefFoundError.
    Why?How to fix it?
    Another question... Your classpath is not available in Eclipse,right?
    Thanks for your time! ^_^

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in
    my classpath,so I choose [Project] -> [Properties]
    -> Java Build Path -> Libraries -> Add External JARs
    and add WarShell.jar to the list.
    But when I run the program I got a
    Exception:NoClassDefFoundError.
    Why?How to fix it?Did you run your program from Eclipse ?
    If yes, it should work (or seek for an Eclipse-specific forum.)
    But if not, keep in mind that your project settings are limited to Eclipse. You'll have to define a correct classpath for running your application.
    Another question... Your classpath is not available
    in Eclipse,right?Mine? I don't think it is available for anyone ;-P

  • Problem Exporting .Jar Using Eclipse

    I have a small problem of exporting using Eclipse 3.2
    First , i could , debug , run as application with no problem.
    however after i compiled into jar , and i tried opening the jar file
    theres no responses. what could possibly be the problem ?
    my manifest file includes the main class of program and all external .jar files.
    below is my main class
    -automatic batch printing
    -able to select target folder for batch printing
    -able to select interval for printing
    -able to stop printing
    -includes log of activity of threads and printing services
    -free for all to use =D
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Desktop;
    import java.awt.Graphics;
    import javax.swing.JFileChooser;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import java.io.*;
    import java.util.*;
    import java.util.Timer;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import javax.swing.filechooser.FileFilter;
    import javax.print.*;
    import java.lang.Object;
    import java.awt.JobAttributes.*;
    import javax.swing.text.*;
    import javax.swing.text.html.HTMLDocument;
    import javax.swing.text.rtf.*;
    import java.awt.Dimension;
    import javax.swing.JEditorPane;
    import java.awt.Rectangle;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JButton;
    import javax.swing.JTextPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JCheckBox;
    import javax.swing.JLabel;
    import javax.swing.SwingUtilities;
    import java.awt.Font;
    public class Test extends JFrame implements Printable{
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;  //  @jve:decl-index=0:visual-constraint="36,9"
         private JButton Open = null;
          Date date;
           class MyFilter extends javax.swing.filechooser.FileFilter {
                 public boolean accept(File file) {
                     String filename = file.getName();
                             if(file.isDirectory()){
                          return true;
                     }else{
                          return filename.endsWith(".rtf");
                 public String getDescription() {
                     return "Rich Text Format ( .rtf ) ";
         public Test() {
              super();
              initialize();
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        Test application = new Test();
                        application.show();
                        application.setLocationRelativeTo(null);
                        application.setVisible(true);
                        application.getJContentPane().setVisible(true);
         private void initialize() {     
              this.setSize(408, 282);
              this.setResizable(false);
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setContentPane(getJContentPane());
              this.setTitle("Auto Print Utility");
              this.setVisible(true);
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jLabel1 = new JLabel();
                   jLabel1.setBounds(new Rectangle(131, 102, 59, 16));
                   jLabel1.setFont(new Font("Apple Chancery", Font.PLAIN, 10));
                   jLabel1.setText("MilliSeconds");
                   jLabel = new JLabel();
                   jLabel.setBounds(new Rectangle(16, 103, 53, 16));
                   jLabel.setText("Interval :");
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.add(getOpen(), null);
                   jContentPane.add(getStop(), null);
                   jContentPane.add(getJTextField(), null);
                   jContentPane.add(getJScrollPane(), null);
                   jContentPane.add(getJScrollPane1(), null);
                   jContentPane.add(getJTextField1(), null);
                   jContentPane.add(jLabel, null);
                   jContentPane.add(jLabel1, null);
                   jContentPane.add(getJButton(), null);
              return jContentPane;
         static void printPrinterJob() {               
                    PrinterJob printerjob = PrinterJob.getPrinterJob();
                    // set the characteristics of
                    // the job to be printed - use setPageable and book if
                    // outputing a document. Use setPrintable for "simple" printing - all pages formatted the same
                    printerjob.setPrintable(new Test());
                    try {
                      PrintService[] ser =PrinterJob.lookupPrintServices();
                         ReadRegistry rr = new ReadRegistry();
                     int x =ser.length;
                      //  String def = rr.getPrinter();
                     String def ="Microsoft Office Document Image Writer";
                     for(int y=0;y<x;y++){
                         if(ser[y].getName().equals(def)){
                             printerjob.setPrintService(ser[y]);
                             System.out.println(ser[y]+" SET");
                         }else
                     System.out.println(ser[y]);
                    } catch (PrinterException exception) {
                       System.err.println("Printing error: " + exception);
       public static void disableDoubleBuffering(Component c) {
                  RepaintManager currentManager = RepaintManager.currentManager(c);
                  currentManager.setDoubleBufferingEnabled(false);
      public static void enableDoubleBuffering(Component c) {
                  RepaintManager currentManager = RepaintManager.currentManager(c);
                  currentManager.setDoubleBufferingEnabled(true);
      public boolean printfolder(){
              Desktop de = Desktop.getDesktop();
              java.io.File folder = new File(jTextField.getText());
              File[] listOfFiles = folder.listFiles();
               for (int i = 0; i < listOfFiles.length; i++) {
                    if (listOfFiles.isFile()) {
                        try {
                                  de.print(listOfFiles[i].getAbsoluteFile());
                                  File fi = new File(jTextField.getText()+"\\Deleted");
                                  fi.mkdir();
                                  Thread.currentThread().sleep(1000);
                                  listOfFiles[i].renameTo(new File("Z:\\BTSS Log\\Fax\\Y2007 M10 D25\\Deleted",listOfFiles[i].getName().toString()));
                             } catch (Exception e1) {
                                  // TODO Auto-generated catch block
                                  e1.printStackTrace();
              System.out.println("File: " + listOfFiles[i].getName());
              date = new Date();
              PrintLog.append("Printed : "+listOfFiles[i].getName()+" "+date.toString()+"\n");
              } else if (listOfFiles[i].isDirectory()) {
                   date=new Date();
              System.out.println("Directory: " + listOfFiles[i].getName()+" "+date.toString());
              PrintLog.append("No Files Printed "+date.toString()+"\n");
              return true;
         private JButton Stop = null;
         Thread tt = new Thread(){
              public void run(){
                   while(true){
                   int count = 0; // @jve:decl-index=0:
                   printfolder();
                   try {
                        Long lon = new Long(jTextField1.getText());
                        System.out.println(lon);
              tt.sleep(lon);
              } catch (InterruptedException e) {}
              count++;
              if (count >= 10000) break;
         private JTextField jTextField = null;
         private JScrollPane jScrollPane = null;
         private JScrollPane jScrollPane1 = null;
         private JTextField jTextField1 = null;
         private JLabel jLabel = null;
         private JLabel jLabel1 = null;
         private JTextArea PrintLog = null;
         private JTextArea ThreadLog = null;
         private JButton jButton = null;
         public void run(){
                   while(true){
                   int count = 0;
                   printfolder();
                   try {
              // Thread.sleep (300000);//
                        Long lon = new Long(jTextField1.getText());
                        System.out.println(lon);
              Thread.currentThread().sleep(lon);
              } catch (InterruptedException e) {}
              count++;
              if (count >= 10000) break;
         private JButton getOpen() {
              if (Open == null) {
                   Open = new JButton();
                   Open.setBounds(new Rectangle(11, 38, 187, 29));
                   Open.setText("Start");
                   Open.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             try{
                                  if(jTextField1.getText().equals("")){
                                       JOptionPane.showMessageDialog(null,"MilliSeconds Required, Please Enter A Valid Number Into The TextBox", "MilliSeconds Required", JOptionPane.ERROR_MESSAGE);
                                  }else if(jTextField.getText().equals("")){
                                       JOptionPane.showMessageDialog(null,"Please Specify Directory To Be Print From By Clicking On The TextBox", "Directory Missing", JOptionPane.ERROR_MESSAGE);
                                  }else{
                                       Long.parseLong(jTextField1.getText());
                                       try {     
                                                 if(tt.isAlive()) {
                                                           tt.resume();
                                                           date=new Date();
                                                           ThreadLog.append("Activity Resumes "+date.toString()+"\n");
                                                 } else {
                                                                tt.start();                    
                                                                date=new Date();
                                                                ThreadLog.append("Activity Started "+date.toString()+"\n");
                                                      } catch (Exception f) {
                                                           JOptionPane.showMessageDialog(null, f.getMessage(), "Error Occured", JOptionPane.ERROR_MESSAGE);
                             }catch(Exception f){
                                  JOptionPane.showMessageDialog(null, f.getMessage(), "Long Format Exception", JOptionPane.ERROR_MESSAGE);
              return Open;
         * This method initializes Stop     
         * @return javax.swing.JButton     
         private JButton getStop() {
              if (Stop == null) {
                   Stop = new JButton();
                   Stop.setBounds(new Rectangle(197, 38, 195, 29));
                   Stop.setText("Stop");
                   Stop.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
              try{
         tt.suspend();
         date = new Date();
         ThreadLog.append("Activity Suspend "+date.toString()+" \n");
              }catch(Exception g){
                   JOptionPane.showMessageDialog(null, g.getMessage(), "Error Occured", JOptionPane.ERROR_MESSAGE);
              return Stop;
         public int print(Graphics arg0, PageFormat arg1, int arg2) throws PrinterException {
              // TODO Auto-generated method stub
              return 0;
         * This method initializes jTextField     
         * @return javax.swing.JTextField     
         */JFileChooser jfc = new JFileChooser();
         private JTextField getJTextField() {
              if (jTextField == null) {
                   jTextField = new JTextField();
                   ReadRegistry rr = new ReadRegistry();
                   String dpath = rr.getDirecotry();
                   File file = new File(dpath);
                   jfc.setCurrentDirectory(file);
                   jTextField.setText(dpath);
                   jTextField.setBounds(new Rectangle(11, 14, 383, 20));
                   jTextField.setEditable(false);
                   jTextField.addMouseListener(new java.awt.event.MouseAdapter() {
                        public void mouseClicked(java.awt.event.MouseEvent e) {
                             jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                             jfc.showOpenDialog(jContentPane);
                             File file = jfc.getSelectedFile();
                             String path = file.getAbsolutePath();
                             jTextField.setText(path);
              return jTextField;
         * This method initializes jScrollPane     
         * @return javax.swing.JScrollPane     
         private JScrollPane getJScrollPane() {
              if (jScrollPane == null) {
                   jScrollPane = new JScrollPane();
                   jScrollPane.setBounds(new Rectangle(197, 70, 193, 55));
                   jScrollPane.setViewportView(getThreadLog());
              return jScrollPane;
         * This method initializes jScrollPane1     
         * @return javax.swing.JScrollPane     
         private JScrollPane getJScrollPane1() {
              if (jScrollPane1 == null) {
                   jScrollPane1 = new JScrollPane();
                   jScrollPane1.setBounds(new Rectangle(14, 132, 375, 108));
                   jScrollPane1.setViewportView(getPrintLog());
              return jScrollPane1;
         * This method initializes jTextField1     
         * @return javax.swing.JTextField     
         private JTextField getJTextField1() {
              if (jTextField1 == null) {
                   jTextField1 = new JTextField();
                   jTextField1.setBounds(new Rectangle(70, 101, 62, 20));
              return jTextField1;
         * This method initializes PrintLog     
         * @return javax.swing.JTextArea     
         private JTextArea getPrintLog() {
              if (PrintLog == null) {
                   PrintLog = new JTextArea();
                   PrintLog.setEditable(false);
                   PrintLog.setFont(new Font("Arial", Font.PLAIN, 12));
              return PrintLog;
         * This method initializes ThreadLog     
         * @return javax.swing.JTextArea     
         private JTextArea getThreadLog() {
              if (ThreadLog == null) {
                   ThreadLog = new JTextArea();
                   ThreadLog.setEditable(false);
                   ThreadLog.setFont(new Font("Taffy", Font.PLAIN, 10));
              return ThreadLog;
         * This method initializes jButton     
         * @return javax.swing.JButton     
         private JButton getJButton() {
              if (jButton == null) {
                   jButton = new JButton();
                   jButton.setBounds(new Rectangle(12, 70, 185, 25));
                   jButton.setText("Reset");
                   jButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             Test nt = new Test();
                             nt.show();
                             hide();
              return jButton;
    } // @jve:decl-index=0:visual-constraint="-9,-14"
    i can compile into jar successfully but the jar file wouldn't respond.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

    first , it says unable to access jar file .
    upon deeper inspection i found that background processes is created behind thus the jar file been activated but the UI doesnt show up? any more idea of where my codes gone wrong? which seems perfect for me
    anyway thanks but i still .. it says unable to access jar file

  • Migrating prject with external jars from 10g to 11g

    Hi..
    I am migrating a project which is using external jar files. I have included jar files in sca-inf/lib folder as well as on server directory. But i am getting error that the particular class in jar cannot be intialized. Error is given below:-
    Could not initialize class com.ge.realestate.ea.framework.util.FrameworkXMLUtils;

    Thanks for replying...
    I have already followed all the steps in that document. But i am unable to access classes in the jars included in the project. May be I have to recompile all the jars in 11g with ant. Because I am able to access only those classes which are not importing any classes. The imports used in the specific class are given below:-
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.StringWriter;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import oracle.xml.parser.v2.XMLLSSerializer;
    import org.apache.log4j.Logger;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.collaxa.xml.XMLHelper;
    import com.oracle.bpel.client.BPELFault;
    I am not sure if importing one of these is causing the problem.

  • Session EJB with external jar dependacy problem

    I have a Session EJB that I am having trouble adding to my Creator 2 project. The session bean is developed with netbeans 5.0, ejb2.1, for sjsas 8.2 PE. It has one external jar which is compiled into the ejb jar. When I try to add the session bean to my creator 2 project I get a java.lang.reflect.UndeclaredThrowableException. Creator 2 is not finding one of the Exception external jar.
    The only way I have been successful in added the session EJB is also add the external jar. But the project fails when you load the page with javax.naming.NameNotFoundException: No object bound to the name java: xxxxxx I believe the EJB is failing at instantiation.
    Has anyone had this problem and overcome it?
    Thanks,
    Francis

    Finally I found solution.
    Instead of deploying ejb jar to ear I've created a new ear deployment profile (so now I have ejb jar profile and ear profile).
    It contains ejb jar + external jar library and custom manifest.mf with class-path to ext. jar.
    Difference between this and previous version is the old one ear cointained ejb jar and the ejb jar contained ext. jar.
    Now ear contains both ejb jar and ext. jar.
    Rado

  • Connection with external System using AS2/SFTP adapter.

    Hi All,
    I need to use SFTP/AS2 to connect to an external Server which is not in our landscape.
    Can anybody could help whether i need to create a party on the Sender side as sender system is an external Server.
    I have gone through many docs but i am not clear when to use party and when not..?
    Regards,
    Rahul

    Hi Rahul
    Whether to use a party or not is both an architectural question as well as a development question.
    Architecturally, if an external server is not in your landscape and belongs to a different company/entity, your scenario would be a B2B process. You can refer to the below link for more details about B2B, but I've included a short snippet below too.
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/c7a475da5e31ebe10000000a42189b/content.htm
    Using a communication party, you address a company that is involved in a B2B process.
    The (technical) name of the communication party (for example Bosch) is the identifier for the company within an Integration Directory. To be able to identify the company during any external communication using a globally unique ID, you specify alternative identifiers for a communication party. For external communication, the name of the communication party that is known internally is mapped to the ID. A particular identifier is specified in the communication channel (see below).
    In terms of development, not all adapters (FTP, SFTP, SOAP, etc) require the use of a party object when you develop a B2B integration scenario. There are companies which have implemented all B2B scenarios using those adapters in an A2A style (using just Business Systems.)
    As Harish has mentioned, if you use the Seeburger AS2 adapter, you will need the party object (AS2ID is configured there), but if you use the SFTP adapter, it is optional.
    For your case, I'd recommend going with Party to clear distinguish that it is a B2B process.
    Rgds
    Eng Swee

  • Build problem with external JAR

    Hello,
    I am developing a custom web dynpro component. I need to use some of the JARs delivered by SAP such as com.sap.security.api (can be found in \SAP\IDE\IDE70\eclipse\plugins). I have included the JAR files to my project in Properties->Java Build path->Libraries). Everything is working fine: I can build/deploy the application and it is running fine in the application server.
    Anyhow, the problem comes when I try to activate my activity in the development configuration perspective.
    In the build log I can see for example the following:
    [javac] ERROR: /usr/sap/VDD/JC10/j2ee/cluster/server0/temp/CBS/3/.B/4789/t/067D33924E6154CA5284F16652954F88/gen_wdp/packages/com/mydevelopment/mystuff/MyComponent.java:29: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.IUser;
    I have been reading several threads about similar issues, but I am not quite satisfied with the answers. There seems to be several opinions about how to solve this.
    Now the questions are:
    - How can I get rid of this error?
    - What is the best practice in overall to use the SAP delivered JARs in custom web dynpro component/project.
    Edited by: Pa Pa on Nov 21, 2009 2:07 PM

    Hi Pa,
    To use any jar in your DC  on NWDI track, you need to follow the following steps:
    1. Go to Your project>Used DCs and try to add a new one by locating the DC among those which are already present on the track.
    2. If you are not able to locate any DC with the required jars then,
    a. Create an external library DC where you need to add all the jars in the library folder of the project using an activity.
    b. Create public parts for compile time and run time for this dc.
    c. Deploy the DC.
    d. Goto src folder of your dc and say Add files to DTR (your jars would be on the track)
    e. Deploy the external library DC so that the Jars are deployed on the portal server.
    f. Add the public parts of this External Library DC under used DCs of your development component.
    g. Add this external library under library references of your project.
    h. Build and deploy.
    i.  Now try activating your activity.
    Use the following link to know how to execute these steps.
    [Add and Use Jars through used DCs|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]
    [Screen Shots|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1078501850DB00490474849923920126End?blog=/pub/wlg/9517]
    Please let me know, if you ahave any doubt.
    Regards,
    Tushar Sinha

  • Constant problems with external HD used for time machine.

    I have had numerous problems with my backup disk and can't seem to solve the problem... I often get errors with disk not ejecting properly, sometimes when the iMac has gone to sleep, sometimes not. Often the Mac won't recognise the disk when plugged back in (it recognises the other partition though). I can get the disk in disk utility sometimes, but if I run repair disk it finds a lot of errors and tells me it can't fix the disk. I'm told to Backup, format the disk etc.
    Running yosemite on a 2008 iMac - disk is Hitachi 1TB usb powered (plugged straight in to iMac). I have prevented spotlight from indexing the HD.
    Any advice ideas? Thanks in advance.

    applejoose wrote:
    I can't because it's a specific type.
    Is it hard-wired to the enclosure? If not, examine the connectors and compare with what is available. I doubt that it has a connector that is unique to this particular drive.
    If you choose to replace the drive, don't get another manufacturer-branded external. They are often "crippled" so that they can't be used in anything other than the generally cheap enclosure in which they are packaged, or only usable if you re-format them. Here's a comment from a recent Macintouch thread on new Seagate 5TB externals (http://www.macintouch.com/readerreports/harddrives/index.html#d23mar2015):
    A word of warning for those who want to rip out their drive. If you have data on it, it will only be read by Seagate controllers such as its original case or the GoFlex adapters. If you stick it in something like an IcyDock, it cannot be read and require a reformat. If you used it with another controller, it cannot be read when you put it back on the Seagate controllers.
    A good quality enclosure, such as the OWC Mercury aluminum cases, is a good investment. You can choose the drive you install, and you usually get a better drive warranty that way.

  • How to create a Sales Order with external number using BAPI

    Hi People,
    I am wonderning how to create Sales order using external number range by BAPI (SALESORDER_CREATEFROMDAT202).
    I tried search but could not succeed in finding the solution.
    Please share if anyone has some info.
    Thanks in advance.
    Regards,
    Praveen

    As per my understanding, the BAPI
    SALESORDER_CREATEFROMDAT202
    mentioned by you, is not BAPI. In fact, that is basic IDoc Type.  For processing an Inbound IDoc, we use FM IDOC_INPUT_ORDERS.
    If you want to create sales order other than IDoc, refer FM BAPI_SALESORDER_CREATEFROMDAT2. There you can provide external sales order no in SALESDOCUMENTIN. In addition to that check whether your sales doc type is relevant for external number range or not. If yes. then make sure you are providing external number according to the number range maintained.
    If you still have any concerns, please revert back.
    Thanks, JP

  • Problem with External Table using ORACLE_INTERNAL TYPE in 9i release 2

    Hi,
    I have tried to create an external table in oracle 9i release 2 using the following qurey:
    CREATE TABLE emp_ext
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_INTERNAL
    DEFAULT DIRECTORY admin_dat_dir
    LOCATION(admin_dat_dir:'emp1.dmp')
    PARALLEL
    AS
    SELECT * from employees;
    and getting the following error message
    ORA-30657: operation not supported on external organized table
    Please help me.
    Thanks in Advance

    As a matter of fact oracle 9i has two types of api for external tables one is oracle_loader and the other is oracle_internal which in 10g become oracle_datapump.
    What my question is how can I use the other type in case of external table as we are doing in 10g? Do I need to run any script to enable this feature or is there any privillege issue?
    I've given the read, write privillege to the user and the oracle user has read/write permission in os level on the location of the directory.

  • Error when trying to compile with cos.jar

    When compiling on linux/tomcat machine I put the path to cos.jar in my javac command and get the following error:
    .../cos.jar: cannot execute binary file
    I can compile servlets that do not require this jar file but cannot compile servlets that need it.
    Does anyone know how to resolve this?

    Then your command is wrong. The error message tells you that you're trying to execute the cos.jar instead of specifying it in the classpath.

  • Mac Pro with External Camera use FaceTime for Mac?

    Any ideas what cameras will work with a Mac Pro that does not have Isight camera? Can I use a Camcorder or still camera that takes videos?

    I use a LogiTech C910 1080 HD Video webcam on my MacPro 8 core and it works great. BestBuy sells them for $79.95 and on sale this week for $10.00 off.. great camera for the price. Also works with iMovie for short clips.
    I just downloaded FaceTime for the Mac and installed it.. called myself using my iPhone 4 and works like a champ.
    It has built in stereo microphone but I use a separate Plantronics USB headset for better sound and listening when talking with someone on Skype or any other video chat.
    CAUTION..If you do test it using your iPhone (in the same room) watch out for the FEEDBACK through the speakers.. be ready to hit the MUTE button on your iPhone or you will get reverb loud and real fast. And it even mutes iTunes when a call comes in.. and when you hang up iTunes comes back up..pretty cool.
    The Logitech C910 doesn't say it will work on a Mac (on the box, it only says Windows) but it does and works just fine. Plus there are other drivers on their web site for the Mac and other cameras.
    Hope this helps..
    Message was edited by: Chris86303
    Message was edited by: Chris86303

  • Third party dlls and jars with in jars.

    Hi,
    I have a application which uses several 3rd party jars and dlls.I want to create a executable jar for the application .I added the external jars using fat jar eclipse plugin. Iam able to run the jar on my system successfully.But on other systems the application doesnot launch as the dlls are not avaiable which is fairly understandable. It gives the following exception 'JarClassLoader: Warning: Unable to load native library: java.lang.NullPointerException'.Now i need to include these dlls into the jar so that i can distribute the application as a single jar and launch double clicking it.I know expecting dlls ignores the cross platform nature of java but i need it.please give me some idea on how this can be done.
    Thanks in advance

    Hi,
    I have a application which uses several 3rd party jars and dlls.I want to create a executable jar for the application .I added the external jars using fat jar eclipse plugin. Iam able to run the jar on my system successfully.But on other systems the application doesnot launch as the dlls are not avaiable which is fairly understandable. It gives the following exception 'JarClassLoader: Warning: Unable to load native library: java.lang.NullPointerException'.Now i need to include these dlls into the jar so that i can distribute the application as a single jar and launch double clicking it.I know expecting dlls ignores the cross platform nature of java but i need it.please give me some idea on how this can be done.
    Thanks in advance

  • Problem creating Jar in Eclipse

    I have a problem in exporting my eclipse java project to a jar file. It does not include the external jars used in the buildpath in the MF file. How to add external jars used in the project propoerties' buildpath in the MF file while exporting a Java Project to a jar? Thanks in advance.

    hi,
    there is no possibility in eclipse to export the external files from class path.
    but you can add the source files of your .jar to your project without using the class path.
    that should be the solution of your issue :)

Maybe you are looking for

  • Can I use a friends upgrade for myself?

    I have an iPhone 4S and I want the iPhone 5. I cannot get a new phone for a year now and I want to know if I found a good "loop hole" or not in Verizon's upgrade program. My plan is this: Sell my iPhone 4S 32 GB for about $300 on eBay. On my friends

  • Error message when trying to scan to email or fax

    when I try to scan to email or fax i get this message: "secure connection to SMTP server could not be established..." I didn't have this problem when I first got the laserjet pro 200 m276. any thoughts on how to remedy>

  • Flash panel in PS CS5 not showing up

    I am tryig to build a simple flash panel followig some tutorials from the old panel sdk which uses flex 3.  Since its all flex 4 and flash builder now some things arent lining up   Anyhow, i have the swf building ok with a simple label.  I can view i

  • Multiple Computers / Multiple iPods

    I have two computers at home that I use to sync both my iPods. Is there anyway that both computers can have access to the same Music folder so that whatever updates I make on one appears on the other?

  • -13005 Error when connecting to 2003 Server

    I've got a 2003 Server setup with Active Directory and I've enabled SFM (Services for Macintosh), and created a few mac shares. I created a new account and left the "User must change password at next logon" option enabled, something I don't usually d