Deploying applications w. Jar files

I'm experiencing extreme difficulties trying to deploy my application using a jar. I use a file and an image in my app, so I want to include them in the Jar file and I want my app to use the files from the jar.
So my question is: how do I do this? And is it possible to do it in such a way that I can (test)run my app without having to create a jar file each time I want to test s.thing.
I found a lot of suggestions on the internet but after hours of fruitless hacking and slashing I ask you for an example that does the trick, and REALLY does the trick... I'm quite desperate :(
BTW: I use eclipse 2.0
Thank you very much in advance!

True, it often is someone's own fault, but after many tries one fails to see his own errors. But your answer does not help me. For example: if I use:
File f = new File("map.map");
FileInputStream fIn = new FileInputStream(f);
ObjectInputStream objIn = new ObjectInputStream(fIn);
while in an IDE I can succesfully run my app. But if I make a jar (which holds the map.map file) and try to execute the same code, I get the error:
java.io.FileNotFoundException: map.map (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at Display.PlayField.<init>(PlayField.java:27)
at Display.PlayField.main(PlayField.java:51)
See, that's my problem :(
Greets

Similar Messages

  • IO Error while deploying application client jar file ???????

    Hi,
    In my .ear file, one application-client jar(which contains all helper classes which are used in whole application) file is there. While deploying .ear file, all ejb are getting deployed well, while deploying application client jar file(Global.jar file here) it is giving the following message:
    IO Error deploying Global.jar: D:\oracle9ias\oc4j_extended\j2ee\home\applications\trainiumear\Global.jar
    Here is application-client.xml of Global.jar file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application-client_1_2.dtd'>
    <application-client>
    <display-name>TrainiumClientApp</display-name>
    <description>Application description</description>
    </application-client>
    My Environment: Oracle9iAS (9.0.3.0.0), Windows-NT
    Please let me know Why i am getting 'IO Error' , where i may done wrong ?
    Thanks in Advance
    Srinivas

    Srinivas,
    Before we continue, PLEASE tell me if you've looked through the available
    documentation, code samples, "how-to" documents, etc., for OC4J. It
    seems to me that you're mixing things up a bit. I use the "deploy"
    command to deploy my EARs, example (partial):
    java -jar admin.jar ormi://<host> admin <password> -deploy ...
    And my EAR file is not in the "application-deployments" directory
    when I issue that command.
    Perhaps you could also show me the contents of your "application.xml"
    file for this application you are having trouble with.
    But I repeat, please tell me if you have already looked at the
    available documents regarding OC4J!
    Thanks,
    Avi.

  • How do I deploy an external JAR file

    Hello,
    How do I deploy an external JAR file?
    I am grateful for every hint.

    Hi Manuel,
      If you read my blog mentioned in the beginning of the thread, you will note that such solution is not supported in our engine due to number of reasons.
      Please, read the blog and use application library shared among these two applications. You will achieve the same effect. Please note that the using application will need run and deploy-time dependencies to the shared library.
      You should not add files to any of the folders manually or manipulate engine's classpath in such situations.
    Best Regards,
    Georgi

  • Please help: Example how to peploy application from jar file step by step

    Please help: Example how to peploy application from jar file step by step.
    All help appreciated
    Mike

    Thanks I will try these links
    Mike
    "Slava Imeshev" <[email protected]> wrote:
    Hi Mike,
    These links could be useful:
    http://e-docs.bea.com/wls/docs61////adminguide/appman.html
    http://e-docs.bea.com/wls/docs61////quickstart/quick_start.html
    http://e-docs.bea.com/wls/docs61//////ConsoleHelp/application.html
    http://e-docs.bea.com/wls/docs61///programming/environment.html
    Regards,
    Slava Imeshev
    "Mike" <[email protected]> wrote in message
    news:3ca0e94c$[email protected]..
    Please help: Example how to peploy application from jar file step bystep.
    All help appreciated
    Mike

  • How to install a Application in *.jar file format?

    How to install a Application in *.jar file format?
    I have taken the *.jar file into the device into media folder. but device is not recognizing the file format
    could some one plz provide some suggestion to proceed with this?
    Thanks
    Mohamed Javeed

    I'm having the same problem.  I've put .jar into the 'system' folder but that doesn't seem to make the program work neverless see it on my device.  Help.

  • Deployed Application Missing JSP files

    I have deployed an web appliclation Using JDeveloper 10.1.3.3 to a remote Oracle AS When I look at the Deployed Application on the Server I only see the Servlet, the JSP files are missing. I looked at the .ear and .war files and the have all the components in them but the JSPs seem to be missiong from the server. I did not get any error messages from the deployment log
    ---- Deployment started. ---- Mar 13, 2012 2:19:32 PM
    Target platform is Oracle Application Server 10g 10.1.2 (Windows) (bantest).
    Wrote WAR file to C:\jdev\jdev\mywork\NJTransit\NJTransit\deploy\njtransit.war
    Wrote EAR file to C:\jdev\jdev\mywork\NJTransit\Deployment\deploy\NJTransit.ear
    Invoking DCM servlet client...
    C:\jdev\jdk\jre\bin\javaw.exe -Djava.protocol.handler.pkgs=HTTPClient -jar C:\jdev\jdev\lib\oc4j_remote_deploy.jar http://207.200.160.20:18100/Oc4jDcmServletAPI/ ias_admin **** redeploy D:\oracle\FRHome_1 C:\jdev\jdev\mywork\NJTransit\Deployment\deploy\NJTransit.ear NJTransit
    Initializing log
    Servlet interface for OC4J DCM commands
    Command timeout defined at 600 seconds
    Executing DCM command...
    Executing command redeploy D:\oracle\FRHome_1 C:\jdev\jdev\mywork\NJTransit\Deployment\deploy\NJTransit.ear NJTransit UNDEFINEDCommand = REDEPLOY
    Reading application's ear file
    Ear file was successfully read
    Opening connection to Oc4jDcmServlet
    Setting userName to ias_admin
    Sending command to DCM servlet
    HTTP response code = 200, HTTP response msg = OK
    Command was successfully sent to Oc4jDcmServlet
    Receiving session id from servlet to check command status
    Session id = 5e8e9abcf2b84b9639667c4ea36dccf4a8199cf3785755d564948b1e8d096849
    Please, wait for command to finish...
    Checking command status...
    Setting userName to ias_admin
    Setting Cookie to JSESSIONID=5e8e9abcf2b84b9639667c4ea36dccf4a8199cf3785755d564948b1e8d096849
    Checking command status
    HTTP response code = 200, HTTP response msg = OK
    Command has finished
    Receiving command exit value
    Receiving command output
    **** No output was received from command
    Closing connection to Oc4jDcmServlet
    DCM command completed successfully.
    Output:
    Exit status of DCM servlet client: 0
    Elapsed time for deployment: 13 seconds
    ---- Deployment finished. ---- Mar 13, 2012 2:19:45 PM
    The only odd thing I can see is that UNDEFINED statment in the log.
    I followed the recipe for Deployment from the tutorial so I don't understand why the JSPs are missing.

    I have two version's of JDeveloper running on my machine when you pointed out to me that I was using 10.1.3.0 I downloaded 10.1.3.5 and used it instead. However we still have a problem. One our test and production machine we are running Oracle AS 10.1.2 with Java SDK 1.4. Now the documantation says that this supports JSP runtime 2.0 and Servlet Runtime 2.4. My problem is I still have to get this working for Oracle AS 10.1.2 with Java SDK 1.4. Here's what happens when I deployed to that environment.
    500 Internal Server Error
    java.lang.NullPointerException
    at njtranenrll.jspService(_njtranenrll.java:45)
    [SRC:/njtranenrll.jsp:15]
    at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    12/03/19 23:10:27 Oracle Application Server Containers for J2EE 10g (10.1.2.3.0) initialized
    12/03/20 09:17:21 Notification ==> Application Deployer for NJTransit STARTS [ 2012-03-20T09:17:21.865EDT ]
    12/03/20 09:17:21 Notification ==> Do not undeploy previous deployment
    12/03/20 09:17:21 Notification ==> Copy the archive to D:\oracle\FRHome_1\j2ee\home\applications\NJTransit.ear
    12/03/20 09:17:21 Copy file C:\WINDOWS\TEMP\dir51939.tmp\NJTransit.ear to D:\oracle\FRHome_1\j2ee\home\applications\NJTransit.ear
    12/03/20 09:17:21 Notification ==> Unpack NJTransit.ear begins...
    12/03/20 09:17:21 Auto-unpacking D:\oracle\FRHome_1\j2ee\home\applications\NJTransit.ear... done.
    12/03/20 09:17:21 Notification ==> Unpack NJTransit.ear ends...
    12/03/20 09:17:21 Notification ==> Initialize NJTransit.ear begins...
    12/03/20 09:17:21 Auto-unpacking D:\oracle\FRHome_1\j2ee\home\applications\NJTransit\njtransit.war... done.
    12/03/20 09:17:21 Copying default deployment descriptor from archive at D:\oracle\FRHome_1\j2ee\home\applications\NJTransit/META-INF/orion-application.xml
    to deployment directory D:\oracle\FRHome_1\j2ee\home\application-deployments\NJTransit...
    12/03/20 09:17:21 Notification ==> Initialize NJTransit.ear ends...
    12/03/20 09:17:21 Notification ==> Initialize njtransit begins...
    12/03/20 09:17:21 Notification ==> Initialize njtransit ends...
    12/03/20 09:17:21 Notification ==> Application Deployer for NJTransit COMPLETES [ 2012-03-20T09:17:21.990EDT ]
    12/03/20 09:25:31 Error: null
    12/03/20 09:25:31 Errors parsing jar:file:/D:/oracle/FRHome_1/j2ee/home/applications/NJTransit/njtransit/WEB-INF/lib/standard.jar!/META-INF/fn.tld
    12/03/20 09:25:31 Error: null
    12/03/20 09:25:31 Errors parsing jar:file:/D:/oracle/FRHome_1/j2ee/home/applications/NJTransit/njtransit/WEB-INF/lib/standard.jar!/META-INF/*permittedTaglibs.tld*
    12/03/20 09:25:31 Error: null
    12/03/20 09:25:31 Errors parsing jar:file:/D:/oracle/FRHome_1/j2ee/home/applications/NJTransit/njtransit/WEB-INF/lib/standard.jar!/META-INF/*scriptfree.tld*
    12/03/20 09:25:37 Error: null
    12/03/20 09:25:37 Error: null
    12/03/20 09:25:37 Error: null
    12/03/20 09:25:37 Error: loading Tld's into cachedConfigTable: null
    12/03/20 09:25:37 Error: loading Tld's into cachedConfigTable: null
    12/03/20 09:25:37 Error: loading Tld's into cachedConfigTable: null
    notice the error in parsing the jar file this jar file is standard.jar do I need this jar or can I leave it out?

  • Deploying icons as jar file in Forms 9i

    We (Cancer Research UK) don't quite understand what is happening -
    We followed the guidelines in the white paper "Oracle 9IAs Forms Services - How to Deploy Icons"
    to deploy the images in a jar file:
    Altered the formsweb.cfg file to contain
    archive_jini=f90_jinit.jar, our_images.jar
    imagebase=codebase
    Seemed to work, jar file downloaded to browser (IE 6 ) ok , web deployed form shows toolbar icons, great..
    However, when we removed an existing entry in orion-web.xml which maps our application/icon directory
    or remove the *.gif files from this directory, our web deployed form no longer shows the icon images.
    Does it still need these to be present on the server, if we direct it to use cached images ?
    We are test running just the Application server components installed with the IDs 9.0.2 on a Windows 2000 server.

    Hi Steve,
    I have the exact same problem. The jar is downloaded and everything is 100% best practises, but there is no way I can make the damn system use the files in the JAR file. No matter if imagebase=codebase: it will only use files on the server, and if I remove the gif files they don't show up.
    I think there must be a glitch in the system somewhere. I don't completely understand this part of it: the codebase is mapped to /forms90/java - but how does that add up when you put your files in c:\my_gifs (as detailed in Best Practices section of the Deploying Icons paper). How does the server know where to look when codebase are two different places - I'm thinking it can't for some reason.
    My Apache/Apache/logs/error_log clearly states that files (real files) are not found in c:\my_gifs if I remove them from the file system. The JAR is downloaded, but the server doesn't use it.
    However, most people have all their gif files in the same folder as their images.jar file, so they don't ever discover that the server ignores the jar and uses the files instead.
    Regards,
    Jesper Vad Kristensen
    Aarhus, Denmark

  • Exception while deploying application(as EAR file) on Standalone WLS 10.3

    Hi,
    I'm struggling with an exception while deploying my application(as EAR file) on a standalone WebLogic Server 10.3. I have developed a application using Trinidad and JSF components. But an exception occurs while deploying my application(as EAR file) in WebLogic Server 10.3. As I'm not familiar with WEBLOGIC server I'm unable to analyse the exception.
    Note - I'm attaching the StackTrace below
    Please help me out from this isssue.
    +[HTTP:101216]Servlet: *"Faces Servlet" failed to preload on startup in Web application: "iss"*. java.lang.NullPointerException at javax.faces.webapp.FacesServlet.init(FacesServlet.java:165) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1893) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1870) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1790) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)+
    Message icon - Error java.lang.NullPointerException:
    Thanks
    Sukumar

    These are set of jar files that are placed in WEB-INF/lib folder
    jsf-api.jar
    commons-net-1.4.1.jar
    itext-1.4.2.jar
    javax.servlet_1.0.0.0_2-5.jar
    log4j-1.2.8.jar
    lucene-core-2.0.0.jar
    ojdbc5.jar
    ojdl.jar
    ojdl2.jar
    orai18n-lcsd.jar
    trinidad-api.jar
    I think adf-faces-impl.jar is doesn't require for my application because we have migrated our application from ADF Faces to Trinidad.
    Thanks
    Sukumar

  • Hot Deploy Servlet in JAR file problem

    I've been playing with hot deploying servlets in WLS 5.1. I have SP2
              installed. I have things working fine with individual servlet class files. I
              decided to try hot deploying with jar files.
              I created a servlet, added it to a jar file, and then added the jar file to
              the 'weblogic.http.servlet.classpath'. I then restarted the server. I
              started the console and was able to hot deploy the servlet. So far so good.
              My next test is what failed. I modified the servlet, and rebuilt the jar
              file. I went back to the console, selected the servlet and hit the redeploy
              button. I went back to the browser and hit refresh - nothing, still the old
              servlet.
              It appears that WLS isn't reloading the jar file and the updated servlet.
              Everything works with individual class files.
              Does anyone know how I can cause the reload of updated servlets embedded
              within a jar file?
              Weblogic group - If there is no way now, will support be added soon?
              Thanks,
              Rick
              

    Hi,
              If I use weblogic.servlet.ServletServlet to try just the servlet , It
              works correctly.But When I develop it in a web application , there is a lot
              of hypelink to this servlet,thus I can't use the relative path reference to
              that servlet.I try to set the name of weblogic.servlet.ServletServlet same
              as the webapp,It doesn't work,how do I solve this problem?
              Thank you
              Pan
              Subject: Re: Hot deploy Servlet in webapp
              > http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
              >
              > It even explains why you shouldn't use it in production environment.
              >
              > Dimitri
              

  • Deploying application with class files compiled using ojspc

    Hi,
    I want to deploy the application having class files compiled using ojspc in Oracle9iAS Release 2 rather than having JSP pages.
    Thanks,
    Pritam

    Hi Manoj,
    I have tried doing something like this.
    If you want to try this out running on a NW2004s.You need to first download the entire project from perforce branch (
    tc\webdynpro\clientserver)for NWDS 7.0 and then build the project locally in your java perspective.
    During the local build of the project.It will also point out the dependent projects required by this project(clientserevr).
    Once the project is build.
    Create seperate external jars of the clientserver project and its dependent projects and save them locally.
    Open your SDM manager,pick up this jar file from there and deploy it.
    Once the deployment is over, the server is ready to run the application you created.
    But this make your NWDS2004s to behave jus like NWDS7.0 .
    Just a small suggestion ,instead of going through this tedious process you can shift to NWDS7.0 itself.
    regards
    aarthi mathivanan

  • Deploying application with EAR file: problems....

    Hello!
    We been working in a test environment for developing our application. When its done and ready to go in production, we did generate the deployed application archive (EAR) with the console. Then, we used the
    java -jar admin.jar -deploy command to deploy in the prod. env.
    Meanwhile, we always get this kind of error, as it seems that oc4j is not generating EJB wrapper correctly:
    GestionApplicationSBHome_StatelessSessionHomeWrapper120 was not an instance of interface sertir.portail.gap.GestionApplicationSBHome, the interface it implements is sertir.portail.gap.GestionApplicationSBHome
    at java.lang.Throwable.fillInStackTrace(Native Method)
    AND
    java.lang.ClassCastException: ApplicationEBHome_EntityHomeWrapper14 was not an instance of interface sertir.portail.gap.ApplicationEBHome, the interfaces it implements are sertir.portail.gap.ApplicationEBHome, com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ExternalComparator, com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.ejb.EntityContainer
    and other errors doing that with almost all EJBs.
    My question is, is there a special switch in the deploy command to force the compilation of the EAR file?
    Any help would be appreciated...
    Thanks!

    These are set of jar files that are placed in WEB-INF/lib folder
    jsf-api.jar
    commons-net-1.4.1.jar
    itext-1.4.2.jar
    javax.servlet_1.0.0.0_2-5.jar
    log4j-1.2.8.jar
    lucene-core-2.0.0.jar
    ojdbc5.jar
    ojdl.jar
    ojdl2.jar
    orai18n-lcsd.jar
    trinidad-api.jar
    I think adf-faces-impl.jar is doesn't require for my application because we have migrated our application from ADF Faces to Trinidad.
    Thanks
    Sukumar

  • Images not getting Loaded while running Java Application through jar file

    Hello Friends,
    I have a problem while starting my application.I have written my application using pure java.There is no JSP or anything just pure swings.Mine is a standalone appplication.So i used to run it using a batch file.And when i used to start my application it used to not show me the images.so what i did was i mentioned the starting directory in the properties of the batch file (ie in the start in column field).But that was when i was using weblogic server.And i have lot of people working on the same application.so i used ZAC publisher in weblogic and along with that i used to publish the batch file also.so the users dint have any problem.But now what is my problem is i m trying to use JAVA Webstart instead of weblogic ZAC.Now in webstart what happens is that i have to run the appliaction thru jar file.so where do i mention the class path so that the images get loaded.As of now the imaes are not getting loaded.i feel this is a class path problem.but where do i mention it that is my problem.It would be really helpfule if someone could help me out.
    thanx and regards,
    [email protected]

    try out this
    ImageIcon img1=new ImageIcon(this.getClass().getResource(imagename));
    for exmaple
    Imageicon img1=new ImageIcon(this.getClass().getResource("name1.jpg"));
    dont 4get to include the image files in the jar file

  • Java application - build JAR file & include JCO library

    Hello everyone,
    I have a problem with my Java application that <i>connects to SAP system using JCO </i>library <b>(sapjco.jar)</b>.
    I would like to create a JAR file from my Java application but when I run the JAR file that I created I get an error that <b>NoClassDefinitionFoundError com/sap/mw/jco/JCO at [...]</b>
    That means that the JCO and associated DLL files <b>(sapjco.jar, librfc32.dll and sapjcorfc.dll)</b> were <u>not</u> included/packed in my JAR file.
    <b>-- How can I include the JCO lib in JAR file?
    -- If there is a problem with the DLL files, how can I include the JCO lib externally (dynamicly read the JCO whenever my JAR in run)?</b>
    I am using Eclipse 3.2 and Export to JAR option when I click right button on Project.
    THANKS IN ADVANCE FOR HELP!!!

    Hi,
    The problem is that you don't have defined the libraries in the Manifest file of your jar-file. So the jar doesn't know what to use at runtime.
    Add following entry to the MANIFEST.MF file:
    Class-Path:/<lib_folder>/<lib1_name>.jar; /<lib_folder>/<lib2_name>.jar and so on.
    Regards,
    Daniel

  • Application in JAR file cant find JDBC classes

    Hi,
    When I run an application from the JAR file the ClassNotFound exception is throw! When I run from the application classes in the directory the program works. The JDBC classes are in the CLASSPATH, the manifest of JAR file is:
    Manifest-Version: 1.0
    Created-By: xxxxx
    Main-Class: com.xxx.jhdesk.JHelpDesk
    Class-Path: classes111.jar JdbcDomino.jar
    I tried to put "class-path" parameter in the manifest but the problem continues.
    I need to send only my jar file, and the JDBC classes would be anywhere at the client machine.
    Any hint will be appreciated!
    Thanks in advance!
    Daniel Carvalho

    Those two jar files in the Class-Path entry in the manifest file, are they in the same directory as the jar file? (What you put there is supposed to be relative to the jar file, and you have no directory information.) And is there a line-ending character at the end of that line?

  • Running application from jar file in a PDE project?

    I have a jar file with a simple application:
    import javax.swing.*;
    public class MyTest {
      public void test(){
        JOptionPane jp = new JOptionPane();
        jp.showInputDialog("Bob");
      public static void main(String[] args) {
        MyTest m = new MyTest();
        m.test();   
    }I have made the Hello World PDE Project in Eclipse on Vista. From the execute function I do:
          * the command has been executed, so extract extract the needed information
          * from the application context.
         public Object execute(ExecutionEvent event) throws ExecutionException {
    //          IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
    //          MessageDialog.openInformation(window.getShell(), "MyPlugin", "Hello, Eclipse world");
           MyTest m = new MyTest();
           m.test();
              return null;
         }But nothing happens. I have added the external Jar file to the build path. Any ideas?

    I have tried running a debugger but I just get:
    "Source not found"
    when stepping over this line:
         MyTest m = new MyTest();
    I have not been able to find any pages on google that describes this problem or how to use external jars with a PDE project so any ideas are most welcome!

  • Problem in run the Java ME application using jar file

    Hi all,
    I am using Eclipse 3.3 with CLDC and MIDP, I add external jar file for my application. The jar contains MIDlet and some classes. I create a class (not MIDlet) that have same package name and Class as in jar file.
    Say for example the jar file have com.Displaytext and My new project have com.Displaytext.
    The problem is my application takes the class file in external jar but my intent is the application class file needs to work.
    I welcome your answers.
    Edited by: chals on Aug 23, 2008 12:24 PM
    Edited by: chals on Aug 23, 2008 12:25 PM
    Edited by: chals on Aug 23, 2008 12:37 PM

    For class loading inside or outside of JAR files I use this code:
    void loadClass (String className) {
        String prefix = "de.test.";
        String postfix = ""; // use this if your classes have a name pattern
        Object o = Class.forName(prefix + className + postfix).newInstance();
    void loadClass (String className, Class[] paramClasses, Object[] params) {
        String prefix = "de.test.";
        String postfix = ""; // use this if your classes have a name pattern
        Object o = Class.forName(prefix + className + postfix).getConstructor(paramsClasses).newInstance(params);
    }

Maybe you are looking for

  • Leopard completely trashed my HDD and now won't install on my MBP

    I only moved away from Windows in the summer and now I feel I'm no better off. I've just upgraded my new MBP (only a few months old) to Leopard and it failed. Not only did it fail with some Sibling Link error (which fsck_hfs -r and other internet sea

  • Date Format in ADF BC + Customization + JDev 10.1.3.3

    Hi, Currently we are specifying the date format in ADF BC EO component as MM/dd/yyyy for each attribute which is taking too much time.Specially when we do regionwide deployment of application where date format very specific,then again we need to go t

  • Formula Columns in Data Template

    Hi, Is it posiible to have formula columns in data template apart from summary columns.please suggest. Regards

  • Custom taglib: tags not rendered in visual editor

    Hi! I have created a custom tag library with jsf tags. I have created one tag that extends the CoreSelectOneChoiceTag. When I drag this tag on a page, at runtime it works completely as desired. Only, in the visual editor the tag is invisible. With th

  • Using pages on ipad

    I want to work on an existing pages document on my ipad. How do I do this?