*.jar file association setting

I use J2Sdk1.3.1_04 with Windows XP professional. I have a problem with the *.jar file association setting and I need someone's help on how to correct this. Anyone?

In Windows Explorer menu: Tools | Folder Options | File Types, select jar file entry, click Advanced, and use what I posted to for the open action.

Similar Messages

  • Making JAR File association under Win32

    Hi,
    Due to an agressive installation of a software on my system, I have lost my file association with jar files.
    May someone help me setting it up again without having to reinstall the jdk by giving the correct parameters. I would appreciate.
    Thank you

    * open my computer
    * select view | folder options
    * select file types
    * locate entry "Executable Jar File", and select edit
    * select actions: open, then press edit
    * browse for javaw.exe
    * After you have browsed for javaw.exe, append to the end of the path the following: -jar "%1" so it looks something like this:
    "C:\Program Files\JavaSoft\JRE\1.3.1\bin\javaw.exe" - jar "%1"
    * click OK, and your done.
    -Ron

  • How to use jar files without setting classpath

    Hi,
    I have a situvation, I can not set classpath, but i have to use jar files, how can I do that.

    URL[] urls = new URL[]{pathToJar, pathToAnotherJar, ...};
    URLClassLoader urlc = new URLClassLoader(urls);
    Now load classes within the jars loaded by the urlc classloader as needed. This is a limited approach, you can mostly use interfaces to work with classes loaded by the custom loader instance above and your existing classes.

  • JAR file association

    Many of my customers have encountered problems with the .jar file extension being hijacked by some other program (usually zip/compression programs). There should be an easy way to restore this association (rather than re-installing Java!).
    If anyone has a simple solution please e-mail me ( [email protected] ).
    Thank you.

    There is. I'm assuming that you're using Windows - just open the Folder Options | File Types, select jar files | Advanced, and restore the open action.
    My XP Pro uses this action:
    "C:\Program Files\Java\jre1.5.0_01\bin\javaw.exe" -jar "%1" %*Replies are only made here, so that others can benefit.

  • Associating executable Jar files w/ appropriate program

    Hi, I'm kinda new to java but this question is more OS related I think. I made a GUI program that reads / writes files and does some other stuff, I compiled it, then made it into an Executable JAR file. I put the file on my dektop w/ the required resource file (contains the read files) and then I double-click it and lo and behold Win-Ace(R) popps up. I right-clicked on the executable jar file, associated it with JAVAW, double-clicked again and it worked. So i guess my question is, is there a way that it will automatically associate itself with the right program so when I give this program to other people, they won't have to associate it the same way?
    Anyhelp would be greatly appriciated!

    No, becourse even if java could do that it would make sence becourse to run the jar it must be associated with javaw.
    But you could try to create a .reg file (registry file) that associate jar with javaw, when somebody runs the reg file it associate jar with javaw.
    But I think you should make different reg files for different windows versions (not sure about that).
    I don't have experience with how to write reg files but you just google.
    But I should try it out on your own windows, you could install windows on another partion and try it out on that one (first make a image with norton gost or something so if something goes wrong you can fastly get back to the old state).
    But you can also export your registry to a file so you can put the old registry back if somethings goes wrong.
    Use these tips on you own risk!!!

  • 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

  • File Associations in CS 5.5 for Win7

    I preordered CS 5.5 Web Premium and just installed it.  I also uninstalled my previous version Adobe suite (CS4).  Now none of the file associations have been made for any of the Adobe related file types.  So for example, psd files are now associated with quicktime.  When I try to change the file association (set it to PhotoShop) it does not allow me to do so.  It acts like nothing happened.  What can I do?  Do I need to uninstall and reinstall?

    I have exactly the same issue affecting InDesign and Illustrator. Photoshop had the same issue but it allowed you to set the default program. It seems the only way to do it is to open the program and open the document from there. This is a complete pain!

  • Jar Files in a Jar File - Classpath Error

    Hi,
    I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able to execute the main file in the application jar file. Then I created another jar file that holds all the dependent jar files the application is dependent on along with the application jar file into one super jar file. configured the main class attribute of the super jar file to that in the application jar file. When I try to execute it, I'm getting an error saying Class Not Found. Can someone guide me in setting the classpath for this super jar file in its manifest file.
    Presently my manifest file classpath variable in the super jar file is set as App.jar Depend1.jar Depend2.jar
    Thanks,
    E H

    Java's standard class loaders do not support jar files inside of other jar files, and will give the error you see.
    You can write your own customized class loader, use a 3rd-party solution (onejar at sourceforge is one), or remove the interior jars.

  • JAR FILE IS NOT DETECTING IN WINDOW

    hi
    I am facing some problems during package creation
    My current J2SDK is 1.5.0_02-b09
    I create one packge called as p1.jar
    It consist of one class & one interface
    sa.java
    package p1;
    public class sa
         private int a,b;
         public sa(int a,int b)
              this.a=a;
              this.b=b;
         public void showval()
              System.out.println(" a="+a+" b="+b);
    sb.java
    package p1;
    public interface sb
       public int s1=34;
       public int s2=43;
       public void  takeme(int a,int b);
    /code]
    I create a jar file and set its path in
    MY COMPUTER ---->advanced --------->Environment & variables ----->classpath
    if i specify  import p1.* in  the following manner import p1.*;
    public class demopack implements sb
         int a,b;
         public demopack(int a,int b)
              this.a=a;
              this.b=b;
         public void takeme(int x,int y)
              a=s1+x;
              b=s2+y;
              System.out.println("a="+a+" b="+b);
         public static void main(String[] args)
                   demopack d=new demopack(10,20);
                   d.takeme(12,23);
                   sa s=new sa(12,23);
                   s.showval();
    Following Error is executing
    Z:\javademo>javac demopack.java
    demopack.java:4: cannot access sb
    bad class file: .\sb.java
    file does not contain class sb
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    public class demopack implements sb
                                     ^
    1 error----------------------------------------------------------------------------------------
    but if i mention import statement in following way there are no error
    import p1.sa;
    import p1.sb;
    public class demopack implements sb
         int a,b;
         public demopack(int a,int b)
              this.a=a;
              this.b=b;
         public void takeme(int x,int y)
              a=s1+x;
              b=s2+y;
              System.out.println("a="+a+" b="+b);
         public static void main(String[] args)
                   demopack d=new demopack(10,20);
                   d.takeme(12,23);
                   sa s=new sa(12,23);
                   s.showval();
    Is above mention problem is version problem
    For user defined package Every time I have to import individual class ?
    Is any alternative Solution (excluding -classpath option of javac)

    Well
    I follow your instruction
    I am pasting the command prompt operation
    Coding is same above
    My all three files (.java )is resides in javath folder
    command prompt code
    Z:\javath>javac -d . sa.java
    Z:\javath>javac -d . sb.java
    Z:\javath>jar -cvf p1.jar p1/*.class
    added manifest
    adding: p1/sa.class(in = 687) (out= 423)(deflated 38%)
    adding: p1/sb.class(in = 185) (out= 153)(deflated 17%)
    Z:\javath>javac demopack.java
    demopack.java:4: cannot access sb
    bad class file: .\sb.java
    file does not contain class sb
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    public class demopack implements sb
                                     ^
    1 error
    Z:\javath>------------------------------------------------------------
    in demopack.java file i want to access class files which are resides in
    jar files
    Actually when we are writing import java.io.*;
    we can access all the class file from that io package
    Same thing i am trying to implement for user defined package
    I hope you understand my question
    regards

  • How to Invoke a main class in a jar file from my project

    Hi
    I am a new user of the Sun Java Studio enterprise. I would like to know how i can invoke a main method in a jar file associated to the project.
    regards
    Nisanth

    Could you please clarify: do you want to run your project or a project from an independent jar?
    In the first case just select Run Project from the project context menu or select a class with main method and click Run File in the class context menu.
    Regarding the second case:
    - I don't think there is such a feature in the IDE (running third party jars is not an IDE function). Could you explain why you need this?

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to access images in a jar file

    Hello,
    I am currently developping a swing application that uses icons (gif files) and I have zipped all my classes and images in a single .jar file.
    When I try to access those files it doesn't work ... it seems that I am not using the right way ...
    Could anyone explain me how to achieve this ?
    thanks in advance

    I get the Images from jar file to set ImageIcon for my components like this:
    ImagesLocator.getImage("imageName.gif");
    anu
    //ImagesLocator.java
    import java.net.URL;
    import java.awt.*;
    import javax.swing.*;
    * Load images from correct place (directory or JAR file) into GUI.
    public class ImagesLocator
         * Load image from correct place (directory or JAR file).
         * @param imageName name of image to be loaded (with no path)
         * @return loaded image
         public static ImageIcon getImage(String imageName)
              ClassLoader cl = ImagesLocator.class.getClassLoader();
              ImageIcon i = new ImageIcon(cl.getResource(imageName));
              return i;

  • Deploying Runnable JAR Files

    I recently started working with Java 8.  I have been doing Java development on and off since the early 1990's.  Most recently I have been doing all my current work in Java 6.  I decided to "take the plunge" and to start getting involved with Java 8.  I have an imaging application for geologic research I started working on in Java 6 and Swing, and I am now continuing that development under Java 8.  It was a pleasant surprise that to find that all of my code built without any changes (I'm using Eclipse Luna and just deleted the Java 6 runtime and added the Java 8 runtime after downloading it).  The application launches fine from inside Eclipse.
    However I ran into a problem when exporting the application from Eclipse to a runnable JAR file and then trying to launch it.  After creating the runnable JAR I was not able to launch it by simply double clicking.  A command line box would open for a second, then close and the application window would never open.  To upgrade from Java 6 to Java 8 I only downloaded the Java 8 runtime environment, not the Java 8 JDK.  I am working in Windows 7 and tried updating the JAR file associations and experimented with various path entries in my environment variables.  No mater what I did I could not simply double click the runnable JAR to launch it.
    Then I deleted all my Java downloads and started over.  This time all I did was downloaded the Java 8 JDK and installed it.  I then pointed Eclipse to the Java 8 runtime environment that was installed with the Java 8 JDK.  My code built and executed perfectly in the Eclipse environment.  Then I exported the the Eclipse project as a runnable JAR again and tried to launch it.  This time it worked as expected.  Double clicking the runnable JAR launched the application!
    So my question is if I want to give this application to someone to run (i.e. deploy it) that is not a developer, do I have to have them install the Java 8 JDK?  I assumed that all someone would need to run the application as a runnable JAR is the Java 8 runtime environment, not the JDK.  However, when I had only the Java 8 runtime environment installed I could not launch the runnable JAR.  With the Java 8 JDK I was able to run the runnable JAR as expected, with no problem.
    Am I missing something?
    Thanks,
    Mike

    I found an answer to my own questions.
    I'm posting what I found to answer my questions so that anyone with a similar question looking here will have an answer.
    The following Oracle link appears to explain everything about deployment that a developer needs to know!
    http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/
    Mike

  • How to handle External Jar files in EJB DC

    I have created a EJB DC.
    I have added the required MDM Jar files to the class path.
    These MDM Jar files are supplied by SAP for integration with Master Data Management.
    But the DC build fails.
    If I create the same project as a <b>REGULAR</b> EJB (non-dc approach)project, everything works fine.
    Qn:
    How to bundle the MDM jars (External jars)in a DC?
    How to create the Public Parts in the DC for the added MDM External Jars?
    How to use the above DC in the EJB DC?
    Basically, I am looking for a step by step procedure,
    to add external jars in a DC.
    And to use the above DC in a EJB DC.
    Any assistance in this regard is appreciated.

    You should not reference the MDM jar files by setting classpath directly. For setting references to it from your EJB DCs , you will have to create a DC of type "External Library". Deploy this DC also before your EJBs are deployed. You will then have to create a public part for this DC and the reference the public part from the DC metadata of the EJB DC ie set the Used DC list of EJB DC to the public part of the ext lib. You will get info about this in NDS help as well on help.sap.com

  • Access denied while loading jar files from client

    I am creating a platform
    that can be started by JWS
    and then load plug-ins from client drive.
    I've signed my platform (packaged as a jar file),
    and set up the security tag in my jnlp,
    so that it can access client files.
    The plug-ins are packaged as jar files.
    And in one of the plug-ins, there is a class that has a JFileChooser field.
    While initializing this field, the AccessControlException is thrown.
    I can't figure out what is wrong,
    So I tried to sign the plug-in, but the problem stands still.
    PS. I have made my own ClassLoader,
    and this platform works well without JWS.
    Please help me, thanks.
    Below is the error message:
    Java Web Start 1.4.2 &#20027;&#25511;&#21488;,&#24050;&#21855;&#21205; Fri Jul 02 01:31:17 CST 2004
    Java 2 Runtime Environment:&#29256;&#26412; 1.4.2,&#20316;&#32773;:Sun Microsystems Inc.
    /*my own log message*/
    2004/7/2 &#19978;&#21320; 01:31:23 pluginmanager.Activater activate /*this is my own classloader*/
    &#37197;&#32622;: activate jar=\Plugins\Common.jar /*load plug-in Common.jar*/
    2004/7/2 &#19978;&#21320; 01:31:23 pluginmanager.Activater activate
    &#32048;&#32251;: collect resources /*collect other jar files needed by Common.jar*/
    2004/7/2 &#19978;&#21320; 01:31:23 pluginmanager.Activater activate
    &#32048;&#32251;: load plugin=\Plugins\Common.jar
    2004/7/2 &#19978;&#21320; 01:31:23 pluginmanager.Activater activate
    &#32048;&#32251;: activating class name=filemanager.FileManager /*instantiate plug-in component*/
    java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.io.Win32FileSystem.getUserPath(Unknown Source)
         ... /*cut*/
         at javax.swing.JFileChooser.<init>(Unknown Source)
         at filemanager.Open.<init>(Open.java:20)
         at filemanager.FileManager.<init>(FileManager.java:38)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         ... /*cut*/
         at java.lang.Class.newInstance(Unknown Source)
         at pluginmanager.Activater.activate(Activater.java:120)
         at pluginmanager.PluginManager$ActivateAction.actionPerformed(PluginManager.java:53)

    When running under Java Web Start, a security manager is installed.
    Since you have created your own classloader, you are responsible for assigning permissions to the classes you load.
    You can change you class loader to extend SecureClassLoader, then override getPermissions:
    protected PermissionCollection getPermissions(CodeSource codesource) {
    PermissionCollection perms = super.getPermissions(codesource);
    /* add whatever permissions you want your code to hance*/
    perms.add( ... );
    /* or just add all-permissions */
    perms.add(new AllPermission());
    or - you can just remove the Security Manager:
    System.setSecurityManager(null);
    /Dietz

Maybe you are looking for