Starting jar-files in Windows XP

I've installed the latest JDK a while ago and everything went smooth until I installed a program to open zip-files (Filzip). After installing this it claimed responsibility for jar-files too, associating the .jar with it.
Now all .jar files are of the type 'Filzip' and are being opened by that program. How can I get Windows XP to associate jar-files to java again?
P.S.: I've tried to make Filzip not to open jar-files anymore, but I was not successful.

not true. You can edit the manifest file, its just
plain text.Well, basically I don't change programs other people wrote. Eather they work, or they don't. Call me a 'stupid user'...
I don't think I really get your problem. You say you
are trying to open a jar file, but jar's are
associated with some zip program... but the zip
program will only try to open the jar file if u double
click the file itself... it makes NO difference if
you are entering the java -jar command at the console.Here is what I'm talking about.
1.) console
java ptpicker.jarException in thread "main" java.lang.NoClassDefFoundError: ptpicker/jar
java -jar ptpicker.jar(program starts...)
2.) desktop
.jar files are of type "Filzip" but I have associated them to start with "java.exe". Due to the reason that I can't pass the '-jar' parameter in Windows XP it exits with NoClassDefFoundError.

Similar Messages

  • Run a JAR file in Windows Mobile 6.1

    Hi, everyone. First of all sorry for my english. I'm from Chile y i have the following question...
    Can i install JVM in windows mobile 6.1? What I really need is to run a JAR file in Windows Mobile.
    If the answer is "NO", how else could it do?

    Any response Pls

  • Error JCo starting .jar file

    Dear all,
    I am new to Java, but I try to implement a small application which talks to our SAP. I am working with eclipse 3.3 and I've installed JCO 2.1.8. I modified Example1 a little bit and everything works fine when I start my program within eclipse with run as->java application. I added the sapjco.jar file to the build path of my project. I also added C:\Programme\sapjco-ntintel-2.1.8 to my windows path variable and copied *.dll to system32. When I export my project as a .jar file and try to start it with
    java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. -jar Jco.jar
    I get the error message
    java.lang.NoClassDefFoundError: com/sap/mw/jco/IMetaData
    The contents of my .classpath file is:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
         <classpathentry kind="src" path="src"/>
         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
         <classpathentry kind="lib" path="C:/Programme/sapjco-ntintel-2.1.8/sapjco.jar"/>
         <classpathentry kind="output" path="bin"/>
    </classpath>
    But I can start the java program with
    java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. Jco
    when I am in the directory with the .class file.
    Whats wrong with my .jar file?
    Thanks in advance,
    Rolf
    Message was edited by:
            Rolf Winter

    Hi,
    thanks for your answers.
    C:\Programme\sapjco-ntintel-2.1.8 containing sapjco.jar is already added to the path environment variable.
    summary:
    -I installed JCO in folder C:\Programme\sapjco-ntintel-2.1.8
    -I copied *.dll to Windows\system32
    -I added  C:\Programme\sapjco-ntintel-2.1.8 to the path environment variable
    -sapjco.jar is in the building path
    -<i>I can start the "normal Java .class file"</i> with java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. Jco
    -I've created a jar file with the export dialog. I just followed the steps and selected the starting class "Jco".
    -In the directory containing the jar file I tried to start it with the following commands
      java -cp C:\Programme\sapjco-ntintel-2.1.8\sapjco.jar;. -jar Jco.jar
      java -jar Jco.jar
    but I always get the message
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/mw/jco/IMetaData
    Any further ideas?
    Rolf

  • Error in updating jar file in windows

    Hi...
    I am updating a jar file using Runtime.exec() by passing a batch file in it.
    While updating the jar file I am getting error like this:
    java.io.IOException: Error in writing existing jar file
    at sun.tools.jar.Main.run(Main.java:198)
    at sun.tools.jar.Main.main(Main.java:1022)
    The batch file (upgradejar.bat) is like this:
    echo IQuinox NextGen Upgrade Management
    cd shared/upgrade/upgrade/IQfullversion/classes
    jar uf ../../../../../../jars/ng.jar ./qlc/postmaster/PMStartup.class ./qlc/postmaster/wpm/admin/scheduler/others/OthersScheduleServlet.class
    The java code is like this:
    Process p=Runtime.getRuntime.exec( "cmd /C start "+upgradejar.bat);
    if (p.waitFor() != 0) {
    System.err.println("exit value = " +p.exitValue());
    Thanks.

    I am using the jar file in my program. the jar file name is " _ng.jar_ " which is mentioned in the batch file.
    The batch file is here :
    echo IQuinox NextGen Upgrade Management
    cd shared/upgrade/upgrade/IQfullversion/classes
    jar uf ../../../../../../jars/ng.jar ./qlc/postmaster/PMStartup.class ./qlc/postmaster/wpm/admin/scheduler/others/OthersScheduleServlet.class

  • Unsupported class version error trying to run jar file on windows machine

    Hi,
    i've written a program that connects to an access database to get its data. Created a jar file with the class files, the access database and other required files.
    works fine on my home windows computer but when i try to run it on another machine i get an error.
    here's what i write on the cmd: java -Xmx128m -jar myFile.jar
    heres the error i get:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: StartUp(Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    and so on.
    It seems like it might be quite a basic error but i'm lost, can anyone please shed some light and tell me where i'm going wrong?
    cheers in advance

    hey there, in case anyone was going to reply, i've worked it out now. couldn't work out what was wrong at first so just pulled out all my classes and put them into a brand new jar file. now use javaw -jar instead of java and it worked fine! wierd...

  • Runing jar file on windows ce

    Hi,
    I'm new to Java ME and have a problem. I'm using Eclipse with J2ME plugin and Sun java wireless toolkit for development. I prepaerd a sample hello world midlet and sent the jar file to my mobile device which is a barcode reader with windows ce 5.0 . But I couldn't run the midlet. I think it needs some kind of JVM. I tried CreMe but it only works for java files with main method, it doesn't work for running midlets.
    What should I use to run midlets on this device and where can I download it from?

    Thanks
    I have searched as you said and setup Intent_MIDlet_Manager_11.1.7.1036 to my device. But it gives this error when I try to run "Cannot find 'jmm' (or one of its components). Make sure the path and filename are correct and that all the required libraries are available."

  • Starting Jar-File from webserver - possible?

    Hello to all of you.
    I've got a little problem with an executable Jar-file.
    I need to start it using a URL on an intranet website.
    As long as this link points to a file on a local (or network) drive there is no problem. But I need to launch this application from a webserver (in the intranet).
    The webbrowser won't start it then (security issues I think).
    What can I do? Can I "sign" the Jar-file so the webbrowser recognizes it as somehow "trusted"?
    Do I have to change any client settings?
    Many thanks in advance.

    The Jar contains a small portion of an application we want to run in our network (no access from outside).
    It only contains the GUI the rest is done on a Corba-server / Oracle database.
    We work with a centralized information management system (Hyperwave information server) and were tasked to include the entry point to this application in this (html) framework.
    Stupid idea I know but this idea wasn't ours ;)

  • Executing jar file in windows?

    Hi All,
    I have a jar file (built by Netbeans - if thats of any relevence) that I tried to run in windows, but I get the following error message:
    could not find main class, program will exit!Even though the manifest file in the jar does specify the main class.
    Main-Class: package.MyMainClassThe main class is valid and the jar works fine in linux.
    Does this have anything to do with the fact the manifest text file is in unix format? If not, does anyone one have any ideas whats wrong?
    Thanks!

    LeWalrus wrote:
    Yeah sorry, that's my fault for the confusion.
    in the OP i was just stating the general case, they weren't the actual names. Then I switched to giving the actual names. My bad!
    Basically, The main class specified by Main-Class in the manifest is the main class of the application. The jar file is the only thing referenced in the Class-Path!I don't think your jar file contains the main class or at least it is not in the correct directory. Expand the jar with the jar command (or winzip) to look at the content and make sure the class files are in directories consistent with the package.

  • Clickable jar files for Windows

    Could someone please explain to me, or direct me to a resource that can, how one makes a jar file that executes when double clicked under Win32? I've seen such files, but I don't know if they are proprietary or supported directly by Sun. Thanks,
    Robert Douglass

    You should create you jar file defining the main class in the manifest archive:
    example: creating a executable jar file from a project stored in two directories: "br" and "images"
    jar cmf manifest.mf battleship.jar br images
    jar -i battleship.jarwhere the manifest.mf has the following contents:
    Manifest-Version: 1.0
    Main-Class: br/ufc/lia/gaucho/battle/BattleShip
    Created-By: Felipe Gaucho � 2001
    Sealed: trueNote the Main-class definition in the manifest contents... It makes you jar executable...

  • Problem in jar file with respect to operating systems

    Hi all,
    I am creating a jar file in windows operating system, When I deploy it in AIX machine the application is not starting up? There is any operating system specific commands to create jar files?
    Any ideas.
    Thanx in advance for your help.
    Sekhar

    I am starting the application through websphere admin
    console. When I am starting it is showing error
    message that the application unable to start.That you are using WebSphere is a very important bit of information you failed to provide!
    WebSphere can be configured to be very picky about what it allows! If your program does not require WebSphere to run then try running it outside of WebSphere.
    Also, make sure that the WebSphere container is executing using a version of Java that is compatible with your Application.

  • How can I create a jar file that will run automatically on double click

    all the jars I created run only from the command-line.
    how can I make it run by double-click on it?

    First you will need to associate .jar files with the javaw.exe program in order to just be able to double click on the jar and run it from within a windows explorer application. Next you will need to set the main class attribute of the manifest file. My understanding is that the value of this attribute is used by the launcher to know which class to load. In other words, which is your main application class. To specify this attribute open your manifest file in a text editor. You will find this file located within the jar at META-INF/MANIFEST.MF. Then, add the line,
    "Main-Class:<relative path to the main class>" However, remember not to add the .class extension to the end of the class name.
    In Windows 2000 you can associate jar files with javaw by finding a jar file in Windows Explorer and right clicking it. This will give you a context menu which should have an Open With... option (if you are not using Windows 2000 and don't see the 'open with' menu item, try holding down the shift button while right click on the file). Select the Open With... option, then, when the dialog appears highlight javaw and select the "Always use this program to open these files" checkbox. When you hit the OK button you should have all your jar files associated with the javaw process.
    Once you've done this, you should be able to double click on your jar file and run your application.
    Regards,
    Daniel Walsh

  • Add classpath in an executable jar file

    an executable jar file contains a manifest file with entry main-class: MyApplicationClass.
    if we double click the jar file on Windows OS, main class is loaded.
    my question is:
    if classes in he jar file use classpaths which are not default, how to add those classpaths into manifest file to tell classes to use those classpaths?
    it is similar to command line:
    java -classpath c;\mypackage; .......; MyApplicationClass

    Thanks, i will try soon.
    here is another Q.
    if i need to add tools.jar (JDK lib) as classpath in manifest file, it is as following in my PC
    d:\install\java\jdk14101\lib\tools.jar.
    but my customers install JDK in different path (should be considered as unknown), how to add it as entry Class-path for all customers?

  • Deploying Java Desktop App using executable JAR files

    Hi there.
    Today I am very optimistic about java. I am a beginner, and I had tried (in my few free time) to understand how to deploy java desktop apps.
    I am using the lattest NetBeans IDE to do the programming and it is very very fast and optimized.
    Going to the point, I tried some time ago to deploy an application (made with this IDE) using JAR files, but even though the application run well on my IDE, when I packed it, it rised an error saying that
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    I was using an absolute layout on my JFrame forms and this AbsoluteLayout is provided by netbeans and not by the normal SDK.
    I then looked for the absolute layout class and found a jar file in the following path:
    C:\netbeans\modules\ext\AbsoluteLayout.jar
    So I mounted the Jar file in my File Systems and then added the contents of the file to myApp.Jar file.
    I used the automated Jar Recipe Packaging feature of netbeans, that is why I needed to mount the AbsoluteLayout.jar file into my file systems.
    Now it runs fine by just right clicking the MyApp.jar file from Windows Explorer.
    In a next reply to this topic I will include some sample code so that anybody requiring to do such implementation can take this for help.
    Regards!
    JN

    Well,
    I will take some time here to show the basic source code and procedure to create a desktop application, pack it up in a Jar file for deployment, add other classes or jars to the deployment jar file and finally open the jar file as an executable. This applies for either windows and linux environments.
    Take in count i am using Netbeans IDE 3.x (3.5)
    First I open the IDE and create a new project called MyDesktopApp. This is done by going to the menu Project / Project Manager. Then click on the New button and specify the project name and click on OK.
    At this point, the Filesystems tab in the project explorer is empty. So I mount a directory to store myDesktopApp in it. I selected c:\MyDesktopApp but you can select any name you want.
    To mount the directory you follow these steps:
    1. Right-click on File Systems
    2. From the contextual menu select Mount > Local Directory
    3. In the filechooser window, you just browse it and SELECT the directory to mount. Be aware that you can even create the directory on this window. Do not enter (double-click) into the directory you want to mount, just select it and click on finish...
    4.Then the directory entry appears under the filesystems node of the project explorer.
    Now you have to create your application. You can either create a package (special configured and tracked directory) or you can create the clases directly inside the directory. For tidy project, I will create the package.
    To create the package follow these instructions:
    1. Right-click on the mounted directory and from the contextual menu select New > Java Package
    2. In the New Wizard - Java Package window, type the package name and click on finish. I use the "MyDesktopApp" as package name.
    OK. Now the package is created under the mounted directory. Now we have to create the Main Class. In this case I will use a JFRAME as the main class but you can create any class you want.
    To create the JFRAME as main class follow these steps:
    1. Right click on the java package you just created and select New>JFRAME from the contextual menu. If you do not see the JFRAME option on the NEW sub menu you will have to select the All Templates option. I explain the All Templates option now on, it will be easier to use the JFRAME if available. Once you use JFRAME with the all templates then the JFRAME will show up in further NEW usage.
    2. So finally we used the All Templates, and you select the Java GUI Forms > JFRAME form option and click on NEXT.
    3. Give it a name. (I used MyDesktopAppFrm) and click on finish. Be aware you can set advanced options by clicking on next. But for the purposes of this topic we will use default options so click on FINISH
    4. A new JFRAME form appears inside your package. Right click on the form and select Set layout > Absolute Layout.
    5. Add some controls and code. I added a label and a button. And coded the ActionPerformed event of the button to say hello! on the label. this is up to you. The code just looks as follows:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    jLabel1.setText("Hello folks!");
    6. Compile and execute the form.
    Let's say this is our Desktop Application. Now We will pack it in a Jar in two steps...
    A. Create a JAR file (Recipe)
    1. Right-click on your package and select New > All Tempaltes (Long Route) You can also select New > JAR Recipe if available.
    2. On the New Wizard Window, choose the JAR ARchives > JAR Recipe template and click on NEXT
    3. I used MyDesktopApp as the file name and Defaults and then click on Next.
    4. Specify the JAR Contents. Select the Package (not the mounted folder) from the mounted file system and click on add and then click on NEXT twice...
    5. On the JAR Manifest window, click on GENERATE
    6. Edit the manifest in the window to add the following code:
    Main-Class: MyDesktopApp.MyDesktopAppFrm
    7. Ensure the Main-Class definition is the same as your java package and JFRAME name. Click on FINISH
    8. At this point we have a jar file in your project directory but this file wont run because it is missing some Netbeans clases that we will add in the next set of steps... Just to check, compile the file (right click on the JAR file and compile) and try to execute. It must compile but must not execute.(well if it executes you are done. It may execute if you did not set the lay out of the form as AbsoluteLayout)
    B. Add the AbsoluteLayOut to the JAR
    1. Right click on File Systems and select Mount > Archive Files
    2. Look for your netbeans installation folder and select the following file:
    .../netbeans/modules/ext/AbsoluteLayout.jar
    3. Click on finish
    4. Now the JAR File is mounted in the file systems.
    5. Right-click on your MyDesktopApp.JAR file and select properties.
    6. Look for the contents property click once on it and then on its elipsis button [...]
    7. From the FileSystems box in the Contents window, select the AbsoluteLayOut file and click on Add
    8. Then the system asks you if you are sure. Of course you are so click OK. (If not sure, just read the message text and click OK...:-))
    9. Click on OK
    10. Compile your JAR Recipe (right click on it and Compile)
    11. Now you must be able to run the file by right clicking it and EXECUTE.
    12. Also you must be able to run the file by double clicking the file from a Windows Explorer. You may receive a message asking to select the program to run the file with. You must browse and select the Javaw.exe file in the bin directory of your Java RUn Time installation. This is typically located at C:\j2sdk1.4.0_01\jre\bin or something like that. Use the File-Search feature of window to locate the JAVAW.exe file if needed.
    I hope this long explanation helps somebody to deploy Java Desktop applications. Please reply the message if it helps you just to know it was useful.
    Thanks for your time....
    JN

  • Jar file problem , please help

    Hi guys , i am not sure if i am in the right place to have this post in so i'll give it a try
    i know my explanation might be a shot in the dark but i'll try my best
    i have made a program using eclips , to send emails using my email , on certain conditions
    so when that codition happenes on some class in my program
    this class will call the email class and send an email to someone
    now the problem is not in the program , because as along as this program is in eclips and i run the program in eclips , everything goes fine , No errors what so ever
    but , if i make jar file , using eclips "export"
    once i run the program , the program would run , but once the same condition that ihave specified previously happenes , the current class never calls the email class , and no emails would be sent
    i am very confused wether
    1) it throws a class not found for some wierd reason
    2) or the external library that i used to send emails , is not exported
    i tried to check the CLASSPATH file and i think everything seems to be fine , so i dont know what the problem is
    so in short
    if the program is in eclips , every thign goes fine
    if the program is a jar file , then it would work fine but once it needs to send an email , it never does and i can still work on the program , but no emails will be sent
    thanks please some one help me out with this

    for more information here is the senario
    because i see that you guys are some how lost because i am not providing enough information
    so this is a detailed info of the problem
    i have 3 classes
    1) mybankmain (jframe)
    2) mybankbody (all labels and buttons and events included here)
    now: within some events in my program ,
    it calls a class called.....
    3) myEmail
    this class imports two things that are comming from an external jar file , so in short , if the external jar file is not available the program would complain
    i run this on windows xp (SP2)
    now: if this program runs on eclips , it would do everything it is supposed to do and all kind of calculations will be done and emails will be sent on the conditions that i have specified within the program
    if i make a jar file on windows , and i run the jar file , the file would work , all functionalities will work
    EXCEPT: sending an email
    - either my class is not found
    - or external jar file is not found which causes my class not to be able to perform its tasks
    i did only one test
    which is that i switched the main and i made myEmail as a main and i tried to export the jar file
    Result: jar file doesnt work
    the way i view whatever inside my jar file , i use Winrar and it would view everythign in the jar file and i see that all my classes are included there
    if i open my CLASSPATH , i see that there is a pointer to the external jar file
    if i open my manifest : i DO NOT see the exrernal jar file in there but i do see that its pointing to my main class
    class main : mybankmain
    and there is only the version and signiture
    i hope all these additional details would help in determining the problem that ihave been trying to solve for 2 weeks now

  • Run jar-exe on windows systems.

    Hi. I`m trying to find a way to run jar files on Windows systems. The key is to do so without having installed "explicity" the jre (1.5 or higher) sun installation program. I mean, I want to users be able to run my .jar executable programs on machines where jre isn`t set. I know how to create executable jar programs, but I have no idea about how to change Windows behaviour to instantiate the java virtual machine.
    Help and comments wil be welcome, Thanks and regards.

    Are you trying to run .jar executable on Windows system without JRE installed? Remember, executable jar file contains java classes and they need a JVM/JRE in order to run themselves.
    In plain you cann't run a jar executable without jvm/jre installed.
    Now, on another note, if you are trying to provide user the ability to run jar file without downloading/installing JRE, this forum entry might interest you:
    http://forum.java.sun.com/thread.jspa?threadID=695898

Maybe you are looking for