Traversing the Java Jar file

Hi,
This might sound like a weird question, but I need to traverse the Java Jar file and create respective Java objects into objects in some other language using reflection.
Is it possible to find the path for the class files located in any jar file? Does Java supports traversing or reading and finding jar contents?
Thanks

I found a way to traverse the Jar, using java.util.zip, one can create a zip file for the given jar file and using ZipEntry it is possible to findout the properties associated with the jar/zip entries.

Similar Messages

  • The Java JAR file "minecraft.jar" could not be launched.

    I just downloaded a new version of this game called Minecraft and it says: The Java JAR file "minecraft.jara" could not be launched. Check the console for possible error messages. I have checked the Console and it says: 
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] Failed to load Main-Class manifest attribute from
    15/10/2011 23:11:08 [0x0-0x1d01d].com.apple.JarLauncher[191] /Users/sabi1110/Desktop/minecraft.jar/minecraft.jar
    Help?

    How to Diagnose Jar File Problems
    Open Applications > Utilities > Terminal.app, and then type in the following:
    java -version
    java -jar <drag the minecraft.jar file here>
    Then press Enter. Copy and paste whatever error message appears.

  • Use Mac OS X version 10.7.5, I am keep getting this error "The Java JAR file "plexus-interpolation-1.4.jar" could not be launched.  Please advise

    I think this may have to do with Maven 3.0.4 being incompatible with Java 1.6.  But I don't know for sure.  Please help!

    Look in The Utilities folder inside the Applications folder for:
    Java Preferences.app
    Launch that and it will tell you the state of your Java. If you do not have Java Installed, it will offer to get it for you.

  • Trying to access the java script files via jar file in WEB SERVER

    hi all,
    I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
    in jsp the code goes like this...
         <script type="text/javascript"  archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
    But i am not able to access the js file which is put in jar file present in the  webserver.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
    Regards,
    Hardik

  • What are the basic .jar files to be set in web dynpro project classpath

    Hi,
    I am having a problem while customizing the ESS. I used DTR, DC and imported configuration. After that, I created project from one of the DC(say ess/jp/addr). Later when I open an iView from any Web Dynpro component, I am getting lot of errors without even making any modifications.
    I closed the project and reopened it and reload & rebuilt, but it doesn't solved my problem. In my classpath settings I couldn't find any jar files except the jre_lib. Could you please let me know what are the basic jar files we have to set in classpath and where to get them from. We are using NWDS 7.0.06 version.
    Can you please let me know how to solve this or any other way to work around this.
    It's an urgent to be fixed as early as possible, plz help me out.
    Thanks & Regards,
    Raj

    Hi Julien,
    Thanks for your reply.
    We imported the the specified SCAs in our track.
    we are getting the following errors.
    Kind Status Priority Description Resource In Folder Location
    Error The import com.sap.xss.per cannot be resolved CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 18
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument fpm of the method loadConfiguration CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 113
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument currentPerspective of the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument perspective of the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    we manually set below .jar files in classpath settings.
    pcuixssfpm.jar
    pcuixssutils.jar
    logging.jar
    essper.jar
    Is there any alternative to work around.
    Thanks & Regards,
    Raj

  • (261705413) Q RPCC-7 Does the client.jar file tie you Weblogic Server?

    Q<RPCC-7> BEA is providing client-side helpers in the client.jar file, including
    parsing and SOAP facilities, etc. But, are we saying that there is nothing
    in there that ties the client to the server-side WLS implemenation? It seems
    that putting the interface of the underlying implementation EJB SLS bean is a
    coupling...??? It also seems that by coupling the client to WebLogic classes
    (weblogic.soap.WebServiceProxy|SoapMethod) we are coupling it to WLS.
    A<RPCC-7>: I understand your concerns, but you are not tied to WLS that tightly.
    Certainly, the static client code utilizes the EJB interface that underlies the
    web service but it is possible to invoke the web service dynamically. The use
    of weblogic library classes to invoke the web service just indicates the use of
    weblogic's client API. This client API can also be used to invoked webservices
    hosted on other application server or frameworks. Additionally, other client APIs
    can be used to invoke this web service, for instance the VB client example that
    ended Thursday's presentation. Lastly, the remote interface in the client.jar
    file could actually just be a java presentation generated from a WSDL file that
    represents a C# web service (this is actually only possible in WLS7.0 and not
    6.1 but the point is you do not actually know the inderlying framework or implementation
    andnor should you care).
    Adam

    check the server log;
    /app/oracle/product/fwm11g/user_projects/domains/fwm_domain/servers/AdminServer/logs/AdminServer.log
    you can launch the console and see if it is running; http://<server>:<port>/console

  • No EJBs found in the ejb-jar file

    Hello all, we are thinking about migrating from JBoss to WebLogic server, so as a proof of concept I am trying to migrate a JBoss Seam web application to WebLogic server.
    I have followed all the instructions here: http://docs.jboss.org/seam/2.0.2.SP1/reference/en-US/html/weblogic.html and I have set up ebvryhting that is needed in order to start the server (JMS queues, datasources, etc) but when the server starts and tries to load the web application I got the following error message
    <29 ═Ύί 2010 4:34:51 ΉΉ EET> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'myapplication-ear' due to error weblogic.application.ModuleException: Exception preparing module
    : EJBModule(MyApplication.jar)
    [EJB:011023]An error occurred while reading the deployment descriptor. The error was:
    No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
    he @Stateless, @Stateful or @MessageDriven EJB annotation...
    weblogic.application.ModuleException: Exception preparing module: EJBModule(MyApplication.jar)
    [EJB:011023]An error occurred while reading the deployment descriptor. The error was:
    No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with t
    he @Stateless, @Stateful or @MessageDriven EJB annotation..
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
    Truncated. see log file for complete stacktrace
    Caused By: java.io.IOException: No EJBs found in the ejb-jar file 'MyApplication.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at l
    east one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:219)
    at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
    at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    Truncated. see log file for complete stacktrace
    The MyApplication.jar is where we keep all the models and we are using an exploded folder for the ear file. We have declared all the classes to be entities by using the @Entity and @Table annotations and we have also defined an interceptor in the ejb-jar.xml file (shown below).
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
    version="3.0">
    <interceptors>
    <interceptor>
    <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
    </interceptor>
    </interceptors>
    <assembly-descriptor>
    <interceptor-binding>
    <ejb-name>*</ejb-name>
    <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
    </interceptor-binding>
    </assembly-descriptor>
    </ejb-jar>
    I have tried to compile everythign from scratch by using weblogic.appc but I am getting the same error: No EJBs found in the ejb-jar file 'ejbModule'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    Any ideas what is going on and how I can resolve the issue?
    Regards
    Panos
    Edited by: 816483 on 29 Νοε 2010 6:53 πμ

    Hi John,
    I am working on development an enterprise application using EJB 3.0 on Weblogic 10.
    While developing, I am keeping all my classes (from ejb's as well as web) into APP-INF/classes directory. It is working fine for Web and ejb 2.0 packages, but ejb 3.0 packages, I get the following error when I keep my ejb 3.0 beans classes in APP-INF/classes directory.
    No EJBs found in the ejb-jar file 'customer'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    One solution is to keep the classes under customer ejb directory, but I wan tto keep all the classes in APP-INF/classes directory so that when using Eclipse IDE I can output all compiled sources into APP-INF/classes directory.
    Has anyone faced this situation? Any suggestions to fix this issue?

  • File Access with unsigned Applet through editing the java.policy file

    I'am starting to lose my hair on this...
    I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of the applet.
    first of all, if i wrote in the java.policy file
    grant {
      permission java.security.AllPermission; 
    };everything is working perfekt.
    But I have not the intention to open the gates for any applet out there, so i want to limit the access to my applet. With every of the following versions I get at best an
    java.security.AccessControlException: access denied (java.io.FilePermission...
    My Setup
    My Java Version: jre1.6.0_02
    My applet is located unter the url
    http://admin.mydomain.com/applet.jar
    In Html i tryed the following different versions of loading the applet - none worked
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet codebase="http://admin.mydomain.com" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet name="shortcut" code="start.class" archive="http://admin.mydomain.com/applet.jar" width="0" height="0"></applet>in java.policy i tryed following versions with every html applet load version
    grant codeBase "http://admin.x-press.de/-" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/+" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/applet.jar" {
      permission java.security.AllPermission; 
    };why is it with
    grant {
      permission java.security.AllPermission; 
    };working, and not with the other versions?
    i am almost bold now, please try to save my last hair from falling down.
    any suggestion would be nice
    thanks, feyyaz
    Message was edited by:
    feyyazdogu

    I read the mentioned documentation and your right, some of my versions were wrong, but after reading the doumentation again i came to following result which should had worked but didn't.
    java.policy
    grant codeBase "http://admin.mydomain.com/*" {
      permission java.security.AllPermission;
    HTML File
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" height="0" width="0"></applet>if I am entering http://admin.mydomain.com/applet.jar i can download the jar, so the archive lays in the correct directory.
    what i am doing wrong? do i have to change an additional file somewhere else?

  • Howto execute java jar file via html ?

    hi
    howto execute java jar file via html ?
    could someone pls post a html code ?
    kind regards
    upiter77

    hi
    howto execute java jar file via html ?You can't.
    could someone pls post a html code ?No. you can search for yourself and find the code you need.
    Now, it sounds to me like you're trying to build an Applet or do Web Start or something. In any event, you need...wait for it....Google! :-)

  • Why will my java.jar file not open

    Why will my java.jar file not open

    This is the iPod touch forum. Do you have a question concerning an iPod touch? The iPod touch does not run Java.
    If you have a new Mac you have to download the Java program to run Java on a Mac. It no longer comes with the iOS.

  • How to javadoc the src.jar file.....

    Hi all,
    How can I javadoc the src.jar file ( the one containing all the java files ) without incurring in a OutOfMemoryError? My computer runs win98 with 128MB ram and roughly 4GB hard-disk.
    Your help will be much appreciated!
    Luka

    Hi all,
    How can I javadoc the src.jar file ( the one
    containing all the java files ) without incurring in a
    OutOfMemoryError? My computer runs win98 with 128MB
    ram and roughly 4GB hard-disk.
    Your help will be much appreciated!
    LukaTake a look at this link to see why this probably isn't a good idea:
    http://java.sun.com/j2se/javadoc/faq/index.html#memory

  • Help with running java .jar file

    Hi I just installed java with
    # pacman -S jre
    and when i try to run
    java -jar file.jar
    it says command not found. so what do i need to install to be able to run java .jar files through the CLI?

    do, what vintendo says. because it cant find the java in the default paths.

  • Opening a java jar file through a labview program

    Hello,
    I need to open a java jar file in labview........this jar file is a GUI with multiple frames and has buttons on each frame help navigate through between frames....i just require the program to open it and close it based on some signals so then i won't have to do it manually

    LabVIEW doesn't have any control over what happens in a system exec, as you give the control to the system. You can, however, check the process list through .NET commands and kill the process (You should be able to stop it through "taskkill /F /im java.exe"). Not the prettiest solution, but should work.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Opening a file (hst), executes the main jar file to open the hst file HELP

    Greetings,
    I have created a file with an extension *.hst, so in my Win XP computer, when I double click a .hst file, it should be opened in my program, which is a jar file, so during the installation I associate my program to this .hst file extension.
    After all this, when I double click this .hst file, it shows an error message that the jar file is not a vaid win32 application. I donot wish to convert my file to an .exe. Help ?
    Cheers,
    Raj

    How did you specify command line for your .hst file?
    It should be something like "java -classpath
    [youfile.jar] [youclass] %1"I have not specified command line for the .hst file.
    The .hst file is just a file that is created when my main program (jar file) saves its files., later If I double click this saved hst file, it should be opened in the main jar program.
    For the double click to work, I have created a constructor
    public hst(String hstfile)
       //code to set the file contents in the window.
    }the problem is that when I double click it says that the main jar file is not a valid win32 application, so what do I do ?
    Cheers,
    Raj

  • Installation hangs on 'createing java jar files' section

    Hi,
    On installtion of JRE 1.4, on a new Win98 installation, the installation hangs at the point, "Creating java JAR files". Any ideas on the reason for this hanging
    Regards.

    I had this same problem under Windos XP. Solved when I turned off my Norton Antivirus. It went away, and installation completed

Maybe you are looking for

  • How do I use the CASE statement  in the where clause?

    Hello Everyone, I have 2 queries that do what I need to do but I am trying to learn how to use the CASE statement. I have tried to combine these 2 into one query using a case statement but don't get the results I need. Could use some help on how to u

  • Training and Event Management Integration with FICO

    How Training & Event Management is integrated with FICO? How it will be integrated and where? Could you please put it in simple way?

  • XML reports show in XML format instead of Defult output PDF in R12

    I am facing a problem in XML report in oracle R12 , when I am running the report ,it through warning msg and output is coming in XML format instead of PDF . Please let me know the solution. Zulqarnain

  • Webutil config issue

    Hi all, OAS 10.1.2 When i run forms from client to server specifying config=webutil in the URL,nothing happens.Only a message "applet started" comes at the left bottom of teh client browser . It is only with webutil. When i run with my own created co

  • IP Profile - is it stuck/restricting my download s...

    After my recent extremely slow DL speed issues and intervention by the moderators, my BT Total Broadband now appears much better. However, my IP line profile appears now to be stuck at 2000, even though I am syncing at over 3000. Note: My previous IS