Strip classes actually  used in a jar file to create a smaller jar file?

I am creating a applet using java3d and the jar files add up to over 4meg ( j3dcore.jar j3dutils.jar vecmath.jar). Is there a way you can strip out only the classes your applet uses and create a smaller jar file so that the download isn't as big? Currently takes a long while for the applet to start because it downloads the Java 3D library in its entirety.

Most likely those classes that you use also use other classes that you don't use ...

Similar Messages

  • Which function module or class is used to import UNICODE files

    Hello all,
    Does anyone know which function module or global class is used to import files when the UNICODE check for the FILE port is ON?
    Thanks
    Ed Baker

    Hi,
    According to your requirement, you can prepare report through S_PH0_48000513 - Ad Hoc Query , you can get percentage from IT0007 in Ad Hoc query. first decide how many fields you want and then choose in selection criteria and generate the report.
    Thanks,
    Nirali P.

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • Running a plain java class in command prompt which uses third party jars

    i have to run a simple java class. its actually a process which is running in the background. Now to run this java file i have created a batch file. my problem is that this java file uses around 100 jar files. when i try to run this java file (actually .class file) it gives me no class defination found error for this java(class) file. What can be the problem. My java home is set....how to solve this problem

    i have to run a simple java class
    my problem is that this java file uses around 100 jar filesThese two statements are contradictory.
    it gives me no class defination found error for this java(class) file. What can be the problemThe class is not on the classpath.
    how to solve this problemEnsure all classes are on the classpath.
    I bet if your searched this forum (or even read the java tutorial) you'd find something .

  • Problem in Creating a jar file using java.util.jar and deploying in jboss 4

    Dear Techies,
    I am facing this peculiar problem. I am creating a jar file programmatically using java.util.jar api. The jar file is created but Jboss AS is unable to deploy this jar file. I have also tested that my created jar file contains the same files. When I create a jar file from the command using jar -cvf command, Jboss is able to deploy. I am sending the code , please review it and let me know the problem. I badly require your help. I am unable to proceeed in this regard. Please help me.
    package com.rrs.corona.solutionsacceleratorstudio.solutionadapter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.jar.JarEntry;
    import java.util.jar.JarOutputStream;
    import java.util.jar.Manifest;
    import com.rrs.corona.solutionsacceleratorstudio.SASConstants;
    * @author Piku Mishra
    public class JarCreation
         * File object
         File file;
         * JarOutputStream object to create a jar file
         JarOutputStream jarOutput ;
         * File of the generated jar file
         String jarFileName = "rrs.jar";
         *To create a Manifest.mf file
         Manifest manifest = null;
         //Attributes atr = null;
         * Default Constructor to specify the path and
         * name of the jar file
         * @param destnPath of type String denoting the path of the generated jar file
         public JarCreation(String destnPath)
         {//This constructor initializes the destination path and file name of the jar file
              try
                   manifest = new Manifest();
                   jarOutput = new JarOutputStream(new FileOutputStream(destnPath+"/"+jarFileName),manifest);
              catch(Exception e)
                   e.printStackTrace();
         public JarCreation()
         * This method is used to obtain the list of files present in a
         * directory
         * @param path of type String specifying the path of directory containing the files
         * @return the list of files from a particular directory
         public File[] getFiles(String path)
         {//This method is used to obtain the list of files in a directory
              try
                   file = new File(path);
              catch(Exception e)
                   e.printStackTrace();
              return file.listFiles();
         * This method is used to create a jar file from a directory
         * @param path of type String specifying the directory to make jar
         public void createJar(String path)
         {//This method is used to create a jar file from
              // a directory. If the directory contains several nested directory
              //it will work.
              try
                   byte[] buff = new byte[2048];
                   File[] fileList = getFiles(path);
                   for(int i=0;i<fileList.length;i++)
                        if(fileList.isDirectory())
                             createJar(fileList[i].getAbsolutePath());//Recusive method to get the files
                        else
                             FileInputStream fin = new FileInputStream(fileList[i]);
                             String temp = fileList[i].getAbsolutePath();
                             String subTemp = temp.substring(temp.indexOf("bin")+4,temp.length());
    //                         System.out.println( subTemp+":"+fin.getChannel().size());
                             jarOutput.putNextEntry(new JarEntry(subTemp));
                             int len ;
                             while((len=fin.read(buff))>0)
                                  jarOutput.write(buff,0,len);
                             fin.close();
              catch( Exception e )
                   e.printStackTrace();
         * Method used to close the object for JarOutputStream
         public void close()
         {//This method is used to close the
              //JarOutputStream
              try
                   jarOutput.flush();
                   jarOutput.close();
              catch(Exception e)
                   e.printStackTrace();
         public static void main( String[] args )
              JarCreation jarCreate = new JarCreation("destnation path where jar file will be created /");
              jarCreate.createJar("put your source directory");
              jarCreate.close();

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Java.lang.SecurityException using a simple jar file

    I created my small application using JDev 11.
    Running from JDev it works well.
    I created a simple jar file including all my classes and all libraries I used.
    Whe I try to run that jar file I get :
    java.lang.SecurityException: no manifiest section for signature file entry javax/mail/internet/AsciiOutputStream.classI didn't find any solution.
    I worked hardly with JDev 10g but I never had such problem.
    Tks
    Tullio
    Edited by: tullio0106 on Nov 25, 2008 2:22 PM

    I simply created a project containing some classes whish use java mail.
    Then I modified the project creating, in the deployment wizard, a "Dependency Analysis" filegroup adding all my classes as well as libraries.
    I uncheck the "Include Manifest" chek otherwise I would run into different problems (well documented in the forum).
    The jar file is created but when I run the application I get the Security error.
    If I remove java mail libraries (activation and java mail)from the list of used libraries and I add it to classpath it works fine.
    I suspect the problem could be in Manifes merging.
    Tks
    Tullio

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • How to use javap with jar files ?

    how to use javap with jar files ?
    thanks

    As long as the jar is on the class path, your gold. So,
    javap -classpath myjar.jar mypackage.MyClass
    Chuck

  • When to use CLASSPATH for .jar files

    I find I must put newly added .jar files in my classpath in order to avoid "does not exist" errors when I compile. Where should .jar files be placed in order to avoid hardcoding this in my classpath?

    Actually. With this .jar file (ksoap-midp.jar) which I downloaded, I can't resolve the imports even when I put the .jar in my classpath. What are the steps to take to add new classes to your system?

  • Deploying java class that uses oraclexmlsql.jar

    Hi,
    I'm trying to deploy a java class that I wrote. It simply gets some data out of my oracle database as xml using the oraclexmlsql package. It works fine when I compile it within JDeveloper.
    When I try to deploy it JDeveloper gives out the following error:
    Errors in xmlquerydb:
    ORA-29521: refferenced name oracle/xml/sql/query/OracleXMLQuery could not be found
    loadjava: 1 errors
    I can't figure out why that happens. I have used other classes and deployed them as Java stored Procedure and they work fine.
    Thanks for help
    Andre

    I tried to load the oraclexmlsql.jar into the shema where I put my class. The classes from this jar were loaded but can not be compiled( apart from 3 ). I also tried loading my class into sys but I still can't compile it or the oraclexmlsql.jar classes.
    Is the xsu12.jar a collection of all the classes that are allready in Sys after the database install?
    I have noticed that on expanding the oraclexmlsql.jar file has a strange format and two classes classes are in the directory from which I expanded the jar. These two classes do not get a synonym on loading into the db. Could that have anything to do with it?
    Thanks for more help
    Andre

  • Question about using third party jar files in Java Web Start Environment

    Hi everybody, I got a very strange problem and still can't figer out how to solve it. Can anyone help to overcome this problem?? Thanks in advance.
    Question: I wrote a simple java swing application to connect to Oracle database. I packed whole my classes and a third party jar file(classes12.jar) to a new jar file named "IRMASSvrMgntGUI.jar" and then use command 'jarsigner' to signed IRMASSvrMgntGUI.jar. There is no problem when I execute 'java -jar IRMASSvrMgntGUI.jar' in the command line. But when I execute this application via Web Start Environment, an "java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
    " error occured with the following detail log shown in Jave Web Start Console:
    =============================================================
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
         at DBConnection.getNewConnection(DBConnection.java:25)
         at IRMASSvrMgntGUI.actionPerformed(IRMASSvrMgntGUI.java:524)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    ==========================================================================
    contents of the manifest file I used to create this jar file are as follows
    ===================================
    Manifest-Version: 1.0
    Main-Class: IRMASSvrMgntGUI
    Class-Path: classes12.jar
    Created-By: 0.9a (itoh)
    ===================================
    and file structures in "IRMASSvrMgntGUI.jar" is
    ====================================
    META-INF/
    classes12.jar
    DBAuthenticateDialog.class
    DBConnection.class
    IRMASSvrMgntGUI.class
    ====================================

    If you directly include classes12.jar in IRMASSvrMgntGUI.jar, the classloader won't be able to find the classes inside classes12.jar. You should sign classes12.jar separately and include that in jnlp along with your application specific jar. When you're launching your app using "java -jar somefile.jar" then the classpath settings in manifest file are used, but that's not the case when you start using JWS since in this case the classpath is based only on the " <jar href=..." entries in jnlp.

  • Help:how to use java.util.jar to zip or unzip a binary file.

    how to use java.util.jar to zip or unzip a binary file or a file contain native code.

    It may help you to know how I add JARs
    1. I open my Project (myProject)
    2. I Mount the JAR to the FileSystem (like mypackages.jar = which includes com.mus.de.myClass.java)
    3. I Mount the File to the FileSystem (like c:\..myfiles..\myProject)
    3.1 I add the File to my Project
    4. I select File | New -> Classes | Main
    4.1 I typed "import com.mus.de.myClass.java" to refer to this package.
    4.2 I called some of the public methods
    thats it
    Andreas

  • Using an External Jar file

    I was hoping my intro programming class would be easy, as I've done some C++ before, but go figure, it's not.
    Although the language/concepts aren't to difficult to learn, it seems compiling programs is. For one program, I'm giving an external .jar file to use. I'm using crimson editor and I do have it setup with the jdk1.6.0. It compiles all my other programs besides this one (command line doesn't work either).
    Essentially, I've created a project, I have an instantiable class, and an application class. I can call the instantiable class in the app class and creating/modifying objects works just fine. Then I have a .jar file added to the project that came from the class (supposed to be used for I/O, don't know why we can't just use the standard java classes, but oh well). anyways, when I try to call the methods in the .jar file I get the following error:
    ---------- Capture Output ----------
    "C:\Program Files\Java\jdk1.6.0\bin\javac.exe" file.javafile.java:6: cannot find symbol
    symbol : variable externalJar
    location: class file
              int value = externalJar.getIntInput();
              ^
    After doing some searching, I found that it might be due to the classpath. So I set the classpath to the directory.. no go. Then I set the classpath to the externalJar.jar file and I get the follow error:
    ---------- Capture Output ----------
    "C:\Program Files\Java\jdk1.6.0\bin\javac.exe" -classpath C:\folder\externalJar.jar file.javaerror: error reading C:\folder\externalJar.jar; error in opening zip file
    I'm at a loss. It works when I use Eclipse and I can just add the external jar file, but I don't want to use eclipse, it's slow and bulky. Any other solutions to this problem? Thanks.
    E-Rod
    *names were changed for a reason.. i already know i'm not misspelling anything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The error about not being able to find the variable externalJar has nothing
    to do with the classpath. It's just that your code in file.java refers to this variable,
    but you have not declared it anywhere.
    Variables within a class, the names of classes and the names of .jar files
    which contain packages have nothing whatsoever to do with one another.
    If you are using a variable externalJar intending it to reference your external jar
    file in some way, then your file.java code is seriously wrong.
    (Also, classes and their associated source files should begin with an
    uppercase letter.)
    Regarding your attempt to specify the classpath when you invoke the
    compiler (always a good idea), I think you should also include the current
    directory (if that is where file.java is). Like this:"C:\Program Files\Java\jdk1.6.0\bin\javac.exe" -classpath C:\folder\externalJar.jar;. file.javaThe "error opening zip file" thing is odd. Make sure you are
    able to read it (permissions OK, no other process has it locked). And that
    it's not corrupt (Did you create it? If so, rebuild it. If not, aquire another copy.)
    Sorry for the generalities and guesswork, but without seeing any code and
    without knowing your directory structure or the contents of this externalJar.jar
    it's hard to do any more.

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • Using 3rd party jar file in WCEM3.0

    Hi,
    I want to get data from an external database into WCEM. Is it possible to use MySQL connector jar for achieving this?
    I used the MySQL connector jar but my guess is, it does not get deployed to the server. It is just visible in my local development.
    When I try to connect to the database I get an error saying "could not find a suitable JDBC driver".
    I need some guidance.
    Regards,

    Hi Steffen,
    As per your suggestion I was able to ping the database manually, but when I try to access it from my code which runs on the server I am getting the exception that I have stated below.
    But if I want to connect to the database dynamically, what then? I am using the MySQL connector jar file for this purpose but on deploying the code to the server I get the error as "Could not find a suitable driver".
    I think the jar file is not getting deployed to the server. Are there any steps that I would have to follow to deploy it?

Maybe you are looking for

  • SORT_AREA_SIZE+Oracle dedicated servers

    Hi Friends, I am using Oracle 10g server release 2,Today i have gone through the Orcale docs,its written there that "Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle

  • Special GL not found in OBYR

    in F-44, we use special gl indicator K, but in OBYR, i can't find this special GL indicator, how can I find this vendor special GL Kin configuration, like reconcil account.

  • AirPort Base Station disk username and password not working

    I got a new AirPort Base Station the other day and everything worked fine until I started to set up the networked disk. On my mac it works fine, it just pops up when I connect to the network ( woot for macs ). On my windows it asks for the username a

  • Service entry sheet printout

    Dear Expert, is there is anyway to print the service entry sheet please i want an answer ASAP

  • Who will update control file when renaming a redolog file

    Hi when we rename a redolog file in mount state of database using the following command ALTER DATABASE RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo' TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo'; how the new location and new name