Making excecutable jar file which contains folder

hi,
I have a strange (at least for me it is) problem. I made an excecutable *.jar file of one of my projects. The problem is, that it only works if the *.jar file is in the same folder as my project.
my project uses subfolders. i noticed, that if i deleted everything, leavin only the *.jar file and the folders, then it works.
so my question is: how can i tell my java programm to look for the folders inside the jar file?
yes, i did put all folders inside the jar file and yes i used relative paths within my programm.
thanx
Usul

for example:
  analysePoints.addImage(new File("Candidates", "A.png"));
  analysePoints.addImage(new File("Candidates", "Circle.png"));
  analysePoints.addImage(new File("Candidates", "Cross.png"));
  analysePoints.addImage(new File("Candidates", "Heart.png"));
  analysePoints.addImage(new File("Candidates", "TriangleN.png"));
  analysePoints.addImage(new File("Candidates", "TriangleSW.png"));or
   while( helpInt < pathsToImagesVT.size() )
     File currentImagePath = (File)pathsToImagesVT.elementAt(helpInt);
     Image currentImage = null;
    try{
      currentImage = getToolkit().createImage(currentImagePath.getCanonicalPath());
      MediaTracker helpMT = new MediaTracker(this);
      helpMT.addImage(currentImage,0);
      helpMT.waitForAll();
     } catch(InterruptedException e) {System.out.println(e.toString());}
       catch(IOException f){System.out.println(f.toString());}

