Nested jar files

two questions:
1) How can I get access to a nested jar file? That is lets say i have a jar file names "Outer.jar", which includes two jar files. These two inner jar files each have a main method. Example: "Inner1.jar" and "Inner2.jar". How can I run each inner jar file? Is this possible?
That is: "Inner1.jar" works perfectly fine by itself, if it was the only jar file, and it has it's own main method. The same goes for "Inner2.jar". But, How can I put these two into a main jar file, "Outer.jar", and then run each of the two inner jar files?
2) Is it possible to make a jar file that contains two jar files both of which have separate main methods?

It makes a great deal of sense to nest jar files. For example, I'm trying to put together a standalone JavaHelp "document". Wouldn't it be great if my customer could double click on a jar file and have a JavaHelp view open up with the documents inside? This requires bundling a JavaHelp jar, a viewer jar, and the document jar containing the docs and helpset. The only thing the customer needs in a JRE. No fuss, no muss, no messy installation.
Another situation is where I want to bundle up multiple jar files as one to simplify distribution and deployment.
--jon
I've never heard of anyone wanting to do this before
but:
1. I think the only way to do this will be to use a
custom classloader. You could have a runnable class in
your Outer.jar that launches a custom classloader.
This custom classloader will load your classes and you
can call your runnable classes in Inner1.jar and
Inner2.jar using seperate threads. You need a custom
classloader because if you launch you .jar from (for
example) "D:\myJar\Outer.jar" and specify the
classpath (in the JAR manifest file) to (for example)
"lib/Inner1.jar" it won't look at the JAR file entry
"lib/Inner1.jar" it will look in
"D:\myJar\lib\Inner1.jar". You're going to have
problems though because you're basically running 3
programs in 1 JVM. Things like static variables and
security are going to be an issue. Basically unless
there is a very good reason to do this, it sounds like
a bad idea.
2. Yes.

