Big JAR Problems..........

Hi all, I've just spent the past couple of hours trying to work this one out, I hope you can help me :)
I've written a class called LogParser that I use for parsing log files from a game server, it requires the MM MySQL driver for it's functionality.
I've JARd all of this into LogParser.jar
This includes:
LogParser.class
/org/gjt/mm/mysql/etc/etc......
/meta-inf/MANIFEST.MF
The manifest file has the Main-Class parameter set as LogParser.
The LogParser class works fine from the cmd line, but when I run the jar like so:
P:\logparser>java -jar LogParser log1.log
I get:
Exception in thread "main" java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:55)
This one's confusing the hell out of me, I've read through what seemed to be all the relevant threads here (well, the first 15 pages) and I have observed everything I can think of.
My class compiles and runs fine. The manifest file DOES include the CR at the end. The JAR compiles fine.
I have J2SDK1.4 on my system and I run on Win2kPro SP2.
Any ideas?
Chris

Nope :(
I'm thinking it might be something to do with the MM MySQL driver? I extracted it from it's JAR and put it into mine, can this cause problems?
I'm quite (read: very) new to Java, so I'm not too sure on the precise way resources are "read" into the classpath etc.
Is it possible to embed the original MM MySQL JAR into mine? I could try something like that.
HB

Similar Messages

  • Email and big wifi problems.

    Email and big wifi problems.
    Why does it take 6 minutes to send a photo attachment when my iphone 4 will do it in 30 to 40 seconds ?
    Why will my email account be recognised and log on only half the time?
    Why does the wifi keep dropping out?
    Why does the speed and signal vary when I'm sitting two feet away from by wifi router?
    All settings in my phone have been reset twice as per advice from vodapone

    Thanks very much, jjgraphics. I will grit my teeth and try India once more, as you suggest, and then get in touch with the moderators.
    Karen.

  • Have Operating System 10.6.8, Mail Program 4.6.  How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to m

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

  • Big Eudora problem, small Finder issue-- related?

    I use Eudora for my email, and unfortunately my big Eudora problem is not getting solved in the Eudora message board; after half a day of Eudora quitting unexpectedly and then working fine but just for a few minutes if I restarted my computer, now when I launch Eudora, my Finder crashes-- everything disappears but the background image, and the computer is frozen.
    The reason I'm posting here is that before it reached this stage, there were other weird things that didn't relate to Eudora: I would try to launch Flash, and Flash couldn't open a new blank file. I would try to launch something else, and an error message would say that some component in a Library wasn't found. All of these things are not happening anymore; as far as I know, only Eudora is misbehaving, but one odd feature remains: every finder window is showing, next to the search field in the upper right, a large question mark, and next to that there is a folder icon. If I click on the folder icon, I'm taken to one particular folder in my HD that has no significance to anything that I can tell. If I click on the question mark, I get "the item can not be found." (Hence the question mark, I guess). But what are those doing there in every finder window? Is there supposed to be a folder icon at the middle-top-right of every finder window? I don't remember one there.
    I have done an archive-and-install of OS 10.4.6, but the finder window business is still the same.
    The hardware test CD that came with my PowerBook says all hardware is okay. Disk Warrior finds no problems. Disk Permissions are okay in Disk Utility. I ran Clam Xav, and it found four copies of viruses: three (called Email.Ecard-6) in my In box and in two mailboxes with older In messages, and one (called Email.Phishing.Pay-8) in my Out box. I put all of these files in the trash and restarted my laptop, launched Eudora and the finder crashed. I reinstalled Eudora and the same thing happened, although I had put the infected boxes back in place before reinstalling Eudora.
    I don't know where the problem is.
    Any advice, please?
    Paul

    Ciao Von Stripes,
    I've just found the solution:
    Open - System Preferences, then open - Spotlight
    There is a list of categories.
    Find - Files on the list, then click, drag and drop to the position number 1 and "voilá"
    I hope it works for you too... 

  • Hello, I have a big batterylife problem with my brand new iPod touch 4Gen 8GB white. Please help...

    Hello, I have a big batterylife problem with my brand new iPod touch 4Gen 8GB white. Please help?

    What battery life are you getting?  Is it short when you are using the iPod? When it is sleeping?

  • Big .jar File - need a loading/info screen

    Hi,
    my problem is that my midlet takes too long to run, because the jar file is quite big (1,5mb) and has a lot of txt files (around 6.500).
    Now you might wonder why i have a lot of files in my jar.
    I have a book which is devided into verse. The user search for a particular verse. It takes too long if I have to open a big file and then display a verse, so i made a txt file for each verse which is faster, because the midlet just has to open the little file which contains the verse.
    Because of the amount of txt files it takes some time until my midlet starts.
    I wanted to ask where there is way to at least tell the user that my midlet is going to start, but that it will take a little bit.
    I cannot put this file into the same jar, since loading the jar takes the time.
    Is there a way to make a loading info and then open my jar file, which contains the real midlet?
    My midlet takes around 45 seconds to open( on my mobile phone), and until then there is no sign whether the midlet is going to start or not. If I do not inform the User, he might think that my midlet won't work and he would press other buttons (like the cancel button).

    I think there is no way because :
    - if you put it into your jar, it has to be loaded ...
    - if you put it outside your jar (JSR 75), the class code has to be executed and so your jar has to be loaded
    - everything you will try to execute an application that lauch this one would be weird stuff ...
    - note that it sould work on an emulator, but most phones have a jar size limit that is only a few hundreds ko
    Regards.

  • Big authentication problem: not being redirected to the login page

    Hello, everybody!
    I've just noticed a big problem in the web application I'm developing. In this
    application I'm using the FORM authentication method as you can see below in the
    web.xml file:
      <security-constraint>
         <web-resource-collection>
                <web-resource-name>permitido</web-resource-name>
                <url-pattern>/*</url-pattern>
           </web-resource-collection>
           <user-data-constraint>
                <transport-guarantee>NONE</transport-guarantee>
           </user-data-constraint>
      </security-constraint>
      <security-constraint>
           <web-resource-collection>
                <web-resource-name>restrito</web-resource-name>
                <url-pattern>/confirmacaoreserva.jsp</url-pattern>
                <url-pattern>/confirmacaoreserva.faces</url-pattern>
                <url-pattern>/reservaconfirmada.jsp</url-pattern>
                <url-pattern>/reservaconfirmada.faces</url-pattern>
           </web-resource-collection>
           <auth-constraint>
                <role-name>ADMINISTRADOR</role-name>
                <role-name>USUARIO</role-name>
           </auth-constraint>
           <user-data-constraint>
                <transport-guarantee>NONE</transport-guarantee>
           </user-data-constraint>
      </security-constraint>
      <login-config>
           <auth-method>FORM</auth-method>
           <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
                <form-error-page>/errologin.jsp</form-error-page>
           </form-login-config>
      </login-config>
      <security-role>
           <role-name>ADMINISTRADOR</role-name>
      </security-role>
      <security-role>
           <role-name>USUARIO</role-name>
      </security-role>If I type in the browser's address field any of the protected pages,
    confirmacaoreserva.faces or reservaconfirmada.faces, the web container redirects
    me to the login page as expected, as I was'n authenticated yet. Until till
    this point everything is working without problem. But I noticed, to my surprise,
    that when I click on a link in a web page like this:
    <h:commandLink value="#{msg.reservar}" action="#{materiais.reservarMaterial}">
        <f:setPropertyActionListener target="#{materiais.codigoMaterial}" value="#{material.codigo}" />
    </h:commandLink>
    // in the backing bean
    public String reservarMaterial()
        // some processing...
        return "confirmacaoReserva";
    // in faces-config.xml
    <navigation-rule>
        <navigation-case>
            <from-outcome>confirmacaoReserva</from-outcome>
            <to-view-id>/confirmacaoreserva.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>it completely by-passes the web container authentication and redirects me to the
    protected page (+confirmacaoreserva+) without asking me first to authenticate in
    the login page. Of course this is unacceptable.
    So, how can I solve this? How do I fix this problem?
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    BalusC wrote:
    Which appserver implementation/version are you using?JBoss 4.2.3.GAOK.
    Which JSF implementation/version are you using?The default JSF implementation that comes with JBoss 4.2.3.GAWhich one? Read the manifest file of the JSF implementation JAR.
    Does it work if you redirect instead of forward in the navigation case (just add <redirect />) ?I haven't tested yetAnd?

  • The big iChat problems. Audio/Video (now completely broken in 10.7.3), the "not-authorized" problem

    So, I am running iChat on OS X Lion 10.7.3 on an early-2011 MBP 13'' . These problems have been here for a while, though (I got my comp with 10.7.0). I have AIM/GMail/Yahoo connected..
    One problem is the issue of non-authorized people. There is a list of "not authorized" people that I have to scroll past in my "offline" section of iChat buddies before I actually get to the real offline contacts. Big note here: All these people have the address (something)@aol.com. These contacts have come up as a result of my gmail connection. You see, a few months ago Gmail and AIM did this chat unification process where @aol.com contacts can be just added into Gmail for chatting. These @aol.com copies come up asking for an invite when the REAL AIM address person talks to me. The invites leave once I press decline, but then they stay on my list as not authorized. If I delete these "not-authorized" copies, the invites will come up again and the cycle will repeat. It is a nuisance considering how much of these false contacts are on my list.
    Second problem is video/audio chat in general. This issue really applies on AIM/Yahoo—there is nothing for Gmail because people usually use the web interface which simply doesn't work with iChat video/audio. If the people used Google talk, the issue written below would probably come up.
    See, what happens is that…(now in 10.7.3), video/audio chat is simply broken, simple as that. My contacts always tell me that an error has occurred when trying to accept my video chat invite. It simply doesn't work. They are using AIM desktop in most cases. When it DID used to work (to a very limited extent, I'll say; it was hit or miss earlier pre 10.7.3, now it's just miss), it was just video but NO audio. They could see/hear me, I could only see them. When I did audio chats, they hear me, I..don't hear them (so audio chats were pointless). The only case where this problem doesn't happen is where it's Mac to Mac, iChat to iChat. VERY limited in use of audio/video chat, if you ask me.

    Hi,
    If AIM contacts have been added to your Google Buddy List then I would login to Google and remove them from there  (the iGoogle or GoogleMail web pages will show the Chat option)
    Whilst they are still in the List then the Authorization request will probably be resent (In this case it is probably being generated by the method Google are using to add the AIM names as iChat only sends it once).
    Google/Jabber Video chats is only iChat to iChat and so is Yahoo with iChat 6.
    The Yahoo App streams Video which People can be allowed to see and Audio is added in as an Audio Chat.
    The connection Process is not the same and iChat/AIM
    Jabber and Google use Jingle to Connect (in fact Google's version is not that compatible with other Jabber apps).
    This means iChat to the Standalone PC app  or any Web Browser using the Google Video Plug-in (PC or Mac) or to any Jabber app that is using a Google ID (or a Jabber ID) will not work.
    On the iChat to AIM on a PC.
    This has always been a bit of a hit and miss affair.
    Some people have no trouble but other spend ages trying to set things up and never find the solution.
    This is the Original Users Tip  (up to about AIM5.9)
    A "replacement" for that tip that has not made it across yet.
    I have yet to try Video to the Web Login version that is now on offer.
    However I would limit the Bandwidth in iChat Menu > Preferences > Video Section to 500kbps (possibly try 200kbps for 1-1 chats) as you will not know the interent speed available to the Buddy if they are using the web login.
    Comparisons
    When you compare iChat actual functions to what you would like it to do it can appear to be limited.
    On the basis that you would want your IM app to be able to have Buddies from other services listed in a Buddy list (combined) or Lists which apps do you know of can do that and Video to some of them ?
    Adium and ProteusX can both have Buddies from the major Services ina  Buddy List but don't do Audio or Video.
    Yahoo and MSN both allow the other's Buddies in the list but I am not sure about Video or Audio chats
    They cannot connect to Jabber or AIM buddies even for text chats.
    Jabber does depend on the server you use and whether that does Transports for you to have text chats with other services.
    Instructions for iChat.
    Mercury IM is a JAVA version of MSN and still has not got to Audio and Video
    Similar for aMSN
    Gizmo5 and YakforFree both died...
    Skype is Cross Platform  but is only 1-1 in Video chat.  (cost extra for 3 and 4 way chats)
    Yahoo had dropped support for their Mac version now iChat has the Yahoo option  (you can still download it  - IT being the beta it has been for  years).
    2:40 PM      Saturday; February 11, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Big graphic problem on MacBook Pro

    First, I appologize for my english but i'm french !
    So, I have a very big problem since I have upgrade to Mountain Lion on my MacBook Pro mid-2010 (Core i5 2,4Ghz / 4Go / 320Go) : when the graphics card switch from the Nvdia to the Intel3000, it turn like this :
    So I need to restart. There is no problem when I start with the Intel3000.
    Only append when it switch from the Nvidia to the Intel3000.
    So I use gfxCardStatus to only use the Nvidia but I'm waiting for a fix from Apple with the next update of Mountain Lion.
    Great update ...

    Reply to myself but can help other people : after a "clean install" of Moutain Lion, using a USB key, no more problem, even with gfxCardStatus !
    And big big improvement of system reactivity.

  • CS3/4, Mac OS X, XCode .jar problem

    Hi there,
    I got some problem while trying to launch a .jar file from a SDK plug-in.
    First, I have to start a .jar file to do some work with an open InDesign document.
    I try to do this with:
    system("open /Application/Adobe InDesign CS3/Plug-Ins/myFile.jar");
    but nothing happens - the file doesn't start.
    Then I've tried another location for the file:
    system("open /Application/myFile.jar");
    and it works! so it seems to be a problem for system function to deal the path part: "Adobe InDesign CS3" (the file I try to start is in both folders just for test).
    Have anyone an idea why the name of a folder with spaces cause a problem for system()?
    On the other side I do the same stuff on windows platform and start a .jar file according to a path to InDesign CS3 like this:
    PMString strFolder;
    ...geting the path to InDesign using iCoreFilenameUtils and adding the subfolders - it works fine...
    then:
    TCHAR *path=strFolder.GrabTString();
    ShellExecute(NULL,NULL,TEXT("myExecutable.exe"),NULL,path,SW_SHOWNORMAL);
    It woks fine on the windows but now I have to do the same on Mac OS X.
    My questions are:
    how to convert IDFile (contain the full path to my .jar file) to something accepted from system() function OR
    how to start .jar file other way then with system() getting the path as a PMString or IDFile.
    Some example code or suggestions would be nice.
    Thx in advance
    jarema

    Your trying execute a system command that requires a posix path.
    The path " /Application/Adobe InDesign CS3/Plug-Ins/myFile.jar" should be " /Application/Adobe\ InDesign\ CS3/Plug-Ins/myFile.jar" or " /Application/"Adobe InDesign CS3"/Plug-Ins/myFile.jar"
    You can either search and replace the spaces in the path with "\ " or I believe the FileUtils class in the SDK has some funcs for working with IDFiles and posix paths.
    Mike

  • ORA-01722: invalid number when updating a CMP bean, SP10 WebLogic_RDBMS.jar problem?

    Hi guys
    We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
    We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
    the container tries to update them. They deploy without error though.
    See below for the stack trace
    We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
    runs on w2k, and Oracle on Solaris 7.
    Extract from set-environment:
    SET DB_CLASSPATH=
    SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
    SET
    SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
    .2\db\oracle816\event;
    Extract from weblogic.properties:
    weblogic.jdbc.connectionPool.commercePool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    I made a few experiments, and I noticed that generating the CMP classes
    (with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
    Here is what I mean : ejbc uses the library
    c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
    with SP10. However since that change and after rebuilding our jars, all CMP
    entity beans fail to update.
    If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
    and without changing anything else, our CMP beans work fine. I did not
    change any driver or xml deployment descriptor.
    One of the generated files in the jar (for our bean
    VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
    cause of the problem.
    I jadded that class and here is a difference I notice:
    OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
    (BigDecimal)resultset.getObject(5);
    NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
    = resultset.getBigDecimal(5, 35);
    Similar differences for the SETbigdecimal.
    Dunno if that will help, but I'm attaching the 2 jar files with explicit
    names.
    Damn that was long, I hope someone will read it... Thanks for any help on
    this, see stack trace attached below
    Nicolas Lejeune
    Stack trace:
    mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
    C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
    non-transactional EJB invoke:
    java.rmi.UnexpectedException: Unexpected exception in
    com.b2boost.visibility.VisibilityBean.getVisibilityId():
    java.sql.SQLException: ORA-01722: invalid number
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
    Logic_CMP_RDBMS.java:446)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
    ogic_CMP_RDBMS.java:376)
    at
    weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    at
    com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
    Impl.java:198)
    at
    com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
    stVisibilityRequestPC.java:83)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
    eExecutorImpl.java:193)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
    ipelineExecutorImplEOImpl.java:56)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
    ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
    at
    com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
    .java:170)
    at
    com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
    :102)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
    409)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
    :156)
    at
    com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
    n(B2boostPortalDestinationDeterminer.java:208)
    at
    com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    [Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
    [Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]

    You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
    I notice that you have
    bin/oci815_8
    oracle816
    Thsi looks liek the inconsistency in your environment.
    What you need to do is
    1. find oci817_8 and place that in the PATH.
    2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
    Try this and see if it helps.
    BTW - WLS 5.1 is EOL

  • How to Include only a part of big JAR in my own JAR

    i'm using AXIS soap functionality in my app, but the problem is that my own final jar file is as small as 700 KB and required for it AXIS.JAR takes about 2 MB.
    i'm using only a limited amount of classed from it, but the FACTORY classes loads them dinamically.
    so how can i at build time include only required for me classes, not the whole library?
    thanx!

    You know some classes you need, right? Put those classes into your new jar and put in into your classpath instead of axis.jar. Then run a test program until you get a ClassNotFound exception. Put that class into your new jar. Repeat until you don't get the exception any more.
    But before you start doing that, read the Axis licence carefully to make sure it permits you to do that.

  • Why using big JARs when single components could be distributed

    We are facing a problem with our Java application distribution, since the software house sends us large JARs (around 10Mb) which must be deploy to our branches at around 64Kbauds, taking at least an hour for each one. When we look at the changes, only a few 100Kb where changed (only 10 or 20 Java routines) from one version to the other of the applications.
    Is there any way to avoid this Java JARs and send and deploy only the changes. I know that certain distribution products let you take notice of this differences and package only the delta, but I don't have the knowledge to make our software provider to make him change their mind on the issue. Does anybody know the answer?
    Thanks in advance.

    BEA uses a trick which appears to work for packaging updated class files. If the classes signature (methods, parameters etc) are the same, you can take the new class files which have changed and package them in a new jar file. Then place the new jar on the classpath when starting the application, but make sure it appears before the original applications jar.
    For example say I have app.jar, and normally start it with
    java - classpath ./app.jar my.MainClass.
    If I update the myClass.class file, I would package the class in a jar called new.jar and start the app with
    java -classpath ./new.jar:./app.jar my.MainClass.
    When Javas classloader searches for a class to load, if there are two, it always takes the first one it finds.

  • Resources inside JAR - problem

    I have a strange problem with resources inside JARs.
    I can't load any resource form a JAR file (for example a .property file or .png icon).
    It's not a problem with my progams only. JDBC drivers doesn't work because they cannot find .properties files while they work well when, the driver JAR i uncompressed. It happens every time when some resouces are inside JAR library (classes are loade correctly). The same project runs well on my friend's computer while I've got an error on my computer.
    I tried it on WinXP and Win2003 Server - the same. My java version 1.5.0_06-b05 (but I had the same problem with older versions).
    I figured out that I can find a file inside a JAR, open a stream, load data and everything is OK but data is always 0bytes length. For example using:
    ImageIcon myImageIcon = new ImageIcon(getClass().getResource(pathandfilename));
    I get empty ImageIcons without any error.
    Can anyone help me. Maybe I should find something somwhere in java configuration.
    Message was edited by:
    peper

    But can anyone tell me why my servlet can not access the
    contents inside a jar file?? Any suggestions please?
    Thanks.Without seeing your code, it is likely that you are trying to use file names (like /some/path/yourFileName.ext), not resource names (loadable from the class loader) like /yourFileName.ext.
    Example:
    Instead of:
    FileInputStream stream = new FileInputStream("/some/path/yourFileName.ext");
    do this:
    InputStream stream = getClass().getResourceAsStream("/yourFileName.ext");
    There are other API's which take either a string file name or a URL. You want to go the URL way, where the URL is taken from the classpath as:
    URL url = getClass().getResource("/yourFileName.ext");

  • Broken Ftp Connection and big files problem

    I have a problem with big-files downloading.
    Does anybody know how to resume downloading using FTP-connection?
    Or how can I get bytes from FTP connected file using something like random access to avoid the restart of downloading the file?
    "InputStream" does not support "seek"-like methods.

    From RFC 959
    RESTART (REST)
    The argument field represents the server marker at which
    file transfer is to be restarted. This command does not
    cause file transfer but skips over the file to the specified
    data checkpoint. This command shall be immediately followed
    by the appropriate FTP service command which shall cause
    file transfer to resume.
    You should also be aware of RFC 959 Section 3.4.2 on BLOCK MODE transfers which is what allows FTP to REST a connection and "skip" n-bytes of a file.

Maybe you are looking for

  • Possible bug found in Mac Os X Tiger 10.4.11 in conjuction with iPod Touch

    Dears, I think I've found a possible bug in Mac Os X version 10.4.11 in conjunction with iPod Touch. When the iPod is connected during boot, my Bluetooth hardware fails to be detected. When I restart the portable without the iPod connected, my Blueto

  • Understanding photo stream and Photos

    I have installed Photos and migrated my Aperture library. iCloud Photo Library is turned OFF My Photo Stream is turned ON iCloud Photo Sharing is turned ON I have photos on my iPad and iPhone. These and my desktop machine are all logged into the same

  • InDesign CS4 rotated graphic content offsets

    Has anyone noticed problems with the xy co-ordinates of graphics within picture boxes when they're rotated? I've asked Adobe Support about this, and uploaded a test file for them to look at but not had a meaningful response. Firstly, my page crosshai

  • What is wrong in this java code?

    Can someone please tell me what is wrong in this java code? /* The program is intended to start animating text at the click of a button, pause it at another click and resume at the next click. It should continue like this */ import javax.swing.*; imp

  • Enable exception handling in trigger

    Hello- I am fairly new to Oracle, and have written a simple audit trigger to insert old values into an audit table upon updates to an existing table. I am trying to incorporate some exception handling in case there are errors. Is there a way to 'enab