I need Java Classes to...

Hi every one,
I need a java class that takes a .class file (or set of files) and returns a list of all the classes that are used (referenced) by that class.
Does anyone know of a Java class, or a Method or a package, or a tiny magical Gremlin that can do that?
Also does anyone know of a class or method that takes two strings and returns a boolean informing me if one string is anywhere to be found in the other, for instance string abc is in string bcabcdef (it's there in the middle).
I could code this last one but there may be a free (for non-commercial uses) way to get this already done.
thank plenty

Hi every one,
I need a java class that takes a .class file (or set
of files) and returns a list of all the classes that
are used (referenced) by that class.
Does anyone know of a Java class, or a Method or a
package, or a tiny magical Gremlin that can do that?Not sure of this one, but the reflection mechanism might work.
>
Also does anyone know of a class or method that takes
two strings and returns a boolean informing me if
one string is anywhere to be found in the other, for
r instance string abc is in string bcabcdef (it's
there in the middle).
I could code this last one but there may be a free
(for non-commercial uses) way to get this already
done.
public boolean isSt2InSt1(String st1, String st2) {
  return st1.indexof(st2) != -1;
thank plenty

Similar Messages

  • Why we need Java Class in c++ pof Serialization

    Hi,
    I'm really confused why we need java class which implements PortableObject to support complex objects of c++. If we are not using any queries or entry processors in the application can't we keep the object as serialized byte format and can't we retrieve in from the c++ deserialization.
    Please share your thoughts if there's a way if we can skip any Java implementation.
    regards,
    Sura

    feel both are doing same work. Also can anyone tell me what is teh difference between Serilization and Exgternalization.If you need someone to tell you the difference, (a) how can you possibly 'feel both are doing the same work'? and (b) why don't you look it up in the Javadoc?
    It's not a secret.

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Error Message: A main Java class needs to be specified to run the program.

    Hi,
    I am adding a program object to cms using java program, and trying to run it. I am getting an error message like
    Error Message: A main Java class needs to be specified to run the program.
    Could you please help me on this., please find the pasted program object pasted below
    public class MoveReports   {
    public void run(IEnterpriseSession enterpriseSession, IInfoStore infoStore,
                   String[] args) throws SDKException {
        int objectSize = ;
        String cms = "";
         String username = "";
         String password = "";
         String auth = "";
        try {
              ISessionMgr sm = CrystalEnterprise.getSessionMgr();
             enterpriseSession = sm.logon(username, password, cms, auth);
             IInfoStore oInfoStore=(IInfoStore)enterpriseSession.getService("", "InfoStore");
                 IInfoObjects iObjects = null;
                   iObjects = oInfoStore.query("Select * from CI_INFOOBJECTS where SI_PARENTID = 44104 AND SI_PROGID LIKE '%CrystalEnterprise.Excel%'");
                   // Getting total number of reports
                   objectSize = iObjects.size();
                   if(objectSize > 0)
                        for (int count = 0; count < objectSize; count++)
                             IInfoObject obj = (IInfoObject) iObjects.get(count);
                             // Specify the Destination parent Id to move the reports
                             obj.setParentID(44102);
                        oInfoStore.commit(iObjects);
                        System.out.println("Reports Moved Successfully");
                   else
                        System.out.println("Reports Not Available");
             catch (SDKException e) {
                 e.printStackTrace();
                 System.out.println("Error : " + e.getMessage());
    Thanks&Regards
    Damodar
    Edited by: Damodaram B on Nov 2, 2009 1:29 PM

    There's couple of things at issue here - you've not specified the proper interface (IProgramBase or IProgramBaseEx), and the program job server can't find the class in question (a deployment issue).
    You may want to open a support ticket with SAP.
    Sincerely,
    Ted Ueda

  • I need a java class to turn plain text into excel

    I need a class to turn a plain text file into MSExcel.
    Thanks.

    You can write a file in BIFF format. I have some code (not in Java) here.... I will search later.....
    FYI:
    BIFF5 - Microsoft Excel version 5
    BIFF7 - Microsoft Excel 95 (also called Microsoft Excel version 7)
    BIFF8 - Microsoft Excel 97
    You will find some information in Microsoft (argh!!!), or search engines.....

  • Need help using ADF objects directly from a JAVA Class

    Hi Everybody
    I ma new in jdeveloper, what I am doing is an application that does not have visual interface. I created business objects for my tables, then I generated the java classes.
    In a function in my class I created and instance of mytableImpl.java (generated from the busines object mytable.xml), added all the data to it and called doDMLrow(DML_INSERT), doDMLrow is a public function that I created inside mytableImpl.java in order to access the private method doDML. I need to make sure that every record that I insert , delete or update is committed immediately.
    ALso I need to know if there is a guide, example , or documentation that shows how to use this properly.
    Any help is appreciated,
    Cesar A Ortiz

    Cesar,
    you can't just instantiate a entity object (EO), mytableImpl in your case.
    EO should only be used together with the whole framework. So you need an application module, a view object (VO) build from the EO. Then your use case can is pretty simple. You don't have to overwrite any of the generated methods.
    To insert a row into the DB use the VO and create a new row, fill the attributes, insert the row and call commit. If you have more rows to insert (i.e. read the data from a file) you should write a service method at the application module level and let this method do all the work (read the data from file and insert the new rows onto the db, calling commit after each record).
    To call this service method you can use the BC4J tester right inside from JDeveloper.
    All this is documented in the 'Fusion Developer's Guide for Oracle Application Development Framework'
    Timo

  • Need to import my java class. Please help

    Dear all.
    I made a java class named GetOS which contains a method that return th OS name. Then I deployed this class to a Jar file called tarek.jar.
    now I need to import this jar file in my form
    i'm using forms9i release2
    I did the following:
    I copied "tarek.jar" to \\developerhome\forms90\java\
    then I opend the forms builder - program-import java class but my jar file "tarek" doesn't exist in the list.
    please help.

    Dear all
    I solved this problem. I editing the class path of the system control panel>system>advanced and it works fine
    Now i can import my class easly without any problems
    But when the forms builder imported my class , it generates a pl/sql package which contains a function with the same name of the method i did in my class.The problem is I do not know how to call this function
    Function getOSname( obj ora_java.jobject)
    return varchar2 is
    begin
    cls := jni.get

  • Need help with tomcat 5.5 and using java classes

    hey there,
    i am trying to set up tomcat 5.5 on my computer at home and have sucessfully done so. i have been trying to use Java classes inside my JSP files however tomcat thows an internal servlet error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    Product cannot be resolved to a type
    i have the classes located as the setup tutorial recommends (root/WEB-INF/classes/) and still nothing works. i would appreciate any help anyone can give.
    thanks,

    Which tutorial are you following?
    As of java1.4, all classes must be in packages for them to work in Tomcat. This means your beans and servlets too.
    Put your beans in a package, and then recompile them, and put them in the right place.
    eg
    package com.mypackage
    public class MyClass ...
    once compiled would go into WEB-INF/classes/com/mypackage/MyClass.class
    Are you using Product and ProductList classes in scriptlet code?
    Have you imported them with a page directive
    <%@ page import="com.mypackage.Product, com.mypackage.ProductList" %> ?

  • Get the relative path for java class

    How to get Relative path for java class which is inside in web-inf directory in webapps

    ajay.manchu wrote:
    Hi gimbal2,
    My Requirement is i need to run a java class from batch file,when i created batch file in that i need to mention the complete path of the java class,so instead of mentioning that i want to provide only java class name,thats why i asked that one..
    can u help me regarding that....
    Thanks in advanceI wonder how that would work then. Let's take a fictive example. You have a class com.mycompany.myapp.Foo. This would mean that the class is stored in some directory like this:
    c:/webrootdir/myapp/WEB-INF/classes/com/mycompany/myapp/Foo.classTo be able to run such a class from the commandline using Java, you would have to invoke this command:
    java -cp c:/webrootdir/myapp/WEB-INF/classes com.mycompany.myapp.FooHow would knowing the exact path to this class help you?

  • Problem with servicegen and how to convert java classes to webservices

    I am a beginner and am trying to convert all my java code into webservices,I have
    a java class Test.java and number of other third party libraries and my own java
    files that are reffered in Test.java. I want to expose the public methods in Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalid class received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface, non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party class file also?I
    just need the public methods in Test.java exposed and Test.java will just use
    the third party library.
    also,is there a way to tell servicegen to include all these java files X,Y,Z to
    the war file/ear files but expose only the public methods of X in the WSDL.
    Please help
    thanks
    Suresh

    Hi Bruce,
    Thanks very much for the insight u provided.Yes one of my public methods was returning
    a element factory.
    But let me ask my question this way:
    Is there a way to tell servicegen to take only the specified public methods in
    a class to make them as webservices?
    by default servicegen is taking all the public methods..,i workaround i found
    is to deploy the webservice manually by writing the web-services.xml to include
    only the required public methods.
    thanks
    Suresh
    Bruce Stephens <[email protected]> wrote:
    Hi Suresh,
    Does your Test.java have a public method that returns the element
    factory of an XML document, like "public ElementFactory
    getElementFactory ();" or such?
    If so, you may want to check out the supported build-in and non-built-in
    data types:
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1060696
    Concerning your last question, you can use the excludeEJBs, includeEJBs
    (in combination with the ejbJar attribute) to specify which non-built-in
    data type components should be generated. Or if you use the
    javaClassComponents then simply use a comma separated list of class
    names.
    Hope this helps,
    Bruce
    suresh wrote:
    I am a beginner and am trying to convert all my java code into webservices,Ihave
    a java class Test.java and number of other third party libraries andmy own java
    files that are reffered in Test.java. I want to expose the public methodsin Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalidclass received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface,non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party classfile also?I
    just need the public methods in Test.java exposed and Test.java willjust use
    the third party library.
    also,is there a way to tell servicegen to include all these java filesX,Y,Z to
    the war file/ear files but expose only the public methods of X in theWSDL.
    Please help
    thanks
    Suresh

  • OAAM 11g R2: Unable to load java class for custom configurable action

    Need to configure a Configurable Action to get triggered for a particular action at a given checkpoint.
    Steps Followed:
    1. Created a java class implementing com.bharosa.vcrypt.tracker.dynamicactions.intf.DynamicAction, getParameters() and execute() methods were implemented in that java class.
    2. Added necessary jars from $ORACLE_IDM_HOME\oaam\cli\lib to the build classpath.
    3. Compiled and created a jar with it.
    4. Extracted the oracle.oaam.extensions.war file into a working folder.
    5. Added the Custom Jar created in step 3 into <working folder>/WEB-INF/lib/
    6. Changed the following in MANIFEST.MF in <working folder>/META-INF/:
    Specification-Version:11.1.2.0.1
    Implementation-Version:11.1.2.0.1
    7. Rejar-ed the oracle.oaam.extensions.war from the working folder using following command:
    jar -cvfm oracle.oaam.extensions.war <working folder>\META-INF\MANIFEST.MF -C <working folder>/ .
    8. Stopped the oaam_admin_server1, oaam_offline_server1 and oaam_server_server1.
    9. Deleted the oracle.oaam.extensions deployment from the weblogic.
    10. Deployed the newly created oracle.oaam.extensions as a shared library for oaam_admin_server1 and oaam_server_server1.
    11. Started all managed servers.
    But when I tried to create an action template with the java class I just created, it was throwing following error
    +java.lang.ClassNotFoundException: *+
    Unable to load configurable action class *. Ensure the class is made available in the class path.
    Referred following documents:
    1.      http://docs.oracle.com/cd/E27559_01/admin.1112/e27207/cfgactions.htm
    2.     http://docs.oracle.com/cd/E27559_01/dev.1112/e27206/cfg-action.htm
    3.     http://docs.oracle.com/cd/E27559_01/dev.1112/e27206/extend.htm
    Kindly help me. Thanks in advance.
    Edited by: 917717 on Dec 12, 2012 7:16 PM

    This thread is a bit stale but I thought it might help to clarify one point about custom jar files on UCCX.
    To properly load a custom jar:
    Upload it into the classpath directory in the document repository. 
    Select it under System | Custom Classes Configuration
    Finally you need to restart the CCX Engine and the CCX Administration services.  If you have HA you need to restart them on both servers. 
    Other notes:
    When referencing your class in the CCX Editor, use the fully qualified name of the class.  Lots of other classes use things like Element or Document so you need to be explicit. The editor only knows about the 20 native classes by their object names.  If you create a Document object in the editor you are really creating a com.cisco.doc.Document object.  If you loaded jdom.jar and you wanted a jdom document then you need to create an object of type org.jdom.Document.
    When compiling your custom jar files, be sure to compile for the version of Java that the CCX Engine runs.  In general UCCX 7.X and older use Java 1.4.  UCCX 8.X and higher use Java 1.6.  Several of the core Java classes had significant changes between 1.4 and 1.6. If you ran your code on UCCX 7 or earlier and now it fails in UCCX 8.X or higher, recomplile for Java 1.6 and you classes will likely work again.
    Finally, check for security violations in UCCX 8.X or higher.  Cisco has restricted some of the things you can do.  These URL's have more information:
    http://docwiki.cisco.com/wiki/Engine
    http://docwiki.cisco.com/wiki/Troubleshooting_Tips_for_Unified_CCX_8.0
    -Steven
    Please help us make the communities better.  Rate helpful posts!

  • "Java Class not found in classpath" Error in DESIGNER

    Hello All,
    I'm trying to connect in Designer using a JDBC connection to MS SQL Server 2008.  As per the instructions, I updated my jdbc.sbo file with the path to the existing two JAR files.  However, I still get the following error when I try and connect in Designer:  "Java Class not found in classpath : C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc\Drivers\sqlsrv".  Of course, this error includes the drive path with the location to my JAR files.  Any help in resolving this nagging issue is very GREATLY appreciated.  Also, if anyone needs it I can post a copy of the jdbc.sbo file to this thread.
    Thank you,
    Pankaj

    Stratos,
    Your suggestion didn't help.  I tried to connect after restarting my machine and I still get the error.  And, I've also tried adding a connection to MS SQL Server 2005 using this JDBC driver, and that didn't help either.  Any other suggestions?  Would it help to see my "jdbc.sbo" file?  Thanks again for your and everyone else's help, and I look forward to your reply.
    Regards,
    Pankaj

  • How can I either move or view the source of a JAVA CLASS user object?

    I am using Oracle 8i and I have the following JAVA CLASS objects in my database. I need to move some of these objects to a different database.
    1) How can I do this?
    2) How can I view the JAVA source code since these are classes?
    My knowledge of Oracle is limited. I have searched and searched and I can't find the answer. Any help would be greatly appreciated
    SELECT object_name, object_type
    FROM user_objects
    WHERE object_type IN ('JAVA SOURCE', 'JAVA CLASS', 'JAVA RESOURCE')
    ORDER BY object_type, object_name;
    OBJECT_NAME OBJECT_TYPE
    /d082321a_DpsJarStaticFilename JAVA CLASS
    DirHelperStatic JAVA CLASS
    DirHelperStatic$1 JAVA CLASS
    DpsJar JAVA CLASS
    DpsJarException JAVA CLASS
    DpsJarStatic JAVA CLASS
    FilenameFilterImpl JAVA CLASS
    FtpClient JAVA CLASS
    FtpClient$InputStreamProxy JAVA CLASS
    FtpClient$OutputStreamProxy JAVA CLASS
    FtpClientStatic JAVA CLASS
    FtpException JAVA CLASS
    FtpReply JAVA CLASS
    FtpTest JAVA CLASS
    LoadXml JAVA CLASS
    LoadXmlStatic JAVA CLASS
    UrlFileUtils JAVA CLASS
    Utils JAVA CLASS
    dir JAVA CLASS
    Thanks,
    Brian

    The source far java class objects that are not derived from java source objects
    (which is the case here, and is typically the case, such as when one loads
    classes into the database using loadjava on a jar that contains only .class
    files) does not exist in the database (just as it does not exist in a jar which
    contains only .class files). So there is essentially no way to view the source, short of extracting the bytecodes and using some decompiling tool. I don't recall what methodologies exist for extracting bytecodes in 8i. As for transferring
    the classes to another database, the standard Oracle import/export tool can do this.

  • How do I call a simple java class from a bpel process?

    Hi.
    In JDeveloper 10.1.4.3.0 I've created a simple java class that does an ftp get operation followed by an unzip. The class uses some 3rd part libraries (jars).
    I want to use a simple bpel process to schedule a daily execution of this java class, and deploy it all to our SOA-server, - and was looking into using the <bpelx:exec> function.
    The java class and the bpel process is all stored in the same JDeveloper project.
    How do I put this together so that both my java class and the necessary jars are available to the bpel process?
    I've looked into the JavaExecSample.bpel, and it's says something about "...the class com.otn.samples.javaexec.CreditCalculator is locally packaged with this BPEL process".
    How do I do that?
    Can I make it and test it all locally from my workstation (only JDeveloper installed, I guess there's nothing that can execute the bpel code?), or do I have to compile class etc (make war-file?) and deploy to SOA server (BPEL-INF/lib or classes?) before anything can be tested?
    (I guess all this is simple, once you know how, but being a newbie to this I need a shove in the right direction :-)
    Regards,
    -Haakon-

    To create a java class and dependent jars inside the BPEL process project you need to do the following:
    1. Right click on your BPEL process project and select New and then Java Class from the Items.
    2. Make the BPEL process project, JDeveloper would compile the java classes and add them into the BPEL suite case jar, see the output folder and check the BPEL suite case jar file for java classes and dependent jars.
    You can test your Java classes from JDeveloper IDE, no need to deploy the classes on SOA server. When you make the BPEL project it compiles .bpel files and Java classes. You can test your classes once .bpel file and java classes compiled successfully.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • How can I execute a java class with arguments from an air application built from mxml?

    I have an mxml application. It has a button, and when that button select event occurs, I want my mxml air app to pass arguments to a java class I have built, which resides in a package path on my system. I need to be able to pass several arguments to my java method from my mxml call. How do I do this, and what config files are necessary? For the simple task I want to engineer, can you show me an example of a properly configured config file? My java class has been executed at the command line in the past as follows:
    java -cp %CP% com.abc.prism.queue.EmitMessage XYZ "my message text" 192.12.13.14 5672
    where %CP% is an env variable that tells my class the classpath it runs with, and XYZ, "my message text", the IP address, and the port are the arguments I must pass from mxml to my java class. How do I accomplish this?
    How do I make known to the java class I call from mxml the %CP% class path? It tells my java class where to find various rabbitMQ jars.

    Hi,
    You need to use Integration technology like BlazeDS or LCDS.

Maybe you are looking for

  • How do I connect a 2013 Macbook Pro Retina to an Epson Power Lite 61p LCD Projector?

    I am trying to attach an Epson PowerLite 61p LCD Projector to my 2013 Macbook Pro Retina, but I cannot find which type of adapter I need. I would assume whichever adapter is required it must connect via thunderbolt. However, I do not know if the requ

  • Program name zxvau02 are reserved for includes of exit function group

    i am facing a problem during user exit. when i am trying to change the code in function module (va01) in include zxvvau02 an error is occurred 'program name zxvau02 are reserved for includes of exit function group' so i could not edit the include pro

  • TS1347 Problem with Calendar syncing

    I put dates on my I Phone, but they do not appear on my outlook desktop.  If I put a date on my desktop it will appear on my iPhone, what is the problem?

  • Lenovo and DOA

    Hi, I would like to understand why if you have a problem to a brand new laptop after 8-9 days on keyboard (bad assembly) you have to wait 15-20 days to repair it because you do not cover keyboard - memory and hard drive. Another question that I have

  • Update Leopard Installation DVD

    Hi All! I was a Windows User and Administrator for a long time, and with Windows Installation Disks I could update then to some Service Pack. I was wondering if it's possible to do with Leopard Installation DVD, if I could update it to 10.5.5 for exa