How to use methods from a JAR file inside my springcontext (Oracle fusion 12c) class file?

Dear Friends,
I have a jar file, which has executed classes and methods in it. I want to make use of these methods inside my springcontext piece of code.
Can someone please share an example  of how to write spingcontext code which is accessing classes/methods from  JAR files along with the any setup?
Thanks,

I have found the answer... as described in:
http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
the problem was that the properties are loaded with the getResource & getResourceAsStream methods and I didn't know that one. I thought that is was loaded through findClass because I saw the property files trying to be loaded through findClass.
The truth is that it tries to load with the getRessources methods and if it fails tries with the findClass/loadClass.
To Fix the problem, I have simply overriden the getRessourceAsStream to do my magic and that was it.
Thanks

Similar Messages

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

  • HOW TO USE CLIPS FROM A DVD???

    HOW TO USE CLIPS FROM A DVD???
    i know this may be a stupid and obvious question but i can't seem to figure it out.
    these are not copyrited dvds... mostly home movies and old home movies put onto dvd.
    thank you... much appreciated.

    Studio X has given one suggestion.
    MPEG Streamclip is another:-
    http://www.squared5.com/
    It is free but your computer may not have the QT MPEG 2 Playback Component which costs $20 from Apple as a download.
    If you have access to an Analogue-DV converter you can use that. Also a DV camcorder which has Analogue IN.
    If you have Final Cut Pro installed, you will have the QT component.
    Message was edited by: Ian R. Brown

  • Using methods from another Form C#

    Hello!
    I'm having some trouble using methods from one Form in another one. Here's the deal:
    This is a snippet from my 'main' form:
    public partial class PRINCIPAL : Form
    //some variables here
    Form2 Config = new Form2();
    Form3 Cadastro = new Form3();
    public PRINCIPAL()
    InitializeComponent();
    //code goes on and on
    //Here's the method I want to call on the other forms (Form2 and Form3)
    public void salva_banco()
    this.Validate();
    this.projetoBindingSource.EndEdit();
    this.modulosBindingSource.EndEdit();
    this.funcaoBindingSource.EndEdit();
    this.estadosBindingSource.EndEdit();
    this.tableAdapterManager.UpdateAll(this.database1DataSet);
    //And here is where I show Form3
    private void projetoDataGridView_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
    Cadastro.ShowDialog();
    //And here is where I show Form2
    private void funcaoDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
    Config.ShowDialog();
    }// And the code keeps on going}
    And this is a snippet from Form3:
    public partial class Form3 : Form
    public Form3()
    InitializeComponent();
    private void Form3_Load(object sender, EventArgs e)
    this.projetoTableAdapter.Fill(this.database1DataSet.Projeto);
    this.modulosTableAdapter.Fill(this.database1DataSet.Modulos);
    private void btnOK_Click(object sender, EventArgs e)
    if (projetoTextBox.Text == "")
    MessageBox.Show("some text here");
    else
    ////// HERE IS THE PLACE WHERE I WANT TO CALL THE METHOD! "salva_banco()"
    I've read lots of suggestions but none satisfied my condition.
    I appreciate any help.
    Thanks.

    You need to find the instance of the PRINCIPAL form to call the method on.  If you know there will always be exactly one open you can use:
    var principalForm = Application.OpenForms.OfType<PRINCIPAL>().Single();
    principalForm.salva_banco();
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How do I import from my Sony Z5, FCPX and iMovie do not recognise the file format?

    How do I import from my Sony Z5, FCPX and iMovie do not recognise the file format?

    GR-Blitz,
    You can see a few ways of doing it in this thread:
    https://forums.adobe.com/message/6474423#6474423

  • Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    Does anyone know how to use vlookup from a pop up menu to retrieve another pop up menu?

    BM,
    Pop-Up menu format is not dynamic. It is created in the Cells Inspector and can't be modified contingent upon the state of other cells.
    You could program a table to list the options available for the previous selection, but it wouldn't be in the form of a Pop-Up.
    Jerry

  • How can I switch from auto_login wallet to password-protected encryption wallet in 12c  ?

    How can I switch from auto_login wallet to password-protected encryption wallet in 12c
    --Now the autologin wallet is in effect
    SQL> select * from v$encryption_wallet
      2  ;
    WRL_TYPE
    WRL_PARAMETER
    STATUS       WALLET_TYPE    WALLET_OR FULLY_BAC
        CON_ID
    FILE
    /acfs3/wallet
    OPEN       AUTOLOGIN    SINGLE    NO
      0
    --I need to export the keys and it informs me to use password-based keystore
    SQL> ADMINISTER KEY MANAGEMENT export KEYS with secret tde_1234 to '/home/oracle/dumpdir/orapdba.wallet' IDENTIFIED BY "tde_1234";
    ADMINISTER KEY MANAGEMENT export KEYS with secret tde_1234 to '/home/oracle/dumpdir/orapdba.wallet' IDENTIFIED BY "tde_1234"
    ERROR at line 1:
    ORA-28417: password-based keystore is not open
    --So I try to close the autologin keystore and open the password-based keystore, but the autologin keystore cannot be closed
    SQL>  administer key management set keystore close;
    administer key management set keystore close
    ERROR at line 1:
    ORA-28365: wallet is not open
    SQL> administer key management set keystore open identified by "tde_1234";
    administer key management set keystore open identified by "tde_1234"
    ERROR at line 1:
    ORA-28354: Encryption wallet, auto login wallet, or HSM is already open
    So My question is
    How to switch from auto_login keystore to password-protected keystore ?

    Remove the cwallet.sso file and check the wallet status in v$encryption_wallet.
    If it is not opened, try to open it with administer key statement.
    Check the status again.

  • How to use C:when test... inside column in ADF table

    I am using ADF table with below two columns
    in First column i have to check the Type of document if it is doc type then i have to use commondlink to download that file ,Otherwise i need to show only text.
    for that i added
    *<c:when test="{boolean($favoriteType eq 'doc')}">*
    which is not working .
    please let me know how to use <C:when test... inside column in ADF table
    <tr:column sortProperty="favoriteName" sortable="true"
    headerText="#{res['favorite.favoritename']}"
    width="500" noWrap="false">
    <c:choose>
    *<c:when test="{boolean($favoriteType eq 'doc')}">*
    <tr:commandLink actionListener="#{bindings.downloadFile.execute}"
    text="#{row.favoriteName}"
    disabled="#{!bindings.downloadFile.enabled}"/>
    </c:when>
    <c:otherwise>
    <af:outputText value="#{row.favoriteName}"/>
    </c:otherwise>
    </c:choose>
    </tr:column>
    <tr:column sortProperty="favoriteType" sortable="true"
    headerText="#{res['favorite.favoriteType']}" rendered="true">
    <af:outputText value="#{row.favoriteType}" id="favoriteType"/>
    </tr:column>

    Hi Frank,
    Thanks it is working like cham..
    related to same page i am facing new problem which i posted at below thread
    How to get row data runtime @ trinidad table , set rowSelection="multiple"
    can u reply on same.
    Thanks for all help.
    Jaydeep

  • Just upgraded to jdk1.4 from 1.2 do I need to recompile all my class files?

    Just upgraded to jdk1.4 from 1.2 do I need to recompile all my class files?
    They run fine, but is there any benefit of recompiling all my class files?

    Nope. AFAIK you would experience exactly zero benefits from just recompiling the code. All that would do is regenerate the bytecode within the .class file(s), and as far as I know, the class file specification did not change. I am not aware of any modifications to the bytecode generation process in the 1.4 release that constitute actual changes in what's generated (for example, generating more efficient or optimized bytecode).
    (any other respondents feel free to correct me on this, as I admittedly spend very little of my time down at the bytecode and classfile level)
    -dSn

  • How to use image from a file in signature appearance.

    Hi,
    I am creating a Plugin for acrobat 9, using PubSec using DocSign sample as basis. I have created the appearance using text objects and the logos data that came with the DocSign sample. But I want to use image from a file (like, jpg) in the signature appearance creation. So far the documentation doesnt tell how to achieve this.
    Can you please tell me in a  "How-to" kinda way to achieve this?
    Thanks in advance.

    Thanks for ur prompt reply.
    There are so many samples in the sdk. which one is the "sample for adding images."?

  • How to use Stylesheets packaged in JAR file

    Hi,
    I would like to package XSL files in a JAR. The stylesheet may import other XSL files. For example:
    <xsl:import href="demos.xsl">
    <xsl:import href="table.xsl">
    where the original stylesheet and the imported stylesheets (demos.xsl and table.xsl) are all located in this package: com.company.xsl
    Is there a way for the transformers to retrieve the files from the JAR?
    Possibly another complication is that this JAR file is loaded at runtime.
    Any suggestions would be of great help. Thanks!

    Thanks that worked.
    However, is it possible to use a relative path? Right now it only works if the absolute path is used:
    <xsl:import href="jar:file:///c:/applications/bin/myjar.jar!/com/company/xsl/table.xsl" />
    It would be nice if this worked instead:
    <xsl:import href="jar:file:///./bin/myjar.jar!/com/company/xsl/table.xsl" />

  • JCA Classpath - How to use library from rar instead of from WLS

    We have a stand-alone resource adapter that uses the apache commons net library, and relies on features added in version 2.0.
    When we deploy to WLS 10.3.2, we get a class loading error when invoking the adapter. Method org.apache.commons.net.ftp.FTPClient.setConnectTimeout(T)V is not found.
    WLS 10.3.2 includes an older version of the library: com.bea.core.apache.commons.net_1.0.0.0_1-4-1.jar.
    Despite paclkaging the proper version (2.2) in our rar, the older and incompatible 1.4.1 version from the system classpath is used.
    Is there a way to use the version packaged in our stand-alone rar file? I have seen a way to do this for a war file (prefer-web-inf-classes in deployment descriptor).
    O know we could to modify the system classpath in the weblogic startup scripts to use the newer library. We prefer not to do this, since we don't know how WLS uses the library internally, and what might be affected by a different version.

    unfortunately, standalone adapter has not prefer-web-inf-classes or similar feature support.

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • How to use DOMParser from an Applet / Or, how to parse XML from an Applet?

    Hey,
    As stating in the subject line, I wonder how to do it without getting an �Access Denied� error.
    I would like to parse a XML file that has external DTD pointing to a SYSTEM location. Yes, I can change it to a public location. However, in either way, I have problems to use DOMBuilder to parse the xml file. The application always throws the security exception.
    I tried to use the DOMParser from org.apache.xerces.parsers to parse the xml file. I set the DOMParser to ignore parsing the external DTD, and use the DOMParser.parse(InputSource) to parse the xml file from a giving URL. However, I get null of the result document.
    Does anyone know how to parse the XML from an Applet? Or, does anyone know how to use the DOMParser from an Applet?
    Thank you very much,

    If the document resides on the local filesystem, you will need to sign a CAB or JAR for the applet to circumvent the sandbox's security restrictions. There are dozens of posts on how to do this. Basically, that will turn the applet into an application, from a Java security perspective.
    - Saish
    "My karma ran over your dogma." - Anon

  • How to invoke method from swing

    Aloha,
    Thanks in advance for help...
    I have created GUI, and want to use buttons to choose which Physics problem to solve. I have already coded the Physics in .java and have different methods for each one. I would like for the button to create an action that places the different problems on the panel, each with a section for information, given input and outputting the answers to solve for.
    public void actionPerformed(ActionEvent e)
         { // [20]
               String actionCommand = e.getActionCommand();
               if (e.getActionCommand().equals("Quiz 1"))
                 Quiz1();
               }Quiz1 is a private void method that calls on a helper method to perform calculations.
    When I use the above command, it invokes the method, but not on the GUI panel, it comes up on the DOS screen. What command should I use to place the calculations and information for this method on the GUI? I know I need to separate and create areas of the panel for input, etc. But I want the method to take place on the GUI.
    Thank you for your time and energy.

    Hi - I have a question now regarding using a single button, to collect data from multiple fields, make calculations and then return figures to multiple fields.
    I thought I could read them into two different variables (valueIn, valueIn2, etc) and then apply them to the JTextField variables. I was experimenting with just passing the initial figures without making calculations...
    But just trying with two different fields, the compiler gives me an error for an "unreachable statement". How do I collect from multiple sources and return separate answers to different fields?
    I tried to look up definitions for compiler messages, but couldn't find anything regarding "unreachable statements". Therefore, I would also appreciate any suggestions about a dependable source to reference errors.
    Thank you in advance for your assistance, I am attaching copy of code below...
    public class ChoiceFrame extends JFrame implements ActionListener
    { // [1]
         SolveIt converter = new SolveIt();
         public static final int WIDTH = 650;
      public static final int HEIGHT = 500;
      private JTextArea infoText;
      private double valueIn = 0;
      private double valueIn2 = 0; 
      private JTextField cliffHt;
      private JTextField deceleration;
      private JTextField timeFlight;
      private JTextField height;
      public static void main(String[] args)
      { // [2]
              ChoiceFrame myWindow = new ChoiceFrame();
              myWindow.setVisible(true);
         } // [2]
         public ChoiceFrame()
         { // [3]
              super( );
              setSize(WIDTH, HEIGHT);
              setTitle("ChoiceFrame");       
              Container contentPane = getContentPane();
              contentPane.setBackground(Color.BLUE);
              contentPane.setLayout(new BorderLayout());
              addWindowListener(new WindowDestroyer());                     
              JMenu memoMenu = new JMenu("File");
        JMenuItem file;
        file = new JMenuItem("Clear");
        file.addActionListener(this);
        memoMenu.add(file);
        file = new JMenuItem("Exit");
        file.addActionListener(this);
        memoMenu.add(file);
        JMenuBar mBar = new JMenuBar( );
        mBar.add(memoMenu);
        setJMenuBar(mBar);     
              JPanel northPanel = new JPanel();   
              northPanel.setLayout(new BorderLayout());          
              JPanel textPanel = new JPanel();          
        northPanel.add(textPanel, BorderLayout.WEST);       
              infoText = new JTextArea (8, 43);
              infoText.setBackground(Color.WHITE);
              infoText.setLineWrap(true);
              textPanel.add(infoText);
        infoText.setText("The Coyote, in his relentless attempt to catch the elusive Road Runner,\nloses his footing and falls from a sheer cliff ___ meters above the ground.\nAfter falling for __ seconds (without friction), the Coyote remembers that\nhe is wearing his Acme rocket-powered backpack, which he immediately turns on.\nThe Coyote makes a gentle landing (zero velocity) on the ground below,\nbut is unable to turn off the rocket, and is immediately propelled back up into the air.\n___ seconds after leaving the ground, the rocket runs out of fuel.\nAfter continuing upwards for a ways, the poor Coyote plunges back to the ground.");
              JPanel inputPanel = new JPanel();          
        northPanel.add(inputPanel, BorderLayout.EAST);      
              inputPanel.setLayout(new GridLayout(3,2));     
              cliffHt = new JTextField(5);
              inputPanel.add(cliffHt);
              JLabel mtrsLabel = new JLabel("meters");
              inputPanel.add(mtrsLabel);
              JTextField secondsf = new JTextField(5);
              inputPanel.add(secondsf);
              JLabel sfLabel = new JLabel("seconds falling");
              inputPanel.add(sfLabel);
              timeFlight = new JTextField(5);
              inputPanel.add(timeFlight);
              JLabel sFlightLabel = new JLabel("seconds in flight");
              inputPanel.add(sFlightLabel);          
              JPanel southPanel = new JPanel();          
              southPanel.setLayout(new BorderLayout());          
              JPanel buttonPanel = new JPanel();
              buttonPanel.setLayout(new FlowLayout());
              JButton calcButton = new JButton("Calculate");
              calcButton.addActionListener(this);
              buttonPanel.add(calcButton);
              southPanel.add(buttonPanel, BorderLayout.NORTH);
              JPanel outputPanel = new JPanel();
           outputPanel.setLayout(new GridLayout(3,2));          
              JLabel decelLabel = new JLabel("With the rocket backpack turned on, the deceleration is: ");
              outputPanel.add(decelLabel);
              deceleration = new JTextField(10);
              outputPanel.add(deceleration);
              JLabel htLabel = new JLabel("the max height is: ");
              outputPanel.add(htLabel);
              height = new JTextField(10);
              outputPanel.add(height);
              JLabel vLabel = new JLabel("the velocity is: ");
              outputPanel.add(vLabel);
              JTextField velocity = new JTextField(10);
              outputPanel.add(velocity);          
           southPanel.add(outputPanel, BorderLayout.CENTER);
              contentPane.add(northPanel, BorderLayout.NORTH);                         
              contentPane.add(southPanel, BorderLayout.CENTER);     
         } // [3]
         public void actionPerformed(ActionEvent e)
         { // [20]
              String actionCommand = e.getActionCommand();
              if (e.getActionCommand().equals("Calculate"))
                        deceleration.setText(Quiz1());
                        height.setText(Quiz1());
              else if (e.getActionCommand().equals("Close"))
                   System.exit(0);
              else if (actionCommand.equals("Exit"))
          System.exit(0);
         } //[20]
         private String Quiz1()
         { // [40]
              SolveIt calculate = new SolveIt();
              double gravity = 9.81;
              double initialSpeed = 0;
              double freeFall = 5; //this is time for freefall in seconds
              valueIn = stringToDouble(cliffHt.getText());
              return Double.toString(valueIn);     
              valueIn2 = stringToDouble(timeFlight.getText());          
              return Double.toString(valueIn2);
         } // [40]     
         private static double stringToDouble(String stringObject)
         { // [30]
              return Double.parseDouble(stringObject.trim());
         } // [30]

Maybe you are looking for