Similar Messages

  • Reading nested jar files

    How to read and display contents of nested jar files
    Let the jar format is something like this.
    Parent.jar
                child11.png
                child12.xml
                child13.jar
                            child21.png
                            child22.xml
                            child23.jar
                 -

    You need to play around with classloaders to do it, and unless you know how to do this, there's little point someone giving you the code to, since you won't be able to debug it

  • Extract nested Jar File

    Okay, I've been looking all day for solutions to this problem and nothing I've found pinpointed the solution, so if anyone would rather point me to another site, that's great.
    I have a .jar installer ( installer.jar ) that contains the installer code and a nested jar file ( program.jar ).
    In my experience, plain text files work great in the "getInputStream() -> FileWriter.write()" method, but my way of handling images requires javax.imageio.ImageIO, and i'm hoping something similar exists for jars.
    ALL+* i want to do is extract that jar file into the current directory, but the ZipEntry.getInputStream() method didn't work, and JarInputStream just confuses me.
    If anyone has links to other topics or source code to point to how a jarfile can be extracted.

    Thanks for the help.
    After looking around and finally noticing the Pack200 package, I have the answer!
    JarFile jf = new JarFile( "outside.jar" );
    JarOutputStream jos = new JarOutputStream( new FileOutputStream( new File( "inside.jar" ) ) );
    Pack200.newUnpacker().unpack( jar.getInputStream( jar.getEntry( "inside.jar" ) ), jos );
    jos.close();This creates a JarOutputStream that will write to the FileOutputStream forever until closed.
    The Pack200 Unpacker takes the inputstream and outputs it to the JarOutputStream.
    When the unpack method returns, the jar file is ready. Close the jar output stream and you have a workable jar!

  • Nested JAR file

    Hi,
    I have two JAR files - db.jar & dbserver.jar. This db.jar is nested inside dbserver.jar. And, I place db.jar file in the Manifest file's Class-Path Attribute as this.
    Manifest-Version: 1.0
    Class-Path: db.jar;
    Main-Class: suncertify.db.server.DataServerService
    When, I run this executable JAR as
    java -jar dbserver.jar
    I get this message, "Failed to load Main-Class manifest attribute from dbserver.jar"
    It not possible for me to have both "Class-Path" & "Main-Class" in my menifest file.
    How to solve this problem, am i making any mistakes?
    Thanx. in Advance,
    Shankar S

    You cannot put a jar inside a jar and expect it to run w/o a custom classloader. Sorry. Besides, your Main-Class attribute is set incorrectly anyway, it needs to be a path like you have but change the dots into forward slashes. This is what the error was trying to tell you.
    -Ron

  • Nested Jars

    I am currently attempting to access a jar file (child.jar) embedded within another jar file (parent.jar). Any jar files being used are all signed with the same signature. When I try execute I get a "ClassNotFoundException". All classes are archived in child.jar. The file child.jar is embedded within parent.jar and parent.jar is signed which creates sParent.jar. I do not know the correct syntax to use two archives in the html file. I am looking into nested jars to avoid multiple security warnings when signing multiple jars (multiple warnings occur even when all jars are signed with the same signature). But signing the parent.jar file, there will only be one security warning. Is accessing nested jar files possible? If not, is there an effective alternative?
    Thanks,
    rjtrues

    No, accessing jars inside jars is not possible. So any alternative would be "effective". Your comment about "the html file" implies that you might be asking about an applet, and I don't know the syntax for that either. But I'm sure documentation for that exists.

  • Nested directories behind webapp containing jar files

    I've seen a couple of posts touching on this, but I have a problem with including versioned jar files in a lib directory behind my codebase directory. When I move the jars from the lib into the base directory and make the appropriate changes in the version.xml and jnlp file, I have no problems. Because I'm getting a can't find resource error, I have a feeling it's the way I'm specifying it in the version.xml file (This is the only thing I haven't found an example for). Upon inspecting of the debug info from the log file, it looks as though it's looking in the right place but I at a loss right now. Anyone have any thoughts? Here is a snippet for my jnlp and version file:
    jnlp
      <resources>
        <j2se version="1.3"/>
        <j2se version="1.2"/>
        <jar href="wsci_console.jar" version="0.5"/>
        <jar href="lib/carrieridl.jar" version="1.0"/>
        <jar href="lib/ejb.jar" version="1.0"/>
        <jar href="lib/jndi.jar" version="1.0"/>version.xlm
      <resource>
        <pattern>
          <name>wsci_console.jar</name>
          <version-id>0.5</version-id>
        </pattern>
        <file>wsci_console.jar</file>
      </resource>
      <resource>
        <pattern>
          <name>lib/carrieridl.jar</name>
          <version-id>1.0</version-id>
        </pattern>
        <file>lib/carrieridl.jar</file>
      </resource>
      <resource>
        <pattern>
          <name>lib/ejb.jar</name>
          <version-id>1.0</version-id>
        </pattern>
        <file>lib/ejb.jar</file>
      </resource>Keep in mind, if I remove the lib/ references in both of these files and place these exact jars up one directory everything works great. Any ideas? Thank you everyone in advance.

    I hate posting replies to my own message but I guess I shouldn't have use the code tokens, here are snippets of my xml again
    jnlp
    <resources>
    <j2se version="1.3"/>
    <j2se version="1.2"/>
    <jar href="wsci_console.jar" version="0.5"/>
    <jar href="lib/carrieridl.jar" version="1.0"/>
    <jar href="lib/ejb.jar" version="1.0"/>
    <jar href="lib/jndi.jar" version="1.0"/>
    version.xml
    <resource>
    <pattern>
    <name>wsci_console.jar</name>
    <version-id>0.5</version-id>
    </pattern>
    <file>wsci_console.jar</file>
    </resource>
    <resource>
    <pattern>
    <name>lib/carrieridl.jar</name>
    <version-id>1.0</version-id>
    </pattern>
    <file>lib/carrieridl.jar</file>
    </resource>
    <resource>
    <pattern>
    <name>lib/ejb.jar</name>
    <version-id>1.0</version-id>
    </pattern>
    <file>lib/ejb.jar</file>
    </resource>

  • Little Mailprogramm works in JBuilder but do not work with a JAR File

    Hallo !
    The application works in JBuilder, but if I make an archive it dont work. If have included "JavaMail" and "JavaBeans Activation Framework". (same as in the JBuilderProject)
    The Error Message is:
    class javax.mail.MessegingException: IOException while sending message; nested exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed;
    at javax.mail.Transport.send0
    at javax.mail.Transport.send
    I have other applications which work on JBuilder an as Jar-File, but why this application not ?
    I have JBuilderProfessional in use.
    Are there some licenceproblems with "JavaBeans Activation Framework".
    Please help me.
    Thank you !
    Wolfgang

    I think I have found a solution here:
    http://forum.java.sun.com/thread.jsp?thread=74127&forum=43&message=519108

  • 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.

  • How to call external jar files in EJB project for CE

    Hi,
    I would be thankful if someone could help me with this -
    I need to call the external jar files into my EJB project - Here is what I have done and am getting runtime exception as  -
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    1. Created a EJB  project" HelloWorld "  using Java perspective in NWDS 7.1 called with client as HelloWorldClient and EAR project as HelloWorldEAR.
    2. Am working on HelloWorld project (1st one).
    3. In my code I am instantiating a class which is a class in one of  the external jar file that I need to refer in my project.
    4. I have set the Java Build path but it works only for the compile time and fails during runtime.
    5. Have read I need to create external library DC and refer in my project "HelloWorld".
    Can anyone help me with exact steps what needs to be done - during creation of external library project and then for my "HelloWorld" EJB project. How would I be able to reference or set the external library project in my EJB project?
    Looking forward to hear from experts.
    Thanks,
    Shiv
    Edited by: Shiv Khullar on Aug 30, 2010 9:39 PM

    Hi Edson,
    I tried it , but it still gives me runtime exception.
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    Steps I performed are -
    1. Created a library project and created 2 Public parts "Compilation" and "Assembly"
    2. Build the library project.
    Now in my EJB project using Project Explorer - set the classpath and added both compilation jar and assembly jar files.
    This is how the classpath entries for external library looks like -
    <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkAssembly/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkAssembly.jar"/>
         <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkCompilation/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkCompilation.jar"/>
    I have also added the jar files I used in my external library project as "User Library" from Java Build Path . I dont do it , then the code fails during compilation itself.
    Regards,
    Shiv

  • Exception while adding External Jar files in NWDS

    Dear Friends,
                            Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.
                          Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
    <provider-descriptor>
         <display-name>
          XML2EDI_Library
        </display-name>
         <component-name>
          XML2EDI_Library
        </component-name>
         <major-version>6</major-version>
         <minor-version>40</minor-version>
         <micro-version>0</micro-version>
         <provider-name>
          dom4j.org
        </provider-name>
         <references>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Document</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.DocumentException</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Element</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.io.SAXReader</reference>
         </references>
         <jars>
              <jar-name>EDI_Module.jar</jar-name>
         </jars>
    </provider-descriptor>
    I have included 4 references because i have imported following in my ejb module.
    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.Element;
    import org.dom4j.io.SAXReader;
    I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:
    1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    Help me in this issue..
    Thanks in advance
    N.Jayanth Kumar

    thanks for you help sidharth.
    i have now jar files in the server and the application  referring to the jar files. everything is deployed fine. however, when i start the application..i get the error -"package jcifs.smb does not exist". the jar i am using is jcifs-1.2.7.jar. in my web module when i expand the jar i see the package and the .class files inside. what am i missing?
    Also, i din't define a SharingReference to usermanagement in portalapp.xml as i am working towards a pure j2ee enterprise application. the web module (DC) referes to the jar files. is there any step similar to defining the sharing reference for the web module DC?
    please help. thanks - sowmiyar

  • Jar file as RMI codebase

    Please tell me I'm missing something:
    I have an RMI server that works fine. All I want to do now is package it in a jar file...Sounded easy enough when I got started.
    According to the RMI tutorial, the value of the codebase property can refer to
    1. The URL of a directory in which the classes are organized in package-named sub-directories.
    OR
    2. The URL of a JAR file in which the classes are organized in package-named directories.
    OR
    3. A space-delimited string containing multiple instances of JAR files and/or directories that meet the criteria above.
    Setting the codebase property on the commend line like this:
    -Djava.rmi.server.codebase=file:/my_dir/my_jar_file.jar
    gives an UnmarshalException with a nested ClassNotFoundException indicating that my Stub file is missing.
    However, if I unpack the jar to the directory my_dir/classes and use
    -Djava.rmi.server.codebase=file:/my_dir/classes/
    then everything works fine... so I know there are no files missing from the jar file
    Any ideas?
    Thanks in advance,
    Matt.

    jquattro, thanks for the reply. Only problem is that I'm adding to a pre-existing jar file rather than creating a new one, so I don't want to change it other than adding the extra classes.
    I found that it worked fine on a Windows box, so I tried a different jdk on unix, and found that it works fine if I use the jdk1.3 RMI registry - so it appears it might have been a bug in jdk1.2 on Unix.

  • Accessing classes in nested JAR

    Jar tutorial http://java.sun.com/docs/books/tutorial/jar says :
    <quote>
    To load classes in JAR files within a
    JAR file into the class path, you must write
    custom code to load those classes.
    </quote>
    Then, what could be the standard or simplest procedure for
    accessing/instantiating classes archived in a Jar nested in
    another Jar from within application code?

    I think I have found a 'moderate' solution. Wouldyou
    see reply 6 of:
    http://forum.java.sun.com/thread.jspa?tstart=0&forumID
    =22&threadID=416726&trange=100The last reply on this points to another post where
    reply 4 has some code posted.
    http://forum.java.sun.com/thread.jspa?tstart=0&forumID
    =22&threadID=405160&trange=100Thanks.
    I think the reply 4 above has culminated in :
    http://one-jar.sourceforge.net/

  • How to store ZIP & JAR files.

    I am succeeded in storing & then sending big files as an attachment except for ZIP & JAR files.Can anyone guide me what's the problem with ZIP & JAR files

    Hi sachin !!
    I m facing problem in big size attachments ..
    it always give me exception
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: 552 Message size exceeds fixed maximum message size
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at MailTest.postMail(MailTest.java:82)
    at MailTest.main(MailTest.java:19)
    Can u tell me how to set the size for large attachments ?
    File size upto 1 mb work fine , but file with 2mb size gives me problem ..
    Plz reply me Fast , waiting :)
    thanx
    Regards
    Khurram

  • Specifying the version of dependent jar file?

    Hi all
    At the moment I am fighting with some class loading issues in a J2EE Appcontainer... Acutally the app server uses a different version of a jar file than my application.. Now the classloader always uses
    the already loaded classes of the AppServers jar Version instead of those that I want..
    I have my application together with the dependent jar packaged together into one jar file... In the manifest I lsit the dependency...
    Now my question is if its possible to explicitly state the version of the package that my jar is dependent of...
    Any help would be appreciated
    regards
    tom

    Vijay
    Acutally I just read through the thread. Actually what I am working on is an J2EE App Containing a couple of EJB (2.0) components in different jars, some utility jars and 2 Wars. All this is packaged together into an ear.
    Now Actually the basic structure is like:
    Ear
    --> WAR1
    --> webinf containing classes and manifest with dependent jars
    --> War2
    --> EJB Jar
    --> metinf containing deployment desc and manifest where the manifest references JDom-b10.jar on the classpath
    --> Also conatiner JDom-b10.jar
    Acutally the JDom.jar is already loaded by the Application Server (Jboss 3.2.3) in its bootstrap loader... I need to have the b10 as otherwise some other 3rd Party stuff of the Ejb is not running...
    Now I expected the classloader to prefer the direct deployment unit against all parents and delegating loader... but it doesnt:
    15:17:04,011 INFO [STDOUT]
    org.jdom.Document(1bb8ea).ClassLoader=org.jboss.system.server.NoAnnotationURLClassLoader@e3b895
    ..org.jboss.system.server.NoAnnotationURLClassLoader@e3b895
    ..sun.misc.Launcher$AppClassLoader@e80a59
    ....file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/bin/
    ....file:/C:/Entwicklungstools/abaXX/components36/lib/3rdparty/oracle9iR2.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/lib/tools.jar
    ....file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/bin/run.jar
    ..sun.misc.Launcher$ExtClassLoader@1ff5ea7
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/dnsns.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/ldapsec.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/localedata.jar
    ....file:/C:/Entwicklungstools/j2sdk_1.4.2_03/jre/lib/ext/sunjce_provider.jar
    ++++CodeSource: (file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/lib/jdom.jar <no certificates>)
    Implemented Interfaces:
    ++interface java.io.Serializable(f62373)
    ++++ClassLoader: null
    ++++Null CodeSource
    ++interface java.lang.Cloneable(13e8d89)
    ++++ClassLoader: null
    ++++Null CodeSource
    This above is a small JBoss utility acutally printing out the watched URLs of the CL and the Codesource of a class... .. Now actually the classloader shouldn't use the Jdom.jar mentioned as source but the one listed here:
    15:16:24,308 INFO [EJBDeployer] nested deployment: file:/C:/Entwicklungstools/jboss-3.2.3_tomcat-4.1.24/server/tebs/tmp/deploy/tmp27652tebs-0.1-SNAPSHOT.e
    ar-contents/tebs-migration-0.1-SNAPSHOT.jar-contents/jdom-b10.jar
    Actually I think the problem is pretty close to the thread you mentioned before... AFAIK the classloaders in J2EE Containers have to prefer the direct deployment unit (in this case the jar and its content) to any other parent class loaders files... I also thought that there can be mulitple versions of a class file in one VM an that the appserver has to preserve every app from using a class of another app... So that there is some housing principles....
    As I could not figure out how to solve this I came to the question regarding versioning... As both JDom.jars contain version information this would solve my probem... But as you already mentioned AFAIK there is only support to give some verision informationen about a jar in the manifest but nothing mentions that you can explicitely request a specific version.
    So If anyone has a clou how I get that crapp working I would be very thankful
    Tom

  • JAR file updating project config file error. Help needed!

    Hi all,
    I got a problem when I want to use an existed jar file. There is a method called setConfig which can read and update the properties inside a property file which will be located inside the deployed jar file. But when the other project want to use this jar file. It causes the following error:
    Property 'configfile' threw exception; nested exception is java.lang.IllegalArgumentException: URI is not hierarchical
    The code might cause this error is like:
    String temp = configfile.substring(CLASSPATH_IND.length()).trim();
    URL url = BaseConfigureFactory.class.getClassLoader().getResource(temp);
    try {
    tempcfg = (new File(url.toURI())).getAbsolutePath();
    } catch(URISyntaxException use) {
    throw new IllegalArgumentException(use);
    It seems like the url is wrong so that the program can not find the configfile. Does anyone give some suggestions? Thanks

    I have all of e.printStackTrack( ) in my try - catch block. But i also think the blank screen appears because the class can not find my resources. Maybe it's my fault, because i create by hand a folder name "res" in project folder, then put all my resource in this folder. And in Eclipse when i try to get these resource, i wrote something like this:
         Image robot1N, robot1E, robot1S, robot1W;
         private void initResources() {               
              try {               
                   String sb = "car1";
                   robot1N = ImageIO.read(new File("res\\img\\unit\\" + sb +"_N.png"));
                   robot1E = ImageIO.read(new File("res\\img\\unit\\" + sb +"_E.png"));
                   robot1S = ImageIO.read(new File("res\\img\\unit\\" + sb +"_S.png"));
                   robot1W = ImageIO.read(new File("res\\img\\unit\\" + sb +"_W.png"));
              catch(Exception e) {
                   e.printStackTrace();
         }Maybe the string of path to resource is right in Eclipse but wrong in Window?

Maybe you are looking for

  • Connecting iphone to comcast

    I can't seem to connect my iphone to comcast to get my Outlook email.  I've enter the Server several times and it say's it can't verify the exchange server. Is this because Comcast is not an Exchange server. Thanks

  • Downloaded safari 5.0.3 to my Windows 7 64 bit operating system. Now screen shows all money amounts in Euros instead of US dollars. How to correct?

    I downloaded Safari browser 5.0.3 to my Windows 7 operating system (64 bit) on a desktop computer and now when I look at webpages that show money amounts (dollars and cents) they are all written in Euros instead of american currency. How to correct?

  • Safari & firefox photo upload hang

    Hopefully someone can point me in the right direction.  On my home computer which is running the most recent upgrade of Leopard and browser software, we recently noticed that when trying to upload photos via Facebook that both Safari and Firefox 'han

  • Synchronizing does not generate a preview window

    When I synchronize a site, the preview window no longer appears. I don't think any changes were made to site settings, etc... This is just something that suddenly started happening a few days ago. No changes were made to the system except the additio

  • Zero with joiner character in Unicode

    Hello, In Non-Unicode system we were using zero with joiner (200D) character whereas in Unicode system we're not finding the exact alternative for this character. We tried to use CL_ABAP_CHAR_UTILITIES=>CR_LF and CL_ABAP_CHAR_UTILITIES=>NEWLINE but i