ImageIcon not loading from Jar file

Hi,
I'm developing an application that uses ImageIcons in JButtons.
The images are stored in the following relative dir:
images/<filename>.jpg
They load fine when I run the application from class files in the appropriate directory.
However when I jar everything, my ImageIcons don't load.
I know that my jar file is in the classpath, because other items in the jar file load successfully.
I've tried everything the related threads recommend, but still nothing.
When I try to launch from the jar file, the ClassLoader.getResource("filepath"); returns null.
Whereas when I launch the class files, it returns the correct URL for the image.
What am I missing? Is this jar file security-related? Do I need to sign the jar file with all-permissions?
Any suggestions would be gratefully appreciated.
I'm using java 1.4.2_01-b06
Much thanks,
-Jeroen

Here is a little load program that you can use.
import java.io.*;
import java.util.*;
import java.util.zip.*;
* <p>Resources extracts all the resources from a jar file into binary large
* objects. These objects can be used to create images or read as streams.
* This class is implemented as a singleton model.</p>
* <p>An attempt is made to find the path to the jar file in
* if this file is not found no resources are
* loaded.
* @author Michael Couck
* @version 1.00, 16/01/2004
public final class Resources extends Constants {
      * The only instance of this class
     private static Resources resources;
      * Hashtables for the sizes of the entries in the jar
     private static Hashtable sizes= new Hashtable();
      * Hashtable for each entry in the jar as a blob
     private static Hashtable contents= new Hashtable();
      * Flag to test if the resources were loaded correctly
     private static boolean resourcesLoaded= false;
      * Initilises the <code>static</code> instance of the
      * <code>Resources</code> instance.
     public static void initiliseResources() {
          if (resources == null)
               resources= new Resources();
      * Instanciates a <code>Resources</code> object.
     private Resources() {
          init();
      * Returns a resource as a <code>byte</code> array, which can then be used
      * as a <code>ByteArrayInputStream</code> to instanciate among other things
      * images and property files.
      * @param name a resource name. This is the path to the recource from the
      *         root of the jar file.
     public static byte[] getResourceAsByteArray(String name) {
          if (resources == null)
               resources= new Resources();
          return (byte[]) Resources.contents.get(name);
      * Returns true if the resources were correctly loaded
     public static boolean resourcesLoaded() {
          return resourcesLoaded;
      * Reads the jar file and inserts the contents
      * into the Hashtables.
     public void init() {
          try {
               //Sizes into the table     
                                                                File jar= new File("[path to]/yourjar.jar");
               if (jar != null && jar.exists()) {
                    //Found the path to this jar file
                    ZipFile zipFile= new ZipFile(jar);
                    Enumeration enum= zipFile.entries();
                    while (enum.hasMoreElements()) {
                         ZipEntry zipEntry= (ZipEntry) enum.nextElement();
                         sizes.put(
                              zipEntry.getName(),
                              new Integer((int) zipEntry.getSize()));
                    zipFile.close();
                    //Contents into the table
                    FileInputStream fis= new FileInputStream(jar);
                    BufferedInputStream bis= new BufferedInputStream(fis);
                    ZipInputStream zis= new ZipInputStream(bis);
                    ZipEntry zipEntry= null;
                    while ((zipEntry= zis.getNextEntry()) != null) {
                         if (zipEntry.isDirectory()) {
                              continue;
                         int size= (int) zipEntry.getSize();
                         // -1 means unknown size.
                         if (size == -1) {
                              size=
                                   ((Integer) sizes.get(zipEntry.getName()))
                                        .intValue();
                         byte[] blob= new byte[(int) size];
                         int readBuffer= 0;
                         int buffer= 0;
                         while (((int) size - readBuffer) > 0) {
                              buffer=
                                   zis.read(blob, readBuffer, (int) size - readBuffer);
                              if (buffer == -1) {
                                   break;
                              readBuffer += buffer;
                         contents.put(zipEntry.getName(), blob);
                    resourcesLoaded= true;
          } catch (NullPointerException e) {
               Constants.logger.severe(e.getMessage());
               StackTraceElement[] stackTrace= e.getStackTrace();
               for (int i= 0; i < stackTrace.length; i++) {
                    Constants.logger.severe(stackTrace.toString());
               resourcesLoaded= false;
          } catch (FileNotFoundException e) {
               Constants.logger.severe(e.getMessage());
               StackTraceElement[] stackTrace= e.getStackTrace();
               for (int i= 0; i < stackTrace.length; i++) {
                    Constants.logger.severe(stackTrace[i].toString());
               resourcesLoaded= false;
          } catch (IOException e) {
               Constants.logger.severe(e.getMessage());
               StackTraceElement[] stackTrace= e.getStackTrace();
               for (int i= 0; i < stackTrace.length; i++) {
                    Constants.logger.severe(stackTrace[i].toString());
               resourcesLoaded= false;
} //End Resources
You can get the icons with "new ImageIcon(new ByteArrayResources.getResourceAsByteArray(String name));
See ya
Michael

Similar Messages

  • GIF files not loading from jar in Netscape

    Hi,
    I have a jar file that contains my applet code(class files) and a bunch of gif files. I load the image using the URL returned from getCodeBase() method. The images load fine in Explorer but they do not show up in Netscape. The class files and gif files are not in separate directories and getCodeBase is returning the correct URL of my server(Example: http://www.myserver.com). Does anyone know how to fix this? I also noticed that download time did not improve on either browser when I bundled all the gif file in the jar rather than place them outside the jar file. Isn't bundling them in the jar supposed to save multiple requests back to the server to get the gifs and thus reduce download time? Thanks in advance.

    There the sample from Netscape: http://developer.netscape.com/docs/technote/java/getresource/getresource.html#classloader

  • Java applet won't load from Jar file

    Hi all,
    I have a problem which I didn't used to have. I have written an applet which used certain classes stored in directories. It used to work just fine. I recently updated the main class from which the applet starts and since then I get error messages:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    User home directory = /Users/benoize
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class WiaRekenToolHC.class not found.
    java.lang.ClassNotFoundException: WiaRekenToolHC.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:687)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3046)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1498)
         at java.lang.Thread.run(Thread.java:680)
    Exception: java.lang.ClassNotFoundException: WiaRekenToolHC.class
    As you can see it says that it can't find the class WiaRekenToolHC, but it's there in the jar files.
    Here is the link where you can see it:
    www.creativemathsolutions.nl/demo/HC/demo.html
    The jar files are in the directory HC and Generic.
    If you need more info then let me know!
    Regards, Benoit

    <applet
      codebase="http://www.creativemathsolutions.nl/demo/HC"
      code="WiaRekenToolHC.class"
      ARCHIVE="HC/wia_hc_archive_v0_3.jar, Generic/wia_archive_v0_3.jar"
      width=900 height=600>The code-base combined with archive href for the first Jar mean the JRE will look for it at:
    http://www.creativemathsolutions.nl/demo/HC/HC/wia_hc_archive_v0_3.jar
    It is not there. The other Jar is also missing from the stated location.

  • Jinit not loading webutil jar files

    Hello,
    Our Application Server has had webutil installed on it for quiet some time now. I am implementing a custom Banner Form that requires webutil functionality. Well the form is all set, but the webutil portion does not function correctly. I have been working with the designers of this application and they recommended I make sure that my archive_jini and archive parameters be set in the file /u01/app/oracle/product/10gASforms/10.1.2/forms/server/formsweb.cfg as follows:
    archive_jini=banicons.jar,bannerui.jar,banspecial.jar,banorep.jar,frmall_jinit.jar,gwucustom.jar,frmwebutil.jar,jacob.jar
    archive=banicons.jar,bannerui.jar,banspecial.jar,banorep.jar,frmall.jar,gwucustom.jar,frmwebutil.jar,jacob.jar
    so I set these up as requested. When I look at my Java Console I only see the following load:
    banicons.jar, bannerui.jar, banspecial.jar, banorep.jar and frmall_jinit.jar
    I do not see gwucustom.jar, frmwebutil or jacob.jar load.
    Is there something I am missing? Do I have to restart the Application Server?
    Thank you much in advance for any guidance anyone can provide!
    -Stan

    I actually corrected this issue myself.
    In the formsweb.cfg file I added these properties under the default section.
    There is a section called jinit_pprd (My Pre-Production test server, I added these values under there and the .jar files are now loading.
    -Stan

  • Not loading from flat file using SQL*Loader

    Hi,
    I am trying to load from an excel file.
    first i converted excel file into csv file and save it as as dat file.
    in the excel file one column is salary and the data is like $100,000
    while converting xls to csv the salary is changed to "$100,000 " (with quotes and a space after the amount)
    after the last digit it will put a space.
    in the control file of sql*loader i had given
    salary "to_number('L999,999')"
    my problem is the space after the salary in the dat file.---> "$100,000 "
    what changes i have to make in the to_number function which is in the control file.
    Please guide me.
    Thanks & Regards
    Salih KM
    Message was edited by:
    kmsalih

    Thanks a lot Jens Petersen
    It's is loading ..........
    MI means miniute.
    am i correct.
    but i didn't get the logic behind that.
    can u please explain that.
    Thanks & Regards
    Salih KM

  • Applet not loading from JAR?

    Well, I've been having a bit of a problem with embedding my applet into a webpage. My applet tag looks like this:
    <applet archive="poke.jar" code="a.class" width=550 height=600>
    <param name=cachelistsrcdir value="http://io9labs.com/poke/cache">
    </applet>and when I access the page, I set the trace level to 5 in the Java Console, and look into it and see the following:
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@61db2b
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@1df377e, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@1df377e
    basic: Current classloader cache size: 3
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    basic: Joined applet thread ...
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1df377e, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@c710ba
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: completed perf rollup
    network: Cache entry not found [url: http://io9labs.com/poke/a.class, version: null]
    network: Connecting http://io9labs.com/poke/a.class with proxy=DIRECT
    network: Connecting http://io9labs.com/poke/a.class with cookie "PHPSESSID=831a2067577cfe38db085b2566c36631"
    network: Cache entry not found [url: http://io9labs.com/poke/a/class.class, version: null]
    network: Connecting http://io9labs.com/poke/a/class.class with proxy=DIRECT
    network: Connecting http://io9labs.com/poke/a/class.class with cookie "PHPSESSID=831a2067577cfe38db085b2566c36631"
    load: class a.class not found.
    java.lang.ClassNotFoundException: a.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    basic: Exception: java.lang.ClassNotFoundException: a.classIt seems as though it's trying to load the applet from the actual directory, instead of the JAR. Any ideas on why this is happening? Thanks in advance for your help.
    Also, the applet is located at http://io9labs.com/poke/

    I'm using Mozilla Firefox 3.0.1 on Windows XP with SP2. I tried running it with IE7 and it gives me the same exact problem. It can't be my browser because it loads JAR'ed applets on any other webpage just fine.
    I tried it with a non-obfuscated JAR, and it STILL gives me the same error. Do you have any ideas as to why it would choose to ignore the archive attribute?
    EDIT: I think it might be because I signed it improperly, lemme try that.
    EDIT2: Nope, still doesnt work
    EDIT3: Problem solved, it was because the JAR needed a unique name, and i already had a jar of the same name in my cache.
    Edited by: io9_ on Aug 20, 2008 11:17 AM

  • Loading library from jar file

    Hi all,
    My question is can we load library from jar file using System.load() method.
    ex:
    myJar.jar
    |
    |----com.test.common.Util
    which conatins a method to load library from jar file itself, before that i used to load from File
    |---libraries/MozillaParser/......
    Iam able load from Local system,
    File parserLibraryFile = new File("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    File mozillaDistBinDirectory = new File("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(parserLibraryFile.getAbsolutePath() , mozillaDistBinDirectory.getAbsolutePath());
    but i am unable to load from jar file
    URL url = ClassLoader.getSystemClassLoader().getResource("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    URL url1 = ClassLoader.getSystemClassLoader().getResource("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(url.toString(), url1.toString());
    Thanks in advance.

    That's a really confusing post.
    The easiest way to make sure you can use the classes in a jar file is to copy the jar file to the "/jre/lib/ext" subfolder of your JDK. These classes will be visible to all applications.

  • Problem loading image from jar file referenced by jar file

    First, I searched this one and no, I didn't find an answer. Loading images from jar files has been pretty much done to death but my problem is different. Please read on.
    I have my application, a straight up executable running from Eclipse. It uses a jar file, call it JarA. JarA launches a GUI that is located in another jar file. Call it JarB. To recap:
    My application calls JarA -> JarA loads classes from JarB -> JarB looks for images to place in a GUI it wants to show on the screen
    When JarB goes to load an image the following happens:
    java.lang.NullPointerException
         at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
         at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
         at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
         at java.lang.ClassLoader.getResource(ClassLoader.java:977)
         at org.cubrc.gmshell.gui.MainWin.preInit(MainWin.java:152)
         at org.cubrc.gmshell.gui.MainWin.<init>(MainWin.java:135)
    The code from JarB that loads the image looks like this:
              URL[] oSearch = {Main.class.getResource("images/")};
              URLClassLoader oLoader = new URLClassLoader(oSearch);
              imgIcon = new ImageIcon(oLoader.getResource("icon.gif"));
              imgMatchRunning = new ImageIcon(oLoader.getResource("gears.gif"));
              imgMatchStill = new ImageIcon(oLoader.getResource("gears-still.gif"));
              imgMagnify = new ImageIcon(oLoader.getResource("magnify.gif"));This looks right to me and JarB certainly has an images directory with those files. But I'm in hell right now because I don't know where to place the images to make this work or if you can even attempt to load images with a dependency chain like this.
    Any help very appreciated!

    Have you tried to move your image-files out of the jar file and place them in the sam folder as the jar-file? I think that would help.
    When you try to load the image-file you get the NullPointerException because the program tries to read a file it can't find. Remember that a jar file IS a file and not a directory.
    If you want to read somthing inside the jar-file you need to encode it first.
    Have you tried to read the jar-file with winRar. It makes it easy to add and remove files in your jar-file.

  • Problem loading Applets from Jar files on 64 bit machine

    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases. The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Below are all of my test results. Can someone provide a suggestion for repairing this? The Windows Server machine is a clients computer I access to it via remote desktop but I can't do much with it though I do have administrator rights. The Windows 7 machine is my development platform so I have been able to do extensive testing on it.
    This problem is presenting in the following environments when trying to load an applet from JAR files in a HTML document using the Applet or Object tag.
    Windows Server 2008 (Intel Chipset)
    Tested Browsers:
    Internet Explorer 9 (32 bit) - Shows it is blocked by default then simply shows an x when loaded from a web page, same result when loading from local drive.
    Windows 7 Home Premium (AMD Chipset)
    Tested Browsers:
    Firefox 6.0.1 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (64 bit) - Java logo shows with spinner and most of the windows desktop manager freezes, keyboard is the only thing that responds so you can alt-tab to another app to regain control of the desktop.
    Chrome (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    The only way I have been able to get a Java applet to run on a 64 bit machine are the following ways.
    Firefox 9 nightly (64 bit) works perfectly! Go Firefox!
    Internet Explorer 9 (32 bit) loading directly from drive (c:\...)
    Chrome (32 bit) loading directly from drive (c:\...)
    Firefox 6.0.1 (32 bit) loading directly from drive (c:\....)
    Can someone please help! I've been fighting with this bug for over a week and I can't find anything that will solve it, I have noticed that in some cases if my jar has very little code in it than it will run on the server, but the minute I start adding things to it the jar won't load anymore.

    jschell wrote:
    rritoch wrote:
    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases.
    To clarify...
    1. You have tried it on 32 bit machine? Exactly which OS?I tested this on Windows Vista Business which is in 32 bit mode and the applets run without any problems
    >
    2. Your only 64 bit tests have involved 2008/Win7?
    If so then I would suspect something with windows not java. Probably permissions.
    The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Yes, I haven't tried running the jars on other operating systems.
    >
    I don't understand that. If you are running on localhost then you should connect to localhost. If running on an IP then you should connect to that. Perhaps you meant that you have tested using both of those?I'm testing using the lan ip address but I'm connecting from the same machine. I've tried localhost and that didn't work so I tried lan ip since that will likely have a different java security context than localhost. At first I was blaming the IIS server but I downloaded the jar directly and using HTTP fox was able to verify that the jar is being sent with the correct mime-type and that the server can upload the jar file without a problem. This leaves me to believe the problem is with Java.

  • Counters not loading from saved PerfMon html settings file in IE

    The Settings html file is hosted on our internal trusted web server, the perfmon interface loads but no counters load.
    If I right click and go properties there are no counters configured. If I add a counter that works, but upon reloading the page the counters do not load from the HTML source file.
    I check the source of the HTML, and the counters are there, but aren't loading.

    if you open the file from a local drive it does work, but I cant get it to work from a network folder.

  • Elements 12 does not load my raw files from my D610

    Raw files not loaded from my D610 into Elements 12

    Editor>help>updates to update camera raw to 8.3.

  • Cannot load component from JAR file.

    I got the message : cannot load component ... from JAR file. The class must be compiled and must be on the classpath of the project...
    I just add a javabean from a JAR file from Palette manager, then drag and drop it, then got this message.
    Can anyone tell me what i was wrong ? Thank you.

    Hi,
    You should paste your error log here to easy for other to help you.
    For your scenario, it is a big chance you didn't include the jar file into your classpath, please check.
    Thanks.

  • Crystal Report not works in JAR File

    I'm using Eclipse All in one, which includes Crystal Reports.. I Connected my Java program with Crystal Reports and its working properly. Now my problem is that the Report is not working in JAR files.. It throws some exception as
    "com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects
    com.businessobjects.reports.sdk.JRCCommunicationAdapter---- Error code:-2147215357 Error code name:internal"
    Whats the Error.. I don't know. I think that i may missed some CLASSPATH Files. The included CLASSPATH Files are:
    ReportViewer.jar
    jrcerom.jar
    Concurrent.jar
    CrystalCharting.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalExporters.jar
    CrystalExportingBase.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    keycodeDecoder.jar
    log4j.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    Serialization.jar
    URIUtil.jar
    xercesImpl.jar
    xml-apis.jar
    and the mysql-connector jar file
    Anybody help me please...

    Unable to load database connector
    'com.crystaldecisions.reports.queryengine..driverImpl.
    DriverLoader
    now you have any idea.. pleaseIs that a typo where you have two periods below?
    queryengine..driverImplOther than that I don't think anybody here can help you with that. If your classpath includes all necessary JAR files and you are able to access all your resources from within your application JAR file, then I imagine there is a problem with the third-party crystal decisions JAR file or how you are attempting to use it.
    My advice to you is to try and contact support with the vendor or provider of this API or possibly try posting on a support forum on their website to see if somebody can help you there.

  • How to load a Jar file in the class path?

    How to load a Jar file which contains class files, images, etc.. in the classpath without using URLClassLoader.

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • Please I can not get a .jar file to run on XP SP3 start/run/cmd/

    I can not get a .jar file to run on XP SP3 start/run/cmd/
    Please help if can figure this out. I'm convinced it is a Windows XP SP3 problem from searching on google and seeing other ppl on XP SP3 with same problem (but no working solution for myself). I'll try to be complete-listing all I've done.
    I had installed: Java SE Runtime Environment v6u14 for Windows Multi-language
    I had checked here it was working properly: http://www.java.com/en/download/manual.jsp
    I'm trying to run this jar file (soht-client-0.6.2.jar):
    http://prdownloads.sourceforge.net/telnetoverhttp/soht-java-client-0.6.2.zip?download
    http://www.ericdaugherty.com/dev/soht/javaclient.html < this is the information for the program.
    (yes the file can be executed and should open the program's window
    I wanted to post screenshot of it but friend that it's working for isn't here)
    _(Please find log of all cmds I did in this post here: http://pastebin.com/f792983df )_
    _I have extracted +'all' the files to: C:\062\+_ (I have tried using other directories, same problem)
    ++I then start/open/run/cmd+
    then I: cd C:\062\+
    then I try various commands - all+ of these do absolutely nothing- meaning no errors, no reply, no window opens, nothing except enters that directoy again:
    java -jar soht-client-0.6.2.jar
    java -jar -client soht-client-0.6.2.jar
    java -client -jar soht-client-0.6.2.jar
    java -jar soht-client-0.6.2.jar soht.properties
    soht-client-0.6.2.jar
    So I try this cmd: java soht-client-0.6.2.jar
    Reply:
    C:\062>java soht-client-0.6.2.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: soht-client-0/6/2/jar
    Caused by: java.lang.ClassNotFoundException: soht-client-0.6.2.jar
    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)
    Could not find the main class: soht-client-0.6.2.jar. Program will exit.
    I try this cmd:
    java -jar soht-client-0.6.2.jar -client
    Reply:
    C:\062>java -jar soht-client-0.6.2.jar -client
    Unable to load configuration file: -client - java.io.FileNotFoundException: -cli
    ent (The system cannot find the file specified)
    SOHT Java Client
    The SOHT Java Client requires a properties file. Either start
    the application in the same directory as the soht.properties
    file, or specify the file name on the command line:
    java -jar soht-cleint-<version>.jar c:\soht.properties
    So then I do these cmds which produce the exact same error/reply just above; Unable to load..:
    j_ava -jar soht-client-0.6.2.jar -client soht.properties_
    java -jar soht-client-0.6.2.jar -client C:\062\soht.properties
    So then I copy soht.properties to C root and do:
    java -jar soht-client-0.6.2.jar -client C:\soht.properties <same error as above
    Then from other information I have read I right click on the .jar file, select open with Always open with:
    _"C:\Program Files\Java\jre6\bin\javaw.exe"_
    Try again.. same problem.
    Then I do cmd:
    _"C:\Program Files\Java\jre6\bin\javaw.exe" -jar "C:\062\soht-client-0.6.2.jar"_
    does nothing, retry the other commands same thing (either nothing or those same replies)
    Then I read (http://forums.sun.com/thread.jspa?threadID=5384879) someone had the same problem as I and they solved it by uninstalling all Java/reboot/ then install JDK 6 Update 14 with NetBeans 6.5.1 start NetBeans and then it worked for them.
    So I unistalled all Java, rebooted and gave the cmd another try (before re-installing), now a new error, of course:
    C:\062>java -jar soht-client-0.6.2.jar
    'java' is not recognized as an internal or external command, operable program or batch file.
    Then I install  Java SE and NetBeans Cobundle (JDK 6u14 and NB 6.5.1) Final Release/ reboot/ open Netbeans/
    go to test java page; all is good, run cmds again -and still nothing..
    C:\062>java -version
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
    I reassociate program with: C:\Program Files\Java\jre1.6.007\bin\javaw.exe_
    same thing.. nothing
    Thank you very much for your time :D_
    PS. My computer has been newly reformatted so needing another reformat I'm sure is not the solution.

    Thank you very much for your replies Taggert_77 & swmtgoet_x :D
    Taggert77_: I have never used NetBeans. I only installed it in the bundle as I had read on another post that somehow installing the bundle magically helped another user with the same problem (he didn't know why it worked after that either).
    Before XP SP3 I was able to execute .jar file through cmd prompt. Now I am not.
    This file is executable, grab it and you will see. Here is a screen shot (program in front is FlashFXP, behind is the cmd prompt and what should happen):http://www.freeimagehosting.net/uploads/53273b4ddf.jpg
    swmtgoetx_: I only did the other cmd's to try to make it spit out something, anything lol :D
    The proper cmd is simply: java -jar soht-client-0.6.2.jar
    I did give your cmd a try, and it produced nothing :( (just like the other correct cmds)
    java -client -jar soht-client-0.6.2.jar soht.properties
    Thank you again...the mystery remains
    PS. If you do a search for this you'll find an amazing amount of XP SP3 users with the same problem and no solution posted that I could find except one chap that did the unistall install order that I did above).

Maybe you are looking for