Similar Messages

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

  • Can't find jar file which contains com.sap.portal.directory - Constants

    Hi,
    I am not able to find a jar-file which contains the Constants class of com.sap.portal.directory.
    Does anybody know where to find it?
    Thank you in advance.
    Kind regards, Patrick.

    Hi,
    Refer this link
    Using JAR Class Finder
    in the server u can find the jar files required for the application....
    C:usrsapJ2EJC00j2eeclusterserver0appssap.comirjservlet_jspirj
    ootWEB-INFportal
    Regards,
    Senthil K.

  • Find jar file which contains wanted class

    I have too many jar and zip files under my classpath. How could I know which jar or zip file contains the class file I wanted?
    Thanks.

    Maybe this tool will be of interest to you:
    Java Tip 105: Mastering the classpath with JWhich - Identify which class will be loaded in your classpath
    http://www.javaworld.com/javaworld/javatips/jw-javatip105.html?
    Jesper

  • How to execute a jar file which has an applet, without using a html file ?

    I have a jar file which contains a set of class files. iam able to execute the jar file by using this html code
    <html>
    <applet code="file.class" archive="file.jar" width="500" height="300">
    <param name="name" value="value">
    </applet>
    </html>
    I want to know how to execute this class file without using the html tags.
    pls help me out in this.
    Anki

    Hi,
    You can make an executable jar file such that when you double click on that it starts running. Just follow the steps.
    1. Open a notepad and write the following
    Main-Class: XXXXXXXX
    XXXXXXX means Your Main Class name. Don't forget to press Enter after you write your class name.
    2. Save the file as Mani.mf
    3. In the commant prompt ( your directory ) type following lines.
    jar cmf Mani.mf Demo.jar *.*
    4. This will make a jar file which is executable jar file
    Hope this will help you.
    Deepak

  • To include a JAR file that contains enterprise beans in a WAR module

    1)I'm studying java ee tutorial in 6 but I do not understand what he means by "To include a JAR file that contains enterprise beans in a WAR module, add the JAR to the WEB-INF/lib directory of the WAR module" at this link:
    http://docs.oracle.com/javaee/6/tutorial/doc/gipio.html
    how do I create a file. jar to hold the enterprice beans in netbeans?
    2)
    as regards the case study prensete always in the tutorial "dukes-forest" I do not understand how it is structured, I think that the "dukes-store" is a web application (web module. war) to which are added other projects "entities "etc. .. is that correct? if it is right how do I create the project "entities" in netbeans? how do I add it to the project "dukes-store"?
    link at case study del tutorial:
    http://docs.oracle.com/javaee/6/tutorial/doc/glnpw.html

    Hi,
    I have also tried putting the actual jar file in my
    jar file that I created, that didn't work either.
    I didn't try extracting the contents of the jar file
    into mine because the directory structure would
    conflict my dir structure in the jar file (manifest
    file that is)Out of curiosity are you trying to use executable jar files? If so you might want to put the classpath in the manifest using Class-Path: blah.jar etc. Be remember that this resolves to the disk filesystem not the internals of the jar that is being executed. In other words - the blah.jar file resides in the same directoy on the disk as your executable jar.
    If you could clearly describe what you are trying to achive and how it is structured I am sure we could give you more pointers.
    TTFN

  • HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS

    Hai Frnds,
    i Attend an interview they asked this questions can u know the answeres . tell me .
    In File to file scenario how can we reprocess records which failed records.
    HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
    Thanks in advance
    thahir

    Hi,
    Refer these links:
    this might help you
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
    validating against schema file for the output XML file
    Informing the sender about bad records
    Regards,
    Nithiyanandam

  • How to read a line from a file which contains 45000 characters?

    Hi all,
         Iam a receiving a .CSV file which contains n number of rows ,each row has a data seperated with delimiter.
    These values based on delimiter it is seperated and certain validations are handled.
    Iam using UTL_FILE.GET_LINE operator to read the value and store it in a variable which is declared as l_text VARCHAR2(30000).
    when we receive a line which contains huge characters say 45000 then it throws an error(Unable to read the file).
    Only on rare cases we used to receive these kind of files with huge size.
    Kindly help to solve this issues.
    Database details.
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Hereby i have tried with long Raw data type but still same error unable to read the file.pls find the sample code below,
    declare
    l_text             LONG RAW;
    l_importTypeFile   UTL_FILE.FILE_TYPE ;
    begin
         PKG_COMMON.PROC_FOPEN(g_Directory, P_FILENAME,    'RB',l_importTypeFile,    p_error_cd, p_error_msg) ;
    UTL_FILE.GET_RAW(l_ImportTypeFile,l_Text);
    End;
    Thanks in Advance
    Siva

    Hi Siva,
    Are you trying to use data from this .csv file into your realtion tables. If yes and If you are using 11g Oracle database. I would suggest you create External Tables using the below query,
    http://www.oracle.com/technetwork/issue-archive/2011/11-mar/o21nanda-312277.html
    STEP1: You need a Directory where your SCHEMA has read/write access. Store the csv file in that directory.
    STEP2: Create an EXTERNAL Table script. Please refer the above URL. Examples are for coma delimiter (,); replace it with your pipe (|) in the code
    STEP: Once your external table is created you can simply create a relational table as below:
    CREATE  TABLE relation_table
      AS
    SELECT * FROM external_table;
    Regards,
    RaviR

  • JAR file which needs other JAR files

    Hi,
    I try to run a jar file, which imports some external classes. These classes are in the library "reader.jar", which is added to the classpath. But if I start it with ...
         D:\TestProject>java -cp ./reader.jar -jar viewer.jar
    ... I get an error: java.lang.NoClassDefFoundError: de/readers/TestReader
    If I copy the file "reader.jar" to "... j2sdk1.4.2/jre/lib/ext", I can start
    "viewer.jar" successfull with ...
         D:\TestProject>java -jar viewer.jar
    Why can't I add "reader.jar" to the classpath or why is it not used by Java?

    When you run JAR's, you can not use the classpath defined at the command prompt (well, you can use it, it is just ignored). The JAR has its own class path defined in its manifest file. Add:
    CLASS-PATH: reader.jar
    to the manifest file of the viewer.jar and it should work.

  • Where is the .jar file that contain this package oracle.security.idm

    Dear Everybody
    Could you tell me where is the .jar file that contain this package
    oracle.security.idm
    Thanks for your help

    Hi,
    check jdeveloper_home\jdeveloper_10133_<version>\jlib\identitystore.jar
    Frank

  • Required the details of jar files which is loaded in the database

    Hi
    We are having a 10g database which is running under Solaris machine. There are lot of .jar files which are loaded into the database. I would like to know how to find those .jar file details atlease the name of the files which are loaded in the database. Is there any view for this.
    I couldnt find anything from the Java option in TOAD
    Please provide a solution.
    Thanks
    SHIYAS M

    From 11g onwards, you have
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> desc javajar$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    PATH VARCHAR2(4000)
    CONTENTS BLOB
    SQL> desc javajarobjects$
    Name Null? Type
    JARNAME NOT NULL VARCHAR2(30)
    OWNER# NOT NULL NUMBER
    OBJNAME NOT NULL VARCHAR2(40)
    NAMESPACE NOT NULL NUMBER

  • I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?

    How to know character's encoding is ASCII?

  • How can I extract jar entry which is folder and it's contents

    Hi
    How can I extract jar entry which is folder and its contents to another folder.
    I'm pretty sure I've tried almost everything.
    Thanks in advance.
    Edited by: MuSaKa on Sep 11, 2008 3:17 AM

    like this ?

  • Jars files inside atglib folder

    HI Guys
    I am creating ear file in atg by using ant script ,inside ear file i found atglib files with some jar files different files
    from where it is picking those jar files inside atglib folder
    please give me clear picture on this

    HI David,
    Will it follow config path layering while build the ear file ?
    or do we need to provide explicitly each module to build?
    in my application i didnot find some ootb modules in build script but inside ear file those modules jar files are i am able to see
    how  it is possible ? is it because of config path layering?

  • Unable to run jar file without lib folder containing swing-layout-1.0.jar

    I have done my project through NetBeans 5.0. Eventhough I have copied my lib foloder containing swing-layout-1.0.jar inside my project.jar, I am still unable to run my project.jar in other systems, it is creating an error as Could not find the main class. Program will exit. But if I copy the lib foloder containing swing-layout-1.0.jar in the same path as the project.jar, then my project.jar is running.
    But I want to give only the project.jar for other users and not also lib foloder containing swing-layout-1.0.jar each time.
    Could someone please help me with this.

    When you develop GUI applications using the Netbeans you may endup using netbeans specific jar files in your auto generated code.
    And when you build jar files with netbeans it copy the third party jar files used in a application in to a lib folder in the same directory as the jar file of your project. And then set a class path entry to those jar files in your project jar file's manifest file.
    So if you want to redistribute the package you have to redistribute your jar file and every thing in the lib folder in with the same directory structure.
    If you want to change the structure you will have to change the class path to suit the new structure.

Maybe you are looking for

  • BI Pub report bursting based on parameters set in interactive dashboard

    Hi, Could someone help me in creating and bursting reports as per the following requirement: 1. there is interactive dashboard with html multi select parameter that has display values department, location, employee job code. user can select one or mo

  • Cannot log anyone onto one computer due to personal certificate error

    I have a client who just deployed Lync with Office 365. On one user's computer, no one can log into Lync. If she goes to any other computer, she can log in fine. If another user tries on her computer, they get the same error. It's the error about a p

  • Order by AND rownum in a function?

    I have a table with articles sorted by an id. In the table is also a date field to tell when the article is written. I want a query that returns the 20 latest articles, and this is what i have come up with: SELECT * FROM ( SELECT articleid,writtendat

  • Lock Screen Group Policy - Error code 0X80070002

    Hi I'm trying to update the workstation policy (2008R2) to show a new Lock Screen for our users. I have two policies: -Windows 7 Workstation Policy -Windows 8.1 Workstation Policy It was no problem for our Windows 7 machines. Windows 8.1 however woul

  • How to install eportal in ipad

    Hi there, anybody knows on how to install and  configure  eportal on my ipad,  and it should be the same  functionality like internet explorer on my computer?