Java Programming - Import Element.jar

Really need help here, hope any java gurus can assist me in this. I'm trying to run a simple programme here:
import element.*;
class MethodDrawing
public static void main(String[] args)
DrawingWindow d = new DrawingWindow(500,500);
d.moveTo(100,100);
d.lineTo(100,150);
After compiling I got an error saying "Package Element does not exist.
After some researches, I understand that I need to set my CLASSPATH to the jar file. Thus, I did the following;
- I inserted element.jar in the directory "c:\cis109\element.jar".
- Program directory "c:\cis109\javacourse\
exercise1\MethodDrawing.java"
- I also set CLASSPATH variable to "c:\cis109\element.jar;c:\javacourse;.\
After all I've done the same error occurs. I'm running on WinXP. Any solutions ?

SimonAlicante wrote:
Hey Guys! I am having the same problem. I have come to a real dead-end. Did you manage to work out what the problem is?
Was hoping to get past Chapter 5 today but I have tried everything and can't get anywhere. That CLASSPATH thing is driving me demented!Ok, I assume you're on Windows 2000, XP or Vista (English language).
1 - copy the file MethodDrawing.java* and elements.jar into C:\Temp;
2 - open your command prompt by pressing the 'Start' button, select 'Run', type "cmd" and press the button 'OK';
3 - on the command promt, navigate to C:\Temp:cd C:\Temp4 - compile your java-file: javac -cp .;elements.jar MethodDrawing.java5 - run the compiled class-file: java -cp .;elements.jar MethodDrawingIf you do this exactly as I posted, it will work.
* the file MethodDrawing.java should look exactly like this:
import element.*;
public class MethodDrawing
    public static void main(String[] args)
        DrawingWindow d = new DrawingWindow(500,500);
        d.moveTo(100,100);
        d.lineTo(100,150);
}I even uploaded all files necessary to run that code snippet (I also have that book by D. Bailey). You can find it here:
[http://iruimte.nl/tmp/]

Similar Messages

  • How to run a java program using additional jar files

    Hi everyone in the forum,
    i ve created an app using the hFreeChart in eclipse, so i added them as external jar files and tested the program.
    now my problem is that the program should run using a terminal in win and i do not know how can i do to make the command line or the system to find them, i added to the path but i read somtehing about classpath, but i have no idea. if anyone can help?
    thanks in advanced

    Actually, the best way to prepare a program for regular running is to make it an executable jar file, which means adding a manifest file which contains (at least) a Main-class: and a Class-Path: line. Referenced class libraries typically sit in a lib directory next to the java file. Then you can run it using java -jar myprog.jar.
    Failing that create a batch file or link that supplied java with command line parameters including a -classpath=
    Using the class path environment results in too much contention between competing values of it.

  • Java programming(import statement)

    My query is that what if i import whole package instead of one class being used in my code.
    eg.
    if i need " java.awt.Button" in my program code
    and my import statement is
    import java.awt.*;
    will it be reduce execution performance of my program?
    or it will reduce only Complie time performance?

    Only the compile time performance. All the import statement does is tells the compiler it can use the classes. Try importing a whole swathe of classes into a small program and see what I mean. The resulting class file doesn't bloat.

  • Problem while executing simple java program

    Hi
    while trying to execute a simple java program,i am getting the following exception...
    please help me in this
    java program :import java.util.*;
    import java.util.logging.*;
    public class Jump implements Runnable{
        Hashtable activeQueues = new Hashtable();
        String dbURL, dbuser, dbpasswd, loggerDir;   
        int idleSleep;
        static Logger logger = Logger.getAnonymousLogger();      
        Thread myThread = null;
        JumpQueueManager manager = null;
        private final static String VERSION = "2.92";
          public Jump(String jdbcURL, String user, String pwd, int idleSleep, String logDir) {
            dbURL = jdbcURL;
            dbuser = user;
            dbpasswd = pwd;
            this.idleSleep = idleSleep;
            manager = new JumpQueueManager(dbURL, dbuser, dbpasswd);
            loggerDir = logDir;
            //preparing logger
            prepareLogger();
          private void prepareLogger(){      
            Handler hndl = new pl.com.sony.utils.SimpleLoggerHandler();
            try{
                String logFilePattern = loggerDir + java.io.File.separator + "jumplog%g.log";
                Handler filehndl = new java.util.logging.FileHandler(logFilePattern, JumpConstants.MAX_LOG_SIZE, JumpConstants.MAX_LOG_FILE_NUM);
                filehndl.setEncoding("UTF-8");
                filehndl.setLevel(Level.INFO);
                logger.addHandler(filehndl);
            catch(Exception e){
            logger.setLevel(Level.ALL);
            logger.setUseParentHandlers(false);
            logger.addHandler(hndl);
            logger.setLevel(Level.FINE);
            logger.info("LOGGING FACILITY IS READY !");
          private void processTask(QueueTask task){
            JumpProcessor proc = JumpProcessorGenerator.getProcessor(task);       
            if(proc==null){
                logger.severe("Unknown task type: " + task.getType());           
                return;
            proc.setJumpThread(myThread);
            proc.setLogger(logger);       
            proc.setJumpRef(this);
            task.setProcStart(new java.util.Date());
            setExecution(task, true);       
            new Thread(proc).start();       
         private void processQueue(){       
            //Endles loop for processing tasks from queue       
            QueueTask task = null;
            while(true){
                    try{
                        //null argument means: take first free, no matters which queue
                        do{
                            task = manager.getTask(activeQueues);
                            if(task!=null)
                                processTask(task);               
                        while(task!=null);
                    catch(Exception e){
                        logger.severe(e.getMessage());
                logger.fine("-------->Sleeping for " + idleSleep + " minutes...hzzzzzz (Active queues:"+ activeQueues.size()+")");
                try{
                    if(!myThread.interrupted())
                        myThread.sleep(60*1000*idleSleep);
                catch(InterruptedException e){
                    logger.fine("-------->Wakeing up !!!");
            }//while       
        public void setMyThread(Thread t){
            myThread = t;
        /** This method is only used to start Jump as a separate thread this is
         *usefull to allow jump to access its own thread to sleep wait and synchronize
         *If you just start ProcessQueue from main method it is not possible to
         *use methods like Thread.sleep becouse object is not owner of current thread.
        public void run() {
            processQueue();
        /** This is just another facade to hide database access from another classes*/
        public void updateOraTaskStatus(QueueTask task, boolean success){
            try{         
                manager.updateOraTaskStatus(task, success);
            catch(Exception e){
                logger.severe("Cannot update status of task table for task:" + task.getID() +  "\nReason: " + e.getMessage());       
        /** This is facade to JumpQueueManager method with same name to hide
         *existance of database and SQLExceptions from processor classes
         *Processor class calls this method to execute stored proc and it doesn't
         *take care about any SQL related issues including exceptions
        public void executeStoredProc(String proc) throws Exception{
            try{
                manager.executeStoredProc(proc);
            catch(Exception e){
                //logger.severe("Cannot execute stored procedure:"+ proc + "\nReason: " + e.getMessage());       
                throw e;
         *This method is only to hide QueueManager object from access from JumpProcessors
         *It handles exceptions and datbase connecting/disconnecting and is called from
         *JumpProceesor thread.
        public  void updateTaskStatus(int taskID, int status){       
            try{
                manager.updateTaskStatus(taskID, status);
            catch(Exception e){
                logger.severe("Cannot update status of task: " + taskID + " to " + status + "\nReason: " + e.getMessage());
        public java.sql.Connection getDBConnection(){
            try{
                return manager.getNewConnection();
            catch(Exception e){
                logger.severe("Cannot acquire new database connection: " + e.getMessage());
                return null;
        protected synchronized void setExecution(QueueTask task, boolean active){
            if(active){
                activeQueues.put(new Integer(task.getQueueNum()), JumpConstants.TH_STAT_BUSY);
            else{
                activeQueues.remove(new Integer(task.getQueueNum()));
        public static void main(String[] args){
                 try{
             System.out.println("The length-->"+args.length);
            System.out.println("It's " + new java.util.Date() + " now, have a good time.");
            if(args.length<5){
                System.out.println("More parameters needed:");
                System.out.println("1 - JDBC strign, 2 - DB User, 3 - DB Password, 4 - sleeping time (minutes), 5 - log file dir");
                return;
            Jump jump = new Jump(args[0], args[1], args[2], Integer.parseInt(args[3]), args[4]);
            Thread t1= new Thread(jump);
            jump.setMyThread(t1);      
            t1.start();}
                 catch(Exception e){
                      e.printStackTrace();
    } The exception i am getting is
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe
    Exception in thread "main" ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
    JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820] Please help me.....
    Thanks in advance.....sathya

    I am not willing to wade through the code, but this portion makes me conjecture your using an Oracle connect string instead of a class name.
    java.lang.NoClassDefFoundError: jdbc:oracle:thin:@localhost:1521:xe

  • Sorting Names in a text file using java program

    h1. Deleting numbers in a text file, sorting the names  and writing in to a new file
    h2. Sample data
    =================
    71234 RAJA
    89763 KING
    89877 QUEEN
    ==================
    h2. Java Program
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.InputStreamReader;
    import java.io.Writer;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Iterator;
    class Sortnames { 
    public static void main(String args[]) { 
    try { 
    ArrayList storeWordList = new ArrayList();
    ArrayList storeWordList2 = new ArrayList();
                   int i;
    char c;
                   String inputfile = "names_konda.txt";
                   String tempfile = "newdatafile.txt";
                   String outputfile = "sortedoutput.txt";
                   StringBuffer strBuff=null;
    Writer output = null;
    File file =null;
                   Writer sortedoutput = null;
    boolean select =false;
                   //*********************************************** Reading data from Input file     
    FileInputStream fstream = new FileInputStream(inputfile);
    // Get the object of DataInputStream
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    String strLine;
    //Read File Line By Line
    while ((strLine = br.readLine()) != null) { 
    storeWordList.add(strLine);
    //Close the input stream
    in.close();
                   //*********************************************** Adding only alphabets to buffer and writing to file
                   file= new File(tempfile);
                   output = new BufferedWriter(new FileWriter(file));
    strBuff = new StringBuffer();
    for (Iterator iter = storeWordList.iterator(); iter.hasNext();) { 
         String s = (String) iter.next();
                        //System.out.println("String "+s);
         for (i = 0; i < s.length() ; i++)
    c = s.charAt(i);
    if (Character.isLetter(c)) {
    strBuff.append(c);
                        strBuff.append("\n");
    String myout = strBuff.toString();                
         output.write(myout);
         output.close();
         //============================================== Reading the created file,Sorting and placing in Collections
                   FileInputStream fstream2 = new FileInputStream(tempfile);
    // Get the object of DataInputStream
    DataInputStream in2 = new DataInputStream(fstream2);
    BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
    String strLine2;
    //Read File Line By Line
    while ((strLine2 = br2.readLine()) != null) {                 
    storeWordList2.add(strLine2);
    Collections.sort(storeWordList2);
                   //===================================================
    File sortedfile = new File(outputfile);
    sortedoutput = new BufferedWriter(new FileWriter(sortedfile));
    for(int m=0; m<storeWordList2.size(); m++)
         if (storeWordList2.get(m).toString().trim().length() > 0)
              sortedoutput.write(storeWordList2.get(m).toString());
                        sortedoutput.write("\n");     
    sortedoutput.close();
    System.out.println("Names Sorted SUCCESFULLY");
    br.close();
    br2.close();
    in.close();
    fstream.close();
    fstream2.close();
                   ///==========================================
                   File f1 = new File(tempfile);
                   boolean success = f1.delete();
                   if (!success){
                        System.out.println("failed deletion ");
                        System.exit(0);
                        }else{
                        System.out.println("deleted");
                   // ==========================================
    } catch (Exception e) {//Catch exception if any 
    System.out.println("Error: " + e);
    h2. Thanks and regards
    h1. BalaNagaRaju.M
    h1. [email protected]

    Do you have a question? Also see the sticky welcome post on how to post formatted code.

  • Problem in Creating New position in Siebel CRM 7.8 using java program

    Hi
    We have Siebel CRM with Business Object and Business Component as Position.
    Position Business Component has a manadatory pick list Division.
    When we try to create a new Position by picking the Divison then we are getting the below error
    Logged in OK!
    picking the list
    in the pick() method before
    <Exception>
    <Major No.>256</Major No.><Minor No.>21944</Minor No.><Message>An error has occurred picking the current row.
    Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DAT-00292)</Message><DetailedMessage>Unknown<DetailedMessage>
    <Exception>
    <com.siebel.om.sisnapi.i>
    <Major No.>256</Major No.><Minor No.>21944</Minor No.><Message>An error has occurred picking the current row.
    <Error><ErrorCode>21944</ErrorCode> <ErrMsg>An error has occurred picking the current row.
    Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DAT-00292)</Message><DetailedMessage>Unknown<DetailedMessage>
    Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DAT-00292)</ErrMsg></Error>
    <com.siebel.om.sisnapi.i>
    <Error><ErrorCode>21735</ErrorCode> <ErrMsg>Siebel eScript runtime error occurred in procedure 'BusComp_SetFieldValue' of BusComp [Position]:
    <Error><ErrorCode>21944</ErrorCode> <ErrMsg>An error has occurred picking the current row.
    ConversionError 1616: Undefined and Null types cannot be converted to an object.
    Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DAT-00292)</ErrMsg></Error>
    (SBL-SCR-00141)</ErrMsg></Error>
    <Error><ErrorCode>21735</ErrorCode> <ErrMsg>Siebel eScript runtime error occurred in procedure 'BusComp_SetFieldValue' of BusComp [Position]:
    <Error><ErrorCode>21735</ErrorCode> <ErrMsg>Stack trace:
    BusComp [Position].BusComp_SetFieldValue(), Line: 1110</ErrMsg></Error>
    ConversionError 1616: Undefined and Null types cannot be converted to an object.
    </com.siebel.om.sisnapi.i></Exception>
    (SBL-SCR-00141)</ErrMsg></Error>
    <Error><ErrorCode>21735</ErrorCode> <ErrMsg>Stack trace:
    BusComp [Position].BusComp_SetFieldValue(), Line: 1110</ErrMsg></Error>
    </com.siebel.om.sisnapi.i></Exception>
    at com.siebel.data.SiebelBusComp.pick(SiebelBusComp.java:241)
    at siebelconn.main(siebelconn.java:44)
    Java program
    import com.siebel.data.*;
    import com.siebel.data.SiebelException;
    class siebelconn {
    public static void main (String args [])
    SiebelDataBean m_dataBean = null;
    SiebelBusObject m_busObject = null;
    SiebelBusComp m_busComp = null;
    SiebelBusComp picklistBC = null;
         try{
    m_dataBean = new SiebelDataBean(); //Create Siebel JDB instance
    m_dataBean.login("XXXX", "XXX", "XXX");
         System.out.println("Logged in OK!");
    m_busObject = m_dataBean.getBusObject("Position");
    m_busComp = m_busObject.getBusComp("Position");
    m_busComp.newRecord(false);
    picklistBC = m_busComp.getPicklistBusComp("Division");
    picklistBC.clearToQuery();
    picklistBC.setViewMode(3);
    picklistBC.setSearchSpec("Name", "idmtest");
    //picklistBC.executeQuery(true);
    picklistBC.executeQuery2(true,true);
    if(picklistBC.firstRecord())
    System.out.println("picking the list");
    picklistBC.pick();
    System.out.println("records are there");
    m_busComp.setFieldValue("Name","Access GE HQ 11");
    m_busComp.writeRecord();
    }//if
         if(m_busObject!=null)
    m_busObject.release();
    if(m_busComp!=null)
    m_busComp.release();
    if(picklistBC!=null)
    picklistBC.release();
    if(m_dataBean!=null)
    m_dataBean.logoff();
    catch(Exception e)
    System.out.println(e);e.printStackTrace();
    if(m_busObject!=null)
    m_busObject.release();
    if(m_busComp!=null)
    m_busComp.release();
    if(picklistBC!=null)
    picklistBC.release();
    try
    if(m_dataBean!=null)
    m_dataBean.logoff();
    }catch(Exception e1){System.out.println(e1);}
    Can any body please help us.
    Thanks

    From the error code, it looks like you have a scripting error in the BusComp_SetFieldValue event on the Position
    business component in your application.
    Have you tried to look at that code or to turn of scripting for the application as a total?
    Axel

  • Executing java program in oracle

    Good day everyone!
    I created a small java program.
    import javax.swing.JOptionPane;
    public class LogOn {
    public static void main (String [] args) {}
    public static void ShowMessage(){
    JOptionPane.showConfirmDialog(null, "Hello", "Info", JOptionPane.PLAIN_MESSAGE);
    I compiled the code using javac and loaded into oracle using "loadjava -u scott/tiger Logon
    Then I created a procedure,
    create or replace procedure l_b
    as language java
    name 'LogOn.showMessage()';
    then I executed the procedure
    SQL> execute l_b;
    it's just say
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Any idea why its doing that?
    Thanks for the time
    Edited by: Xtro on Oct 30, 2008 9:38 AM

    What is the "warning banner" attempting to communicate? And where did this requirement come from-- presumably users are not seeing a banner when they log in today.
    Realistically, you are not going to be able to cause arbitrary client applications to display something, you are going to have to configure each client application separately, which seems like a huge investment of time for very marginal benefits assuming that government agencies have a decent number of client machines and a decent variety of client applications. The glogin.sql file will work for SQL*Plus (assuming very recent versions or that no one uses the "connect" command to connect to a different database), but I believe you are looking for something that works across client applications, which probably doesn't exist.
    Justin

  • Running executable jar from within a java program

    Is there a way to launch an executable jar in a java program? I tried wrapping the jar in an exe and calling it using Runtime exec() and though this approach works it does only for windows. I want it to work for unix/linux too.

    jaki wrote:
    Yes, but it's a sub process.Nope.
    Hence the calling process doesn't quit unless the called one returns.Wrong.
    My calling program is actually a jar and what Im trying to do is delete the jar after it's done running. But the above method (of launching a separate jar doing the deletion) doesn't seem to work for the above mentioned reason.Wrong.
    If you could tell me any other way it would really be a big help.You don't need any other way. Maybe you need to allow some time for the calling program to wind up. 20 seconds may be overkill, but I'm not in the mood to find how short it can be and still succeed.
    The two classes are packaged in separate jars.import java.io.IOException;
    public class Deletee {
        public static void main(String[] args) {
          try {
             String[] cmds = {"java", "-jar", "E:/temp/Deleter.jar"};
             Runtime.getRuntime().exec(cmds);
             System.exit(0);
          } catch (IOException ex) {
             ex.printStackTrace();
    import java.io.File;
    import javax.swing.JOptionPane;
    public class Deleter {
       public static void main(String[] args) {
          File file = new File("E:/temp/Deletee.jar");
          try {
             Thread.sleep(20000);
          } catch (InterruptedException ex) {
             ex.printStackTrace();
          if (file.delete()) {
             JOptionPane.showMessageDialog(null, "Deleted");
          } else {
             JOptionPane.showMessageDialog(null, "Oops");
    }Try it and see for yourself.
    db

  • Writing into a jar file through Java program

    Is there a way to get a file from a jar (for ex. a properties file) make changes to it on the fly and write the same file back to the jar through a Java program?

    I cannnot give u exact code as i am bit busy..but i am giving close to exact
    below is code for reading contents of jar file
    import java.io.*;
    import java.util.jar.*;
    public class JarRead {
    public static void main (String args[])
    throws IOException {
    if (args.length != 2) {
    System.out.println(
    "Please provide a JAR filename and file to read");
    System.exit(-1);
    JarFile jarFile = new JarFile(args[0]);
    JarEntry entry = jarFile.getJarEntry(args[1]);
    InputStream input = jarFile.getInputStream(entry);
    process(input);
    jarFile.close();
    private static void process(InputStream input)
    throws IOException {
    InputStreamReader isr =
    new InputStreamReader(input);
    BufferedReader reader = new BufferedReader(isr);
    String line;
    while ((line = reader.readLine()) != null) {
    System.out.println(line);
    reader.close();
    now here say u have test.jar which contains test.txt (file)
    then
    java JarRead test.jar test.txt
    will print content of text.txt
    now in ur case u write content of each file in some other file modify it there and then create a jar file from those files using jaroutput stream .....
    this may not be all clear ..but what to do..bit busy...u are welcomed to make changes in above stratergy....n queries if any after using above stratergy and/or your great brain...

  • Using a UNIX shell script to run a Java program (packaged in a JAR)

    Hi,
    I have an application (very small) that connects to our database. It needs to run in our UNIX environment so I've been working on a shell script to set the class path and call the JAR file. I'm not making a lot of progress on my own. I've attached the KSH (korn shell script) file code.
    Thanks in advance to anyone who knows how to set the class path and / or call the JAR file.
    loggedinuser="$(whoami)"
    CFG_DIR="`dirname $0`"
    EXIT_STATUS=${SUCCESS}
    export PATH=/opt/java1.3/bin:$PATH
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIR
    java -classpath $
    EXIT_STATUS=$?
    cd $OLDDIR
    echo $EXIT_STATUS
    exit $EXIT_STATUS

    Hi,
    I have an application (very small) that connects to
    our database. It needs to run in our UNIX environment
    so I've been working on a shell script to set the
    class path and call the JAR file.
    #!/bin/sh
    exec /your/path/to/java -cp your:class:paths:here -MoreJvmOptionsHere your.package.and.YourClass "$@"Store this is a file of any name, e.g. yuckiduck, and then change the persmissions to executechmod a+x yuckiduckThe exec makes sure the shell used to run the script does not hang around until that java program finishes. While this is only a minor thing, it is nevertheless infinite waste, because it does use some resources but the return on that investment is 0.
    CFG_DIR="`dirname $0`"You would like to fetch the directory of the installation out of $0. This breaks as soon as someone makes a (soft) link in some other directory to this script and calls it by its soft linked name. Your best bet if you don't know a lot of script programming is to hardcode CFG_DIR.
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIRVery bad technique in UNIX. UNIX supports the notion of a "current directory". If your user calls this program in a certain directory, you should assume that (s)he does this on purpose. Making your application dependent on a start in a certain directory ignores the very helpful concept of 'current directory' and is therefore a bug.
    cd $OLDDIRThis has no effect at all because it only affects the next two lines of code and nothing else. These two lines, however, don't depend on the current directory. In particular this (as the cd above) does not change the current directory for the interactive shell your user is working in.
    echo $EXIT_STATUS
    exit $EXIT_STATUSEchoing the exit status is an interesting idea, but if you don't do this for a very specific purpose, I recommend not to do this for the simple reason that no other UNIX program does it.
    Harald.

  • Problem with creation of a jar file from inside a java program

    Hi,
    I am trying to create a jar file at runtime from within a java program.
    I am able to create a jar file just fine using:
    String[] jarArgs = new String[3];
    jarArgs[0] = "cvf";
    jarArgs[1] = "C:\temp\myjar.jar";
    jarArgs[2] = "C:\temp\this";
    sun.tools.jar.Main main1 = new sun.tools.jar.Main(System.out, System.err, "jar");
    main1.run(jarArgs);However, when I look at the jar it puts the absolute path to the files inside such as:
    C:\temp\this\is\my\package\Class.class
    instead of only this\is\my\package\Class.class
    When running the jar command from the command line it works just fine and I have the relative paths in my jar file.
    Does anyone have any experience with this and could help me out?
    Thanks in advance
    Edited by: mruf on Apr 11, 2008 1:51 AM

    Shouldn't jarArgs[2] = "-C C:\temp\this"

  • How do i use an import statement in a java program

    I need to write a java program which will connect to the Database but i need to do an import like in DB2 which will load data to the table.
    How do i execute that import statement

    Are you saying that you need to add rows to a table in DB2 via a Java program? If so, you need to look at the JDBC API, (available on this site along with a bunch of tutorials). If not, post again with a clearer description of your problem.

  • Unable to see the imported files in ODI after executing my java program

    Hi,
    I am using the following java code to import the physical topology into ODI11G.
    ===========================================================================
    ImportServiceImpl importService =
    new ImportServiceImpl(pOdiInstance);
    importService.importTopologyFromFolder(importService.IMPORT_MODE_SYNONYM_INSERT_UPDATE,FolderPath, true);
    ===========================================================================
    The above code went through fine while executing my program.But, i can't able to see the imported topology in ODI.
    Can you suggest me how to import the topologies as well as work repository into ODI through Java programming.
    Thanks in advance,
    Ganesh Kesavarapu

    I would do that as a last resort, as it happens to be a client server, I don't think they'd appreciate me needing to reboot a Unix server during the day. Would anyone have any other suggestions?
    I just removed the JSPs from the live server, and refreshed the page and Tomcat could not find the JSPs, so I'm sure I have the correct directory. I then made sure the .java and .class files were deleted from the work directory, uploaded my new files (again) and hit refresh... and yet again I was served the same code as always, when I view source it still shows me the old source code even though the JSP file and compiled java files and class show that the new file should be shown, not the old one.

  • Using DB2's import/export utilities in Java program

    DB2 database has build in utility called export, throgh which we can export the output of a Query directly onto a Lotus 123 file. But I beleive that , to invoke such DB2 utilities throgh a Java Program, we need to have APIs.
    My question is ,are such APIs available ?
    If so, what are the APIs necessary for calling this EXPORT and IMPORT utilities of DB2 ?

    Well, If you have to use Runtime.exec() and provide these as command lines, then the best option is to write a shell script( my Java application is on AIX platform) and then call the shell script through exec().
    But Shell scripts don't run well with Runtime.exec() right ?
    B'Cause, I tried it but the application did'nt throw up any exception. No message was flashed either. The process was just hanging.....so do you know a better method to actually run a shell script through a Java program ?

  • Static initialization of java code included in the Imported Archives jars?

    Hi
    Does SAP PI 7.0 support static initialization of java code included in the Imported Archives jars?
    Static block of a java class included in the Imported Archive jars throws a Runtime Exception called ExceptionInInitializationError while trying to run.
    Regards,
    RDS

    Have you tested the code outside PI?

Maybe you are looking for

  • Print to your HP ePrint enabled printer from wherever life or work takes you

    HP ePrint enabled printers allow for mobile printing and offer these key benefits: • Print from anywhere to your web-connected printer by sending an email to your printer's email address.1 • With wireless direct printing, you can simply walk up and p

  • Issue with MDX report in BI 4.1,SP2

    Hello Experts, We have quite a few MDX universe Bex query based reports functioning well in BI 4.0,SP2 environment. When i moved these reports to BI 4.0,SP5,Patch6 environment, they work fine. But when these reports are moved to a BI 4.1,SP2 environm

  • Update with Outer Join, round 2

    Thanks for those of you who helped me out on the first one (I never thought that you could use a one-row SELECT like that). However, here is a new version of my problem: I have three tables. Table_1 has a column that needs to be updated based on valu

  • Cant get past the "lets get started" page!!!!!

    When I click on the "ipod" section in my itunes library, theres a page that says "Lets get started" and tells me to name my ipod and all that. the problem is that the right part of the page is cut off and i cant reach the options that i assume are th

  • CustomCatalog hacks

    Hey guys, I have a concern and it is the CustomCatalog that we feel with our Internationlization messages. This is nice we have a one stop shop to place all of our custom messages, but here are some weaknesses. 1. Scalability. 2. Multiple Projects wo