Re: Installing a .jar application

How can I get the install wizard to automatically run when the application is loaded on to the computer? I am writing an executable(.jar) program that I would like to burn to a cd and then have it installed to other computers. Any knowledge available would be great.
Wes

You can write a batch file (for Windows) or an executable Linux file that does this:
java -jar myjar.jar
However, you must make sure your manifest file has a main-class attribute for this to work.
Then you can run this batch file from your install wizard AND the same batch file would be your desktop icon.

Similar Messages

  • CommandAction works through OnDeviceDebug, but not when installed from jar

    Hi everybody,
    I'm trying to run a HelloMIDlet example and if I run it on emulator it works fine, also when I run it on mobile through OnDeviceDebug from eclipse it works fine, but when I install a jar file and run the application it ends with Application Error message and it exits. I found out that the problem might be in the CommandAction method, because when I use this:
    public void commandAction(Command c, Displayable s) {
              notifyDestroyed();
    }then the application works also when installed from jar, but when I use this:
    public void commandAction(Command c, Displayable s) {
       String label = new String("Exit");   //just for test
       if (label.equals("Exit"))
         notifyDestroyed();
    }then it ends with Application Error right after I run the program (and it works when I use OnDeviceDebug). I'm using jdk1.5.0_06 and WTK from Sony Erricsson (my target device is W800i, which supports CLDC1.1 and MIDP2.0)
    My manifest file is
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: HelloMIDlet
    Created-By: Sun Microsystems Inc.
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-1: HelloMIDlet, , HelloMIDlet
    MIDlet-Version: 1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Description: Hello Worldand I don't use the jad file when installing the application (seems to be unecessary when you have a manifest file inside the jar). And I'm unable to debug it because when debugging then it works normally. Also I tried to recompile the BluetoothDemo and the same error(and works through OnDeviceDebug). And when I installed the jar file, which is originally distributed with BluetoothDemo then it worked. When I compared original jar file and my jar file then the only difference was in the size the class files (class files compiled by me were bigger then the class files in original jar file (which work)).
    Any ideas guys and girls?

    I tried that approach but it doesn't work either. I think maybe my directory structure is wrong.
    C:\IRS\IRS.jar
    C:\IRS\irs.hs
    referenced: jar:file://C:/IRS/IRS.jar!/irs.hs
    Am I doing this right?

  • Error while installing a web-application

    Hi,
    the error shown belov occurs when i try to install a web application.
    The application is inside an .ear application.
    the reffering line in the web.xml is :
    <web-app application="myweb" name="myweb-web" root="/myweb" load-on-startup="true" />
    if i set the load-on-startup Value to false, the error occurs later when i try to run the application (i think the action lead to the start of the application)
    can anybody help me ?
    Thanks
    Mathias Schacht
    java.lang.NullPointerException
    at com.evermind.server.http.HttpApplication.initDynamicLoaders(HttpApplication.java:4592)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:466)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:337)
    at com.evermind.server.Application.getHttpApplication(Application.java:444)
    at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:581)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:478)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:222)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:240)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:146)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:1546)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:997)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:65)
    at java.lang.Thread.run(Thread.java:484)
    at com.evermind.util.ThreadPoolThread.run (ThreadPoolThread.java:47)

    Hi Mathias,
    Have you tried running OC4J in debug mode? Here is the command for
    launching OC4J using all the debug flags I know. Note that most of
    this information came from the following site:
    http://www.atlassian.com
    Here is the command line (formatted for easy reading -- you need to
    reformat into one long command line):
    java -Dtransaction.log="console"
    -Dejb.debug.state=true
    -Dejb.assert=true
    -Drmi.debug=true
    -Drmi.verbose=true
    -Djdbc.debug=true
    -Djdbc.connection.debug=true
    -Ddatasource.verbose=true
    -Ddebug.jdbc.check=true
    -jar orion.jar -verbosity 10
    -out <output log file>
    -err <error log file>
    The "-out" and "-err" options capture standard output and standard
    error to log files that you supply names for.
    I suggest playing around with these settings (using different combinations
    of them) and see if you can get some more information regarding your
    error message.
    Hope this helps.
    Good Luck,
    Avi.

  • How install my jar+native package for JRE plugin

    I cannot figure out how to deploy a plugin consisting of a Java package that calls native code. The calling order is:
    Applet -> installed classes in lib/ext/my.jar -> DLL in C:\\WINDOWS\SYSTEM32
    I have gotten my plugin to work on Windows IE using the Microsoft JVM, and on Netscape using LiveConnect, and on Mac using MRJ. It also works with stand-alone Java applications. But I cannot get it to work with Applets when I am using the SUN JRE plugin for Java!
    I can call the classes in the JAR file but they can't loadLibrary( the DLL ).
    I put my JAR file in "C:\Program Files\JavaSoft\JRE\1.3.1_04\lib\ext".
    I put my DLL in "C:\WINDOWS\system32" which is in the "java.library.path".
    I was hoping that by installing the JAR file in the lib/ext folder that it would elevate its privelege and allow it to call loadLibrary().
    I don't want to have to sign each Applet. My plugin is installed using a digital certificate. Once installed it should give regular Applets the ability to call my native code.
    I am hoping to simply use a signed Java installer for the plugin that will copy my JAR file and DLL to the right places.
    If you use IE or Netscape without the SUN plugin, you can try my plugins here:
    http://www.softsynth.com/jsyn/plugins/
    http://www.javasonics.com/plugins/
    I'm tired of telling people to disable the SUN JRE plugin and enable the Microsoft JVM in order to use my plugins.....
    Any ideas?
    Thanks,
    Phil Burk

    I found a solution to my own problem. The problem was that classes in a JAR file installed in the "java.ext.dirs" path could not call System.loadLibrary() when called from an Applet.
    The solution was to explictly make use of the priveledged status of the extension classes as follows:
    Boolean result = (Boolean)
    AccessController.doPrivileged(new PrivilegedAction()
    public Object run()
    System.loadLibrary("mylib");
    return null;

  • Error while installing Oracle Utilities Application Framework..

    Hi all,
    I am getting this error while installing Oracle Utilities Application Framework.
    101124:094356 <info> Execute: C:\Program Files (x86)\Java\jdk1.5.0_11\bin\java -cp C:\TEMP\Release-FW-V2.2.0_rmb\spl\versions\Releases\FW\Release-FW-V2.2.0_rmb\FW.V2.2.0\data\bin JarVersionValidator C:\Hibernate_3.2.7_Win_O\hibernate-3.2.7.ga\hibernate-3.2\hibernate3.jar Hibernate-Version 3.2.5.ga
    101124:094357 <info> Hibernate jar file C:\Hibernate_3.2.7_Win_O\hibernate-3.2.7.ga\hibernate-3.2\hibernate3.jar does not exists or version not correct.
    101124:094357 <info> See Supported Platform Document for more details
    the Jar file available in the directory specified and version is also correct.
    I am new to this, will anyone help me out.
    Need your help.
    Regards,
    Siva

    It would help if you provided osme basic information like what version you are installing, what operating system, 32 bit or 64 bit. We may like to help but we are not mind readers.
    If you happen to be installing one of the latest versions of the framework (CC&B FW 2.2 SP 8) there is an issue.
    You may have to start off with hibernate 3.2.5 then run the framework installation.
    This may not do a full install but you may find that only 1 or patches have not been installed and the issue is that these require hibernate 3.2.7
    So go back and install the hibernate 3.2.7 and change the environment variables to point to the new version.
    Re-run the framework installer.
    You may get errors in that the patches that did not previously install properly cannot be installed.
    This is because they have entries in the etc/installed_fixes.txt file.
    edit the etc/installed_fixes.txt file and delete the patches that will not install.
    re-run the installer now and the rest of the patches should now install
    The 2 offending patches may be 9384543 and 9080333.

  • Distribute Java jar application in Optical Disk with private JRE

    I am trying to ship my Jar application using DVDs and need the user just to run an exe and launch the program. So I have written a batch file which runs the jar using the private JRE shipped in the same DVD.
    Now when I run the batch file from the DVD it takes over one minute to launch the application because JRE is in the DVD as well.
    When I copy the JRE in hard disk and use that in my batch file to lauch the program it runs fast. However I wouldn't the path where the user copies the JRE in his hard disk. How would I detect the same in my batch file ?
    Even Launch4J takes same time as batch file.
    If I anyway have to ship JRE and ask the user install first ,how does batch file know the installed jre location if JAVA_HOME is not set. it would start using the jre in DVD and slow down. Anyway to make sure JAVA home is set to begin with ? May be 1st time if Java home is not set it copies to jre to C drive and then next time onwards it launches using the same Java home? What do you suggest
    [cross post |http://stackoverflow.com/questions/13372969/distribute-java-jar-application-in-optical-disk]
    Note I am using JDK8 , which is only developer preview now am I allowed to ship it in my DVD ?

    I wouldn't do that. Even if it is allowed, which I doubt, you're shipping unfinished and potentially dangerous software. I would also stick to the runtime only if I were you.I know, Sorry I meant shipping JRE only not JDK.
    My answer to your main question is: yep, its a tough problem and you're not going to crack it without special measures. One such special measure is to generate an installer using one of the many installer generators you can >find with Google.Yes I thought about installers but it would copy my jar and resource files to hard disk which I don't want to avoid piracy. Is there any way to access the rest of the files from DVD directly ?
    PS. My DVD vendor promisssed that he would burn them such a way that whole thing can't be copied to hard disk or imaged, I am yet to verify this.

  • How to Install Remote Jar File?

    Hi all
    I Would know how can I implement a application that download files and then i can run them.Specifically , I would like download a jar o jar file, and then install it.
    How can do it?
    I`ve thought in download by httpConection:
    HttpConnection c = (HttpConnection)Connector.open("http://localhost:80/cosa.txt");
    InputStream is = c.openInputStream();
    is.read()...
    ...Then I dont know what to do.I can save the stream in a file coding it in jar extension and then, try to run it in order to install it.
    But I dont know do any of those things.Could I do this?
    I have readed that it is easier to use of RMS, without save anything.But I ask myself how can i store the info so that i can install the jar o jad file.
    Any Idea?
    Thank you very much!

    Emunicio,
    Have a look at javax.microedition.midlet.MIDlet.platformRequest() method. Providing that you use URL pointing to a JAD file, and that your web server will send the right MIME types with JAD and JAR files, this call should trigger OTA installation.
    Daniel

  • Cannot install OpenGL|ES application in Sony Ericsson K510i

    Hello,
    I've just finished a simple ogles application with WTK and was just going to test in my mobile. Unfortunently it just says "Action failed" (or whatever it is in english).
    I've tested that my mobile does support ogles, but that fact shouldn't affect it being installed or not.
    I'm trying to install the app with .jar file.
    I have enough space, memory and so on.
    Thank you in advance.

    Note : The MIME Type of the JAR files in the Server
    Side is "java-archive"That's wrong. It should be:
    jad: text/vnd.sun.j2me.app-descriptor
    jar: application/java-archive

  • Compiling & Installing Example Jar

    I have a Vodafone V710, just bought it.
    I have created an sample application with NetBeans to run on my phone.
    Installing the JAR over USB with the V710 tool doesnt work.
    So I found out that there is a lot of discussions about the DRM.
    I tried to find out how to create a DRM JAR, its pretty complicated, important is that you have i think a device key and application manifuctorer key or something.
    I found a tool called DRM packer on sony-erricson site, but thats only for media files I think.
    I have to use NMIT_41.zip (Nokia Mobile Internet Toolkit) i think, i did not test this yet.
    I read some specs about DRM and theoretically via USB, Bluetooth,MMS,WAP its installable, but V710 only is WAP-enabled for JAR files, i think.
    I can make or check for a WAP sniffer for special HTTP tags to determine what type of JAR to send...
    But I would like to have:
    - the A to Z of making a example JAR application
    - thats compatible on all Java-compatible mobiles, so PHP code of the WAP side too
    - and a list of what tools to use
    - maybe a tutorial
    Can some help,
    I am looking for days now.

    Hi ,
         As suggested by you we have installed Java5. But still the problem persists. The details configuration of the PI7.1 server is as follows:
    INSTALLED PI 7.1 on operating system Aix 5.3
    Component version : SAP EHP1 for SAP NetWeaver 7.1
    Component       Release  level     Support              Description
    SAP_ABA         711       0002     SAPKA71102    Cross-Application Component
    SAP_BASIS      711       0002     SAPKB71102    SAP Basis Component
    PI_BASIS          711       0002     SAPK-71102I     NPIBASIS         Basis Plug-In
    ST-PI    2005_1_710       0003     SAPKITLQJ3     SAP Solution Tools Plug-In
    SAP_BW          711       0000          -                  SAP Business Warehouse
    Pls suggest as to what needs to be done to make the JDBC Adapter work in PI7.1.............
    Thanks
    Regards    
    suk4023

  • Install J2ME Jars on Motorola Handsets

    Hi,
    I want to install a Jar into mu Motorola l6 handset .
    I have downloaded Motorola iDEN Java Application Loader Lite (JAL Lite) for it .Now when i am installing it .Its not gettinginstalled on to the Machine and i am not able to install my JAR onto the handset.
    Can anyone tell me how can we install any Application onto the Motorola Handsets.
    Is there any tool other tha (JAL) through which we can install java applications on to the handsets.

    Hi, I've done quite a bit of research on this now and it appears that there are no standard certificates at all... not even Verisign and Thawte. This is ridiculous! The best you can do is get a UTI certificate from the Java Verified Program, at about $400 per device per test and hope that the operator hasn't crippled the device and made you also need a co-signature from them... likewise for the handset manufacturer. This has really been the biggest cockup in J2ME as far as I am concerned, making it effectively unfeasible for anybody to write advanced J2ME apps that make use of restricted APIs. I've blogged about this http://javablog.co.uk/2007/08/09/how-midlet-signing-is-killing-j2me/

  • How to install a java application onto my mobile phone?

    Hi,
    I'm trying to install a simple hello world application onto my Samsung SGH-X650. I'm using WAP, because I have no other options. But when I try to download the jar file, I get an "unsupported file format" error. When I try the jad file, it displays as a text file. However, downloading from websites (ie. getjar.com) works (usually). Additionally when I put the jad file I downloaded from getjar to my own webpage, I get them as text files too...
    Any ideas?
    Thanks in advance,
    Viktor Erdelyi

    (((My phone doesn't know about Bluetooth, and the data cable is too expensive regarding that I don't use it every day, I just sometimes download a 20 kb file like a java app.)))
    But I managed to set the MIME type, now I get "invalid JAR"... I'm trying to install the JAR generated by NetBeans. In theory, CLDC and MIDP versions are ok.
    From google:
    "Samsung, for some strange reason, does not allow installing .jars over cable or bluetooth or any other way than over Internet connection."

  • Dear Mr./Mrs.,  I had an iPhone 4 , then I bought iPhone 5s , I faced a problem when I started installing any new application other than I already had on my iCloud , I was asked to enter my password of my apple account and I entered it correctly , then I

    Dear Mr./Mrs.,
    I had an iPhone 4 , then I bought iPhone 5s , I faced a problem when I started installing any new application other than I already had on my iCloud , I was asked to enter my password of my apple account and I entered it correctly , then I was asked to answer two questions , but I forgot the answers !! I click on forgot the answers , they send me check your email , I check my email and they send me the password that I have already entered not the answers of the questions ! How can this problem be solved ?! Hope to take my message into consideration.
    Yours sincerely,
                             Hesham.

    Welcome to the user to User Technical Support Forum provided by Apple.
    For your issue...
    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
         Or Email Here  >  Apple  Support  iTunes Store  Contact

  • I ran a disk verify & disk repair on my macbook.. both said my system was fine. I keep getting the underlying task reported failure on exit when trying to do disk permission or repair permissions. Also get cant install files in "/applications error. Help

    m was fine. I keep getting the underlying task reported failure on exit when trying to do disk permission or repair permissions. Also get cant install files in "/applications error when ever trying to install a driver or update. Help

    Hi,
    Here's an article for that:
    http://support.apple.com/kb/ts1901

  • Link error during install of O9i Application server

    Hi there.
    I have a problem when installing Oracle 9i Application Server rel. 1.0.2.2.0 on SuSE 7.3.
    During installation phase "Linking Oracle 9i Application Server rel. 1.0.2.2.0", I get: "Error invoking target install of makefile /
    opt/oracle/product/9.0.1/icache/lib/ins_icache.mk"
    The make.log states:
    building Oracle8i Cache Management Engine
    gcc -o /opt/oracle/product/9.0.1/bin/wtcme -L/opt/oracle/product/9.0.1/icache/lib/ -L/opt/oracle/product/9.0.1/lib/ /opt/oracle/pro
    duct/9.0.1/icache/lib/wtemain.o /opt/oracle/product/9.0.1/icache/lib/libicache.a /opt/oracle/product/9.0.1/lib/libwtc8.a /opt/oracle
    /product/9.0.1/icache/lib/libxml8.a \
    -lclntsh /opt/oracle/product/9.0.1/rdbms/lib/kpuadef.o `cat /opt/oracle/product/9.0.1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8
    -lnl8 -lnro8 `cat /opt/oracle/product/9.0.1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneri
    c8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /opt/oracle/product/9.0.1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -ln
    ro8 `cat /opt/oracle/product/9.0.1/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrac
    e8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `ca
    t /opt/oracle/product/9.0.1/lib/sysliblist` -ldl -lm \
    -lpthread -lc
    gcc: /opt/oracle/product/9.0.1/rdbms/lib/kpuadef.o: No such file or directory
    make: *** [opt/oracle/product/9.0.1/bin/wtcme] Error 1
    I had a similar problem when installing the database server software. This was fixed by editing the LD_SELF_CONTAINED parameter in
    genclntsh. This, however, does not help in this case.
    Kind regards,
    Roald Andresen

    Hi Melchor,
    Please follow SAP Note 1618816 - Permanent or Temporary License Already Exists In Systemcopy
    If possible please share files saplikey.log, dev_slic
    Regards,
    Gaurav

  • How to install Oracle Real Application Clusters on Aix

    I am running a 64 bit kernel AIX 5.2 on IBM RISC Based p-series sever(7028-6C4).Clustered has already been configured. How can i check the clustered has configured successfully (software & hardware) for oracle installation?
    What is the procedure to install oracle real application custer on AIX ?
    Can Any body Help me......
    Arif

    Here you have books related to that theme:
    http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
    Joel Pérez

Maybe you are looking for

  • ALE error while posting payroll data

    Hi all, We are trying to set up payroll posting via ALE interface. We have done the following settings 1. Distribution model setup with filters on for standard bapi's 2. Partner profile setup 3. RFC destination setup When we try to post payroll data,

  • My iPod classic will not update sync with I tunes

    When I connect my I pod classic to my computer and connect to I tunes, I tunes will not sync.

  • Internal order number in debit memo request in external billing

    Hi Experts, I am trying to create a Debit Memo Request in ECC from a confirmation in CRM. This confirmation is created as a follow-up to the service order. The debit memo request is getting created but it does not have a reference of the internal ord

  • My computer has been taken over at startup by Startup repair.

    when i first start my computer a program calling itself startup repair begins to run.It scans for about 5 minutes during which time I can do nothing with my computer.I have gone to add,remove programs to uninstall it ,but can find no listing of such

  • Lens Profile

    Please, I need your help - how can I request a lens profile - my camera is SONY NEX-5N, E 18-200mm F3.5-6.3. With Adobe Lens Profile Downloader I found end downloaded a profile for raw. How about jpeg? Any help will be appreaciated! Mary Christmas an