Problem with installer of jar file....!!!

Hi All,
I had created a installer of my java application. after the installation when i click on jar file,jar file will execute but not locating to installed program files folder.
But if i set the Startin property of shortcut (Start-->Programs-->Folder-->JarFile--> Right Click-->properties) then it run OK.
Problem is that, i have to set that property manually..
If you people having any solution of this, then please let me know.
Thankx in advance...

Hi
see http://forum.java.sun.com/thread.jspa?forumID=256&threadID=501000
Hope that help,
Jack

Similar Messages

  • Problems with jdbc and .jar files.

    I am having a problem with connecting to my database when running my .jar file as an executable.
    It connects correctly when I use the java command in command prompt and it also runs correctly when using my IDE.
    Is there something that needs to be added to the manifest or in the code it self inorder for the program to find the JDBC driver correctly?

    This is the error message that I get:
    java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at AboutFrame2$Connect.getConnection(AboutFrame2.java:109)
    at AboutFrame2$Connect.displayDbProperties(AboutFrame2.java:127)
    at AboutFrame2.<init>(AboutFrame2.java:72)
    at MainStartFile2.main(MainStartFile2.java:7)
    Error Trace in getConnection() : net.sourceforge.jtds.jdbc.Driver
    Error: No active Connection
    I think that it is because it cannot find the driver. I am going to add the path to the manifest and see if that works thank you for all the help.

  • Problems with ClassLoader and Jar-Files

    1. I'm not good in englisch (writing).
    2. I have the problem, that i want to load a object from an application in Jar-File A out of the Jar-File B. I set the CLASSPATH for B with System.setProperty("java.class.path", <ClassPath>); . Then i tried to get the Class-object from a class of B. I do it with getClass().getForName("package.Name");.
    But everytime i get a ClassNotFoundException. Where is the Error? Or how can i load a class out of a Jar-File and get an instance? I hope you can help me..
    Tobain

    The error is that classes are loaded from the classpath as it existed when the program started. Changing the system property that was copied from the classpath has no effect, as you have seen. I have heard that you can write your own ClassLoader if you want to load classes from arbitrary locations, but I do not know how to do that myself.

  • Problems with creation of JAR file

    Hi!
    I can't succeed in creating a JAR file for my application.
    I've followed the guide at http://java.sun.com/docs/books/tutorial/deployment/jar/basicsindex.html
    but apparently im doing something wrong....
    I've tried doing an extra Manifest file aswell as "Setting an Entry Point with the JAR Tool" as written in the guide. noen with success however :(
    I always get the error "Could not find the main class. Program will exit." from the JVM when I try to run my JAR file.
    Structure of my program:
    C:\searchpath\moresearchpath\projectname\src\
    inside src\ there are 3 packages called; "graphic", "client" and "server".
    I want to make a JAR file from the files in the "server" package. The "server" package consists of these following 4 files(and nothing more); "ClientHandler.java", "TestServer.java", "ServerModel.java", "ServerController.java".
    "TestServer.java" is my main class!
    This is an example of a command I've done in order to try to make a JAR file:
    "C:\searchPathToWhereJavaIsInstalled\jdk1.6.0\bin\jar cvfe sgwserver.jar server.TestServer server\*"
    This doesn't generate any error. However when I try to start the .jar I get following message "Could not find the main class. Program will exit."
    I've also tried creating manifest file manually but without success (with UTF-8 encoding and not double .txt ending on file)
    This is how the "Manifest.txt" file has looked when I've tried making one:
    Main-Class: server.TestServer
    I have used Netbeans 5.5 and Java SE 6 for development
    What am I doing wrong? Please help me :(

    If I try to run the one generated from Netbeans I get the following error message: "Failed to load Main-Class manifest attribute from C:\searchpath\moresearchPath\projectName\dist\projectName.jar"
    The thing is I need 2 JAR files, one that contains the files in the "server" package and one that has all other files. The other one is an applet and the files in "server" package are a standalone application.
    How do I get the standalone application's JAR file to work?

  • Problem with images in .jar file

    Hi all!
    I've got a severe problem when deploying an application via web start:
    the images withhin a deployed .jar file are not found.
    So far I've tried a number of things to get the images back, none of which are working.
    I've found different threads concerning this topic, e.g.:
    http://forum.java.sun.com/thread.jspa?threadID=396363
    http://forum.java.sun.com/thread.jspa?threadID=465795&messageID=2141351
    but sadly, they didn't help me out.
    Here is my code I'm using:
      private ImageIcon loadIconFromClassLoader(String tszRelPath)
        ImageIcon tIcon = null;
        cCat.info("tszRelPath = "+ tszRelPath);
        // this line simply leads to a crash of the whole application
        //tszRelPath = tszRelPath.replaceAll("\\", "/");
        if(!tszRelPath.startsWith("/"))
          tszRelPath = "/" + tszRelPath;
        cCat.info("modified tszRelPath = " + tszRelPath);
        URL tURL = ClassLoader.getSystemResource(tszRelPath);
        if(tURL == null)
          // this too crashes my application
          //tURL = PlainResourceProvider.class.getResource(tszRelPath);
        if(tURL != null)
          tIcon = new ImageIcon(tURL);
        return tIcon;
      }I've also tried
    PlainResourceProvider.class.getClassLoader().getResource()PlainResourceProvider is part of the .jar that involves the images.
    Of course all the .class files in the .jar file are easily accesible
    I would be so thankful, if just anyone could help me to solve this problem.
    I am going crazy.
    Thanks in advance, Christoph

    You should take care of the directory structure according to the package structure.
    I for example have this jar:
    C:\source\java\ebank2_util\smsunlock>unzip -l pro-ebank_sms_unlock.jar
    Archive:  pro-ebank_sms_unlock.jar
    Length    Date    Time    Name
          0  10-28-05  17:27   hu/
          0  10-28-05  17:27   hu/khb/
          0  10-28-05  18:17   hu/khb/smsunlock/
        256  11-07-05  16:33   hu/khb/smsunlock/DButils$MySQLException.class
       4229  11-07-05  16:33   hu/khb/smsunlock/DButils.class
       1700  11-07-05  16:33   hu/khb/smsunlock/GUI$1.class
       2318  11-07-05  16:33   hu/khb/smsunlock/GUI$2.class
        988  11-07-05  16:33   hu/khb/smsunlock/GUI$3.class
       1402  11-07-05  16:33   hu/khb/smsunlock/GUI$mywl.class
       5630  11-07-05  16:33   hu/khb/smsunlock/GUI.class
        818  11-07-05  16:33   hu/khb/smsunlock/LimitedLength_TextField.class
       2452  11-07-05  16:33   hu/khb/smsunlock/Main.class
        900  11-07-05  16:33   hu/khb/smsunlock/MyInputStream.class
          0  11-07-05  16:33   META-INF/
         98  10-27-05  15:53   META-INF/manifest.mf
         90  11-07-05  16:33   hu/khb/smsunlock/properties
      20881                    16 filesAnd the resource is loaded like this from hu.khb.smsu.Main:
    InputStream is = new MyInputStream( Main.class.getResourceAsStream( "properties" ) );

  • Problem with addition of jar file to DC

    Hi WDers,
    I have a DC of type WD.
    I'm trying to add com.sap.security.api.jar file to this component so that I can get IUser and work on it.
    I have added this security jar file as an External jar file to the DC. But whenever I try to DC->Build, the jar entry is going away. So the Build is failing.
    Can you kindly let me know why this is happening?
    Or is there any other way to add a jar file so that I can use the IUser interface in my view?
    Thanks in Advance
    RK

    Hello,
    Add the Standard DC "com.sap.security.api.sda" from the SAP-JEE. This ahould solve the problem.
    To do that follow the steps:
    1. Go to the "DC Metadata" option available under the DC.
    2. Go to "Used DCs" and choose "Add used DCs" from the context menu which appears on a right click at the Used Dcs option.
    3.Select "com.sap.security.api.sda" under SAP-JEE and choose finish.
    4. Build the DC to gain access to the IUser and other related classes.
    Bala.

  • Problem with using external jar file

    Hi
    I was using mail.jar library for swing application to send and receive emails. It just works perfect when I run with netbeans. But when I run the executable jar file at dist folder it runs but mail related functions doesn't work.What should I do now to make it work with mail features outside netbeans.
    thanks
    vinay
    Edited by: 899657 on Dec 24, 2011 5:07 AM

    899657 wrote:
    No. Because I am running the jar file which is created by netbeansNetbeans creates a 'dist' directory in which it puts your jar and a "dist/lib' directory in which it puts the dependent jars that are added to the project using 'project right mouse click'->Properties->Libraries. I would expect to see this 'dist/lib' directory contain mail.jar and activation.jar and any other jars that your jar needs. Within your program jar's manifest I would expect to see the Class-Path attribute have relative reference these jars ( lib/mail.jar lib/activation.jar ) and for the Main-Class attribute define your main class.
    Given this setup then you should be able to just type -
    java -jar yourjar.jarto run your program.

  • Problems with Manifest building jar file

    Hello all,
    i try to deploy my application in a jar file. I also have some libs to deploy with my application. My app.jar and my lib.jar are in the same directory. My Manifest looks like:
    Manifest-Version: 1.0
    Main-Class: parser.Parser
    Class-Path: lib.jar
    Class-Path: ...Still get the error: NoClassDefFoundError.
    Main Class is found but not my lib. Can somebody help?
    regards ak

    Hi CeciNEstPasUnProgrammeur,
    many thanks. I was blind reading the Java tutorial...
    Best regards,
    ak

  • Problems with exporting a .jar file

    Hi there,
    I'm working on a small java game and wanted to export in as a jar file.
    The program runs fine in the IDE and it generates the jar without any warnings.
    However, when i try to execute the jar, it simple "blinks" the basic frame and exit.
    A better description might be, that it looks like the Jframe opens, but then closes again quickly.
    I'm using Eclipse as IDE, and follow the Export wizzard.
    My project is devided like this:
    package : framework.
    package: sound.
    package: sprite.
    folder: sounds.
    folder: sprites.
    I'm guessing it somehow can't find the images, but as i said, it runs fine in the IDE.
    My MANIFEST looks like this:
    Manifest-Version: 1.0
    Sealed: true
    Main-Class: framework.EagleFlight
    Hope you can help.

    Hi,
    Thanks for your answer.
    I can export it from Netbeans, but not Eclipse.
    However, from Netbeans I get no sound, when executing the jar.
    Anyway, I'm happy enough with the exporting, now I just need to get sound, for which i have
    made another thread here.

  • I have a problem with runing a jar file

    after i compiled the hole project into a jar file when i want to run it i get this error:
    ========================================================
    C:\Documents and Settings\BlackShark>java -jar D:/eclipse/workspace/Bazooka/E
    xe/Bazooka-Server.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: ro/blackshark/Bazo
    oka/Server/TestServer

    Looks like you're missing that class in the jar file. Open your jar file and check if the class is there and the path is correct.

  • Strange problem with my build JAR

    Hiii everybody... I'm having a strange problem with my build (JAR file)... when I work with the Eclipse and I click in the table that returns the clients stored in my PostGre database it works fine, but when I build my application and it generates my JAR file and I open it and click in the same table to return the objects that I have.. it does not appears anymore.. just show when I work with eclipse... and the database is the same for both.
    I already checked the database path in my properties file... and the application recognize the database because I can login and there isn't any runtime exception...
    In that application I work with Hibernate and Spring... for me it is very strange because the application works fine when I run by eclipse... but does not return the database data when I click on my Jar file to open the application..
    Someone can help me with that?
    I dont know if the problem is in the Spring, Hibernate, Libraries...
    thanks in advance...

    So what's the error then? Are there any error messages? Have you checked the console? Or are you just clicking on the jar and you wouldn't even see the errors if there are any?
    What do the logs say?
    You're not giving a lot to work on here.

  • Problem with installation and activation

    Hi, I have a problem with the installation of Adobe Muse.
    I had a free 30-days trial, when it was over I bought the product ($ 13 per month), 
    I installed the program again and I see the same window with the finished Trials
    and it requires a serial number and does not allow to enter the program.
    I installed the program on your PC wife without any problems, but I can not install it on a laptop.
    I have a laptop with Windows 8 operating system.
    What I've done:
    1. Uninstalled the free program,
    2. check the connection to the Internet,
    3. has installed a new program from the official website adobe.com,
    4. Remove the line for the activation of the hosts file and resave the file,
    5. turned off the brandmower,
    6. rebooted.
    I can't get support for a 3 days, is it the most terrible support I've ever seen? I dunno
    Please help me at [email protected]

    I guess this stuff helps me
    http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html
    2014-08-07 20:07 GMT+07:00 Дмитрий Броский <[email protected]>:
    thanx
    >
    2014-08-07 18:18 GMT+07:00 Prabhakar.Kumar <[email protected]>:
        problem with installation and activation  created by Prabhakar.Kumar
    >> <https://forums.adobe.com/people/Prabhakar.Kumar> in *Help with using
    >> Adobe Muse CC* - View the full discussion
    >> <https://forums.adobe.com/message/6619532#6619532>
    >>

  • Problem with saving a pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21).

    Need advice on a saving file issue. I'm having problem with saving a .pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21). This is new as this error message just recently started to pop-up.

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Problem with creation of jar with external libraries

    hi guys, I've no problem with creation of jar,i use this command:
    jar -mcf MANIFEST.MF NameFile.jar *.class
    my file manifest is this:
    Manifest-Version: 1.0
    Created-By: Me
    Main-Class: NameFile
    Now,I've to make a jar file,but i have to use some external libraries in jar format.
    I've read on sun tutorial and i've added to manifest this line:
    Class-Path: dt.jar formshelp.jar formsrt.jar jh.jar looks-1.3.1.jar substance.jar TableLayout.jar
    But the jar file doesn't work, neither with a double click nor with console...
    Someone can help me?Thanks!:)

    Darkweb wrote:
    sorry but,the external libraries that i use are in .jar,what i've to do to include these libraries in my jar?One of 3 things
    1) Take them out of the jar, and put them in a folder, preferably a folder in the same folder as the jar
    2) Write a custom classloader to load classes from nested jars
    3) Extract the contents of all the dependency jars, and jar them all up with your own code
    The first is almost always the most preferable, the second one is doable but brittle and resistent to updating dependencies ( you have to release everything for any changes you need, even if it's not a change in your own code ) and the third one is tedious and suffers from the same robustness problems of the second, not to mention that a lot of software licences prohibit you from actually doing it. Do the first one, it's by far the most common and easiest to maintain. I really wouldn't advise the third option, ever, though. Any activity that reduces the modularity of your application is ill-advised

  • Hey, I had met a problem with installation. Can any one help me?

    Hi everyone, I'm an user of Windows 7(64 bit),
    I had just download "Master Collection CS5.5"
    Everything are fine but Adobe Acrobat Professional can't install on my computer.
    There are the details..:
    Exit Code: 6
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 4 error(s), 1 warning(s)
    WARNING: DW066: OS requirements not met for {AC76BA86-1033-F400-7760-000000000005}
    ----------- Payload: {AC76BA86-1033-F400-7760-000000000005} Acrobat Professional 10.0.0.0 -----------
    ERROR: Error 1324.The path R嶰up廨er un document num廨is?sur un multifonction.sequ or the volume is invalid. Please enter it again.
    ERROR: Install MSI payload failed with error: 1603 - 安裝時發生嚴重錯誤。
    MSI Error message: Error 1324.The path R嶰up廨er un document num廨is?sur un multifonction.sequ or the volume is invalid. Please enter it again.
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050:  - Acrobat Professional: Install failed
    Thanks

    Re: Hey, I had met a problem with installation. Can any one help me?
    This worked for an English version and the concept should work with all Adobe programs - new or old (hopefully in any language). My guess is that you have/had an older version of Acrobat/Reader on your computer hard drive that needs to be *completely* removed first. Uninstall the new (and any old) Acrobat; then try using the "kb2..." guideline link below before reinstalling the new Acrobat. I am including the lengthy instructions in order to help others with more extensive installation problems. Good luck!
    I live on a fixed income and use CS for a hobby. I had problem installing Adobe Creative Suite (CS1) to Windows 7 64-bit Pro on my new computer. Also installed Adobe Photoshop LR3. What I learned: All Adobe products (Flash, Acrobat/Reader, Photoshop, Creative Suites, etc.) leave a VERY pervasive footprint on your hard drive. Logic finally worked for me.... think of building a house; there is an order you have to do things in. First, you have to clean the area before laying the foundation; then you have to build the framework before you put the roof on. You cannot install an older program over ANY newer program; and you will sometimes have a problem installing a newer program containing Flash, Reader, etc. unless you "erase" the older versions of Flash, Reader beforehand. If installing older programs, do a Custom/Manual install; do not install older versions of Flash, Reader, etc.  packaged with your Adobe software.
    SOLUTION (not easy, but it works):
    I first tried this; it did not solve my problem (but, if applicable, may help others).  http://windows.microsoft.com/en-us/windows7/Make-older-programs-run-in-this-version-of-Win dows
    Before doing anything, make document and any database/presets/cache back-ups beforehand (keep notes on their designated location*); manually create a System Restore point. (Be prepared to reinstall Windows if necessary - I didn't have to.)
    Completely and meticulously eradicate (clean) your hard drive of ALL Adobe programs [uninstall, remove remaining folders, and remove only the registry entries that have the Adobe name attached (unless you are an expert and fully understand the other entries)]. Use this as a guideline  http://kb2.adobe.com/cps/400/kb400769.html
    Do a Custom/Manual reinstall of all your Adobe products *in order of release dates* (OLDEST first).... do not include Reader, Flash, etc. If your CD will not automatically run at this point, click "Open folder to view files" (use Computer/Windows Explorer, if necessary). Click "Adobe Creative Suite (or your desired program) ==> Setup.exe" (IMPORTANT: Make sure that Reader, Flash, etc. are unchecked.)
    After each of your desired Adobe programs are installed, test to insure they boot up. Then download the latest Reader, Flash, etc. apps and install them (I did this in order of release date - oldest first). Do test boot(s) again.
    Copy/Paste your document and any database/presets/cache back-ups into the appropriate folders (*this will vary depending on your programs and your filing system).
    It has been four weeks and all my Adobe programs work flawlessly - system is stable, no problems!

Maybe you are looking for

  • How to fix an active sync problem

    All, I came across some issues with active sync that I could not find reference to in Sun documentation that we found a fix for. Read and enjoy. Problem: Active sync stopped working for no reason Reason: Too many users were attempting to be updated a

  • Ddl-generation error

    Hello, i'm having a very strange error during ddl-generation, i'm using Netbeans 5.5, Glassfish V2 and Mysql 5.0.26. Toplink bug? JDO76609: Got SQLException executing statement "ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0": java.sql.SQLExcepti

  • CONTAINER FOR STRUTS

    what container/server I need for run struts applications ? which is best development tool for struts application development ?

  • Timer won't release - What am I doing wrong?

    Hi, I am farely new to C#, but not new to programming.  I try to develop a class that need a timer to update a file.  The problem I have is that when the class is release (like a local variable is destroyed when we exit the method), the timer is stil

  • Replacement of iphone

    I've bought an iphone 4s in Australia and now its damaged, dropped in water. Currently I am residing in US. Do I have any chance of replacing my iPhone here in any iStore or should I replace only in Australia?