Jar file importing

Hi,
i have 2 jar file's, in side jar files same package name and same class but method name are different. for example
Test1.jar
Test2.jar
in side jar file package structure is
"dim.in.test"
class name is "GetInformation"
i am importing the this two jar files in my project, importing path and create the instance is perfect.
my problem is
first parity jar file instance method are invoking (Test1.jar file instance methods getting), when I call Test2.jar file methods giving compiletime showing.
but i want to call all methods (Test1.jar and Test2.jar file method�s)
thanks
prasad

You'd have to do some serious playing around with ClassLoaders, and I don't think you're ready for that.
Why do these two jars both have a "different" class with the same name and package?
Did you write both of these?

Similar Messages

  • Jar file import problem with ADF application

    Hi Everyone,
    I am using Jdev 11g with integrated WLS. I have an ADF application and is trying to integrate JasperReport in it. I added the JasperReport JAR file in the project properties -> Libraries and Classpath, and checked it for "export" and "Deployed by Default'. I have my JasperReport codes in my managed bean
    as follows
    +public String cb1_action() {+
    +try {+
    +JasperDesign design = JRXmlLoader.load("C:/JDeveloper/mywork/ReentryApplication/ViewController/public_html/jasper/testReport.jrxml");+
    +JasperReport report = JasperCompileManager.compileReport(design);+
    +....+
    +}+
    +}+
    I am able to compile the managed bean class successfully. However when I run the application, I got a stack of errors like this,
    +[2009-10-08T11:31:59.910-04:00] [DefaultServer] [ERROR] [] [javax.enterprise.resource.webcontainer.jsf.application] [tid: [ACTIVE].ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: test123] [ecid: 0000IGollZuB5EirL4YBUA1AnVop00000L,0] [APP: ReentryApplication] java.lang.RuntimeException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:[[+
    +C:\Documents and Settings\MISSP29\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\testReport_1255015914097_607807.java:4: package net.sf.jasperreports.engine does not exist+
    +import net.sf.jasperreports.engine.*;+
    +....+
    It appears that the JAR file is not picked up at the runtime correctly. I tried a simple Main class with the same codes and JAR file added, it works fine. Does anyone know what I am missing within the ADF application?
    Any helps would be appreciated.
    Thanks,
    John
    Edited by: john wang on Oct 8, 2009 9:24 AM

    Timo,
    Thanks you for your prompt response.
    1. I checked The following folder (I assume this is where it supposes to be). The JAR file is there.
    C:\Documents and Settings\MISSP29\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee\drs\ReentryApplication\ReentryApplication-ViewController-webapp\WEB-INF\lib
    2. I did not do anything about deployment descriptor. Since I run my application within JDev integrated WLS, I did not do anything about deployment setting. Do I need do something with deployment descriptor if I want to import additional JAR files here? With my experience with 10g, to add a JAR file within JDev, all I need to do is to add it through project properties ->libraries.
    3. I agree with your absolute path comment. This is a test of how JasperReport works with ADF application. I will work it out later.
    Thanks,
    -John

  • Importing classes/jar files

    Hi
    im writing a simple mail program but i need to import classes or jar files
    import com.oreilly.servlet.MailMessage;
    is the line i have but i cant find the jar file/class
    when i search for it i only get the description
    where can i find tha actual jar file or package ???

    you must to have the jar file from you want import classes if you don't have this jar you can't do this.
    if you've the jar, you must indicate to your IDE environment where can find this jar file I don't know meybe in the common menu options > Project settings...
    or if you're working with webserver (or stand alone)as Tomcat you need copy jar into /lib folder.

  • Where to find .jar files so I can implement import java.util.logging

    I'm trying to figure out how to take an application built for Websphere and port it to WebLogic. I've come across this blog entry http://blogs.sun.com/fkieviet/entry/using_java.util.logging_in_bea_weblogic and would like to try creating and using the startup class.
    I have not been able to find the correct jar files.
    import weblogic.common.T3ServicesDef;
    import weblogic.common.T3StartupDef;
    import weblogic.logging.LoggingHelper;
    In reading the documentation on using the NonCatalogLogger APIs at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/i18n/writing.html I also see some code calling for the following imports
    import weblogic.jndi.Environment;
    import weblogic.logging.NonCatalogLogger;
    1. Does anyone know where I can grab these?
    2. There must be a strategy for finding these .jars that people use. If so, what is it?

    I thought I understood you, but the more I look at what you've set here, I'll just be honest and admit that the I don't know what you are saying here:
    'You should be able to add the "weblogic.jar" in the WebLogic distribution to your classpath.' - What doe this mean?
    1. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add external JARS and navigate to the weblogic.jar
    2. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add Library and try to go from there?
    3. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add Variable and try to go from there?
    4. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath and do something else?
    5. Something else?
    Also, I don't know what you mean here:
    'You don't need to (and you shouldn't) copy that jar file, just have it in your compilation classpath. It will be present automatically at runtime.'
    Sorry for being so simple here but I've been trouble shooting why I can't follow what look like pretty simple steps to implement over-riding the ApplicationLifecycleListener Class to use existing java.util.logging.Logger code by adding the following to the the weblogic-application.xml:
    <wls:listener>
         <wls:listener-class>com.qualcomm.weblogic.log.listener.UtilLogWrapper</wls:listener-class>
    </wls:listener>
    And including as a referenced jar file, a simple POJO class instance of com.qualcomm.weblogic.log.listener.UtilLogWrapper.
    My resrouces for this are:
    1. http://blogs.sun.com/fkieviet/entry/using_java.util.logging_in_bea_weblogic.
    2. http://www.oracle.com/technology/pub/articles/drolet-ant.html.
    Maybe my weblogic.jar is at the root of the problem.
    I hope you can 'dumb this down' for me with a simple explanation of steps to do what you outlined above.

  • Updating jar files in ALSB 2.6

    How do we update jar files imported in ALSB projects? Once they have references to them it does not seem feasible to replace them with new version?

    I may not have been clear in my initial post. My questions pertains to jar files that provide POJOs for java callouts. Above link discusses updating project jar with a new version. To create new version of project jar, I think i would first need to update the jar that provides POJOs. Please correct me if there is another way to do it.

  • Which jar file required

    Hi
    When i use BAPI calling from JspDyn Page in EP 6.0
    i added sapjco.jar and htmlb.jar files.
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    Getting cannot resolved message error is coming.
    more than this what r the external jars files required to run this.
    can any body tell .
    regards
    Kumar.

    Hi Kumar,
    I would advise you to use the class locator tool in your NWDS, it will do the search and the classpath adding for you. You can download it from <a href="http://sourceforge.net/projects/classlocator">here</a>
    Hope it helps,
    Roy

  • Writing into a jar file through Java program

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

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

  • Attach jar files

    I want to use JDBC in a project and I need to import two jar files.
    import oracle.jdbc.pool.OracleDataSource;
    import oracle.jdbc.*;
    In the help section I can't find out how to attach the location of these two files in my project.
    WBR

    go to project properties->libraries and add the "Oracle JDBC" library to your project.

  • Import JAR files (integrating JasperReports)

    Dear all,
    I'm using JDeveloper 11.1.1.3.0 on Windows 7 32bit.
    I search this forum and I google a lot, but I couldn't find any workable solution.
    I downloaded the newest version of JasperReport and iReport from the official website. I've done some tutorials from this site and everything seems to work fine.
    Now I want to integrate JDev with JasperReports. I create new Fusion Web Application ADF, I get the properties of Model project, Libraries and Classpath tab, add Library and click New... I set the Library name as JasperReports, location as Project, check Deploy ad Default. I add to Class path every JAR files in E:\JasperReports\jasperreports-3.7.6\lib and to Source path the whole directory E:\JasperReports\jasperreports-3.7.6\src. I get sure that the Export is checked and I save all the changes.
    I create a new Java Class JasperTest and I use this sample code:
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.export.*;
    import java.util.*;
    public class JasperTest {
        public static void main(String[] args) {
            String fileName = "test.jasper";
            String outFileName = "test.pdf";
            HashMap hm = new HashMap();
            try {
                // Fill the report using an empty data source
                JasperPrint print = JasperFillManager.fillReport(fileName, hm, new JREmptyDataSource());
                // Create a PDF exporter
                JRExporter exporter = new JRPdfExporter();
                // Configure the exporter (set output file name and print object)
                exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName);
                exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
                // Export the PDF file
                exporter.exportReport();
            } catch (JRException e) {
                e.printStackTrace();
                System.exit(1);
            } catch (Exception e) {
                e.printStackTrace();
                System.exit(1);
    }I cant compile this, it gives me Error(1,1): package net.sf.jasperreports.engine does not exist etc..
    I cant import any class from JasperReports. Did I something wrong with importing the JAR files to my project ? Maybe I should set some system environment variable ? What else I can do ?
    Any help will be appraciated.
    Regards,
    Wojtek.

    Hi,
    I am also facing the same problem, I have few Jasper Reports which are closely integrated with my APEX applications, but for this i am using another application ( Jasper reports) which deployed in tomcat. This application hardly have 20 lines of java code, so i thought of embedding same in PL/SQL itself, But i am facing problem while importing JAR files i.e.
    1. Where to put these JAR files so that i can import them in my PL/SQL.
    2. I also tried using JAVALOAD function, but that also not worked for me.
    Please give me some solution how to go about it??

  • How to create package and import from jar file?

    Hi all,
    I am writing a software and I am not sure how to create a package for the classes.
    Say I have two classes in the same directory as follows:
    testA.java
    ==========
    package AB;
    public class testA
    public static void main(String[] args){
         testB myB = new testB();
         System.out.println("A test");
    testB.java
    ===========
    package AB;
    public class testB
    public testB(){
         System.out.println("B constructor");
    both file compile without the package heading;
    both file compile using: javac -classpath .\ *.java
    Question 1:
    I cannot run testA by: java -classpath .\ testA
    I think it is a syntax error. What is the correct one?
    If I run testA by: java testA
    The only output I get is: A test
    But I am expecting: B constructor /n A test
    What went wrong?
    Question 2:
    I need to use APIs of another software. I have downloaded a .jar file (xxx.jar) with all the classes in it. And I have put "import xxx.*;" in my source file. But the compiler complains about the importing. What is the right way to copmile it?
    I have read a couple of tutorials but they don't answer my question.
    (I am using windows2000 and don't have the classpath variable.)
    Hope some one can help.
    Thanks a lot

    Try moving testA out of the package and importing 'AB.*;'
    If you have:
    ./testA.class
    ./AB/testb.class
    Then to execute testA from ./ type: java -cp . testA

  • How do I import classes in a jar file?

    I have the following directory structure, each directory is a seperate package of the same name as the directory
    RPGUniversal
    RPGMap
    RPGCharacter
    RPGCharacter is not done yet so I am ignoring that package for now.
    RPGCharacter and RPGMap both depends on classes inside the RPGUniversal Package, but are independant of eachother and RPGUniversal is completely independant.
    I want to place each package in it's own .jar file for use as a library in later programs.
    I placed all the compiled classes for RPGUniversal inside the proper directory structure, I then used this command to place it in a jar:
    jar -cf ./RPGUniversal.jar ./RPGUniversal/*
    I then tested the contents with this command:
    exodist@Abydos:/stuff/JProject/test$ jar -tf RPGUniversal.jar
    META-INF/
    META-INF/MANIFEST.MF
    RPGUniversal/ADTs/
    RPGUniversal/ADTs/t1.jpg
    RPGUniversal/ADTs/t2.jpg
    RPGUniversal/ADTs/t3.jpg
    RPGUniversal/ADTs/t4.jpg
    RPGUniversal/ADTs/Coordinates.class
    RPGUniversal/ADTs/RPGImage.class
    RPGUniversal/ADTs/FrameSet.class
    RPGUniversal/ADTs/ImageTester.class
    RPGUniversal/Exceptions/
    RPGUniversal/Interfaces/
    RPGUniversal/Interfaces/RPGCharacter.class
    RPGUniversal/Interfaces/RPGItem.class
    RPGUniversal/Interfaces/RPGObject.class
    RPGUniversal/Interfaces/Trackable.class
    RPGUniversal/Interfaces/Tracker.class
    RPGUniversal/Interfaces/RPGMapComponent.class
    RPGUniversal/Interfaces/RPGMap.class
    so far all good, next I delete the RPGUniversal directory leaving the only file in the current directory RPGUniversal.jar
    next I create the RPGMap directory and give it the proper .java files and directory tree.
    I then run a script to compile every .java file
    for i in `find ./ -name "*.java"`; do javac "$i"; done
    and I get a ton of dependancy errors:
    exodist@Abydos:/stuff/JProject/test$ for i in `find ./ -name "*.java"`; do javac "$i"; done
    ./RPGMap/BaseClasses/StaticMap.java:13: package RPGUniversal.Interfaces does not exist
    import RPGUniversal.Interfaces.*;
    ^
    ./RPGMap/BaseClasses/StaticMap.java:20: cannot resolve symbol
    symbol : class RPGMap
    location: class RPGMap.BaseClasses.StaticMap
    public abstract class StaticMap implements RPGMap
    ^
    ./RPGMap/ComponentClasses/MapTile.java:9: package RPGUniversal.Interfaces does not exist
    import RPGUniversal.Interfaces.*;
    ^
    ./RPGMap/ComponentClasses/MapTile.java:10: package RPGUniversal.ADTs does not exist
    import RPGUniversal.ADTs.*;
    ^
    ./RPGMap/ComponentClasses/MapTile.java:16: cannot resolve symbol
    symbol : class RPGObject
    location: class RPGMap.ComponentClasses.MapTile
    public class MapTile implements RPGObject
    ^
    ./RPGMap/ComponentClasses/MapTile.java:19: cannot resolve symbol
    symbol : class RPGImage
    location: class RPGMap.ComponentClasses.MapTile
    private RPGImage MyImage;
    ^
    ./RPGMap/ComponentClasses/MapTile.java:31: cannot resolve symbol
    symbol : class Coordinates
    location: class RPGMap.ComponentClasses.MapTile
    public boolean CheckForCollision(Coordinates C)
    ....the list goes on........
    how do I tell it to look inside the RPGUniversal.jar file to find the required classes?
    here is a directory tree so you can see how it is set up:
    ls -R1
    RPGMap/
    RPGUniversal.jar
    ./RPGMap:
    BaseClasses/
    ComponentClasses/
    ExternalInterfaces/
    HigherClasses/
    InternalInterfaces/
    ./RPGMap/BaseClasses:
    StaticMap.java
    ./RPGMap/ComponentClasses:
    MapTable.java
    MapTile.java
    TableList.java
    TileSet.java
    ./RPGMap/ExternalInterfaces:
    ./RPGMap/HigherClasses:
    DynamicMap.java
    ./RPGMap/InternalInterfaces:

    The JAR file needs to be in the compliers classpath : javac -classpath "$CLASSPATH:RPGUniversal.jar" "$i"

  • How to import a jar file in JSP

    How to import a Jar file in JSP Page.
    please reply its very urgent!

    Hey I am facing a similar problem:
    I have this jar file lbswebservice.jar that I have to use for my application.
    I added it to the classpath, I copied it in my WEB-INF/lib folder, but when I try to access classes in this package, it doesnt work.
    For example the jar contains the package com.blipsystems.lbs.ws.messages.* ; that contains different classes, like the Campaign class.
    I tried to use this class (just to create an object) in different context (through jsp, or just through java test classes), but it never works, i get the error: com.blipsystems.lbs.ws.messages.Campaign cannot be resolved to a type
    I am a bit desperate here...

  • Adding Libraries & External Library DC - Not able to import JAR Files

    Hi,
    I am trying to import the jar files to development environment.
    The JAR file was added by following the steps mentioned in below blog :
    /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas
    Please find the error log below :
    20100728065650 Info   :connected to deploytool via sdm protocol
    20100728065651 Info   :deploy every archive associated to the buildspace: DP1_MSSTRK19_D
    20100728065651 Info   :getting DC mss/eepro/salarydata from CBS for buildspace: DP1_MSSTRK19_D
    20100728065651 Info   :Following SDAs were added:
    20100728065651 Info   :  201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda
    20100728065651 Info   :archives (201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda) for DC mss/eepro/salarydata were selected
    20100728065652 Info   :Start deployment:
    20100728065652 Info   :The following archives will be deployed (on http://sapdp1ci.zrh.swissre.com:53018)
    20100728065652 Info   :/usr/sap/DP1/SYS/global/TCS/DEPLOYARCHIVES/201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda
    20100728065652 Info   :starting deployment
    20100728065652 Info   :errorhandling rule is switched from OnErrorStop to OnErrorSkipDepending
    20100728065652 Info   :prerequisite errorhandling rule is switched from OnPrerequisiteErrorStop to OnPrerequisiteErrorSkipDepending
    20100728065654 Info   :deployment finished
    20100728065654 Info   :errorhandling rule is reseted
    20100728065654 Info   :prerequisite errorhandling rule is reseted
    20100728065654 Info   :Deploy log:
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: Start file transfer to /usr/sap/DP1/JC30/SDM/program/temp/201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: File transfer of /usr/sap/DP1/JC30/SDM/program/temp/201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda finished for 9 ms. Total file size is 1347307 bytes.
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: The SDM client uses an old SDM client API.
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: -
    Starting deployment -
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: Error handling strategy: OnErrorSkipDepending
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: Prerequisite error handling strategy: OnPrerequisiteErrorSkipDepending
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: Update strategy: UpdateAllVersions
    20100728065654 Info   :Jul 28, 2010 6:56:52 AM  Info: Starting deployment prerequisites:
    20100728065654 Info   :Jul 28, 2010 6:56:53 AM  Info: Loading selected archives...
    20100728065654 Info   :Jul 28, 2010 6:56:53 AM  Info: Loading archive '/usr/sap/DP1/JC30/SDM/program/temp/201007280456510519_sap.com_SAP_MSS_1_sap.com_msseeprosalarydata.sda'
    20100728065654 Info   :Jul 28, 2010 6:56:54 AM  Info: Selected archives successfully loaded.
    20100728065654 Info   :Jul 28, 2010 6:56:54 AM  Error: Unresolved dependencies found for the following SDAs:
    20100728065654 Info   :
    20100728065654 Info   :1.: development component 'mss/eepro/salarydata'/'sap.com'/'DP1_MSSTRK19_D'/'31236'/'0'
    20100728065654 Info   :dependency:
    20100728065654 Info   :       name:     'temp/jxljar1'
    20100728065654 Info   :     vendor:     'swissre.com'
    20100728065654 Info   :
    20100728065654 Info   :There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    20100728065654 Info   :
    20100728065654 Info   :Deployment will be aborted.
    20100728065654 Info   :Jul 28, 2010 6:56:54 AM  Error: No Software Component Archive (SCA) or Software Delivery Archive (SDA) selected. Select at least one.
    20100728065654 Info   :Deployment will be aborted.
    20100728065654 Info   :Jul 28, 2010 6:56:54 AM  Error: Prerequisites were aborted.
    20100728065654 Info   :Jul 28, 2010 6:56:54 AM  Error: Error while creating deployment actions. No Software Component Archive (SCA) or Software Delivery Archive (SDA) selected. Select at least one.
    20100728065654 Info   :Deployment will be aborted.
    20100728065654 Info   :end of log
    20100728065654 Info   :End deployment:
    20100728065654 Info   :
    20100728065654 Info   :Summary of deployment
    20100728065654 Info   :==> deployment finished for mss/eepro/salarydata (28979) with rc=12
    20100728065654 Info   :deployment finished for buildspace: DP1_MSSTRK19_D
    Please let me know how to fix this issue.
    Thanks in advance.
    Thanks and Regards,
    Rashmi

    Rashmi,
    Following observations from the error log:
    a)  DC temp/jxljar1 is External Library DC; if I am not wrong.
    b) Once the J2EE DC is deployed; automatically jxljar1 should also be loaded in server
    Coming to the issue you are facing; plz let us know following points:
    a) Are you trying to transport the content from one landscape to the other i.e. development to QA?
    b) During what operation and in which unit(DTR/CMS/CBS);you are facing the issue?
    Regards,
    Ganga

  • Imported par file to NWDS, jar file missing. Where find par file structure?

    Hi All,
    We want to implement idle session timeout on the portal.  We found a wiki here on the subject.  In order to implement the solution we need to make adjuestments to com.sap.portal.navigation.masthead.par.bak.  When we import this par file to Netweaver Developer Studio, the libraries and jar files are missing.  So obviously it errors then in portal as files are missing.
    So I could add them manually but I don't know what the file structure is on this par file so don't where to add what.  Does anyone know?
    Also when I export the file after manually adding the missing files, will it export all the files or will it behave the same way as the import and leave out the additional files?
    If anyone could help, I'd really appreciate it,
    Kind regards,
    Liz.

    Hi Bala,
    I thought of that just before you responded and it worked!!  Thanks for the response..
    Regards,
    Liz.

  • Importing .jar files

    I have been checking out the forums and I think I am more confused than before. I have a bunch of classes in a .jar file and I want to use them in another app. I haven't changed what my classpath is because it has been so confusing I decided to reinstall the j2sdk. What should I set the classpath too? I have my class and the .jar file that I want to use in C:\Java Stuff\. What import statement do I have to have if the name of my .jar file is MyClasses.jar?
    Thank you!

    What you're saying is that your directory structure is something like this:
    C:\Java Stuff\com\mydomain\myclasses\MyClass.class
    C:\Java Stuff\MyJar.jarIf this is the case, you don't have to extract the files from the jar file into the directory. The jar file contains all the files and Java is able to fetch them directly in the jar file.
    However, to do this, your class path must include the jar file, and not just it's directory.
    So instead of:
    CLASSPATH=c:\j2sdk1.4.0_02\bin;c:\Java Stuff;you must have
    c:\j2sdk1.4.0_02\bin;c:\Java Stuff\MyJar.jar;Hope it helps!

Maybe you are looking for

  • Error while posting Down Payment

    Hi, I got error while posting down payment in F-48. the error was "Special G/L Indicator P is not defined for down payment". Thanks,

  • "USB Device Not Recognized" in Windows XP

    Hello, When i plug my ipod touch into my laptop which has Windows XP, it comes up as USB Device Not Recognized. I have no idea what to do please HELP ME!!!!!!

  • QUICKTIME (Sound) but no video, just coloured lines Flashing about!!!!!

    Hey,after downloading the new v7 i think it is, the quicktime video output has never worked on itunes or as an individual player outside itunes,its realy annoying as i cant watch any videos on itunes i have to use windows media player.On my screen wh

  • How do I watch something that requires adobe flash?

    I'm new to apple. I can't watch things that require Adobe Flash. Is there an app to download so t hat I can see these things?

  • PS Touch not uploading to CC

    My PS Touch files aren't showing up in the creative cloud after I upload them? PS Touch says they are uploaded, gives me a % of storage used but the files are no where to be found when I log in to my CC account from desk top?