JRE 1.3.1 Bug May Screw Up Your Executable JAR File

Hi;
I just submitted this bug report to sun.
It could save you a lot of pain.
If you have both the JDK and a seperatley obtained Sun JRE on your computer you could build a deprecated code and not know it until you distribute your app to your user or remove jdk\bin from
your class path.
======================================================================
Bug Report: JDK 1.3.1 doesn't match JRE 1.3.1
======================================================================
Hi;
I discovered that the jre ( java.exe, javaw.exe ) that comes with the
jdk 1.3.1 supports a deprecated option that the stand alone jre 1.3.1
does not. Not all jre 1.3.1's of the same build are the same.
In the jre that comes with jdk 1.3.1 you can execute code that uses
"Cp850" for character encoding. In the stand alone jre 1.3.1 you
cannot and get an exception thrown.
This is a particularly insidious bug as many java programmers have
both the jre that comes with the jdk and a stand alone version on
their computers( for example, getting the java plugin for your browser).
You can easily compile, run, and distribute java code that you think will
work with the jre 1.3.1 only distribution....but will not.
I figured this out ( after much pain ) after taking the c:\jdk\bin out
of my path. The same code which execute with the jdk's jre, failed
with the same version sun jre that I got as a separate distribution.
Here is the chunk of code where I discovered this. I have put the
block of code between "=======" lines. The code is further followed
by more explanatory details:
================================================================
public static void main(String argv[])
String result = " ";
// Read The Input File Into A String
try
FileInputStream file = new FileInputStream ("in.txt");
DataInputStream in = new DataInputStream (file);
byte[] b = new byte[ in.available() ];
in.readFully (b);
in.close ();
//result = new String (b, 0, b.length, "US-ASCII");
result = new String (b, 0, b.length, "Cp850");
System.out.println(result);
catch ( Exception e )
e.printStackTrace();
=================================================================
I ran the command "java -version" on both jre 1.3.1 s just to make
sure that each jre 1.3.1 was the same. The output of "java -version
was identical:
From:
C:\Program Files\JavaSoft\JRE\1.3.1\bin\java.exe ( & javaw.exe )
=========================================================
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
From:
C:\JDK\bin\java.exe ( & javaw.exe )
=========================================================
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
My apologies if this "bug" is really an illusion of my ignorance.

Try making sure you have a 'i18n.jar' file in either the JDK or JRE's 'lib' directory (depending upon which one you're using).

Similar Messages

  • Why are all jar files not compressed in the JRE installer?

    I used 7zip to unpack jre-6u12-windows-i586-p.exe (Oracle JRE Installer). On unpacking, I got a core.zip, a zipper.exe and a few other files.
    Again on exploding core.zip I found a few things. core.zip contains all the jar files just like it would be after installation except for 7 jar files.
    charsets.jar
    deploy.jar
    javaws.jar
    jsse.jar
    localedata.jar
    plugin.jar
    rt.jar
    Instead of these jar files there exists the corresponding packfiles
    charsets.pack
    deploy.pack
    javaws.pack
    jsse.pack
    localedata.pack
    plugin.pack
    rt.pack
    I think these are files created by pack200.exe & unpack200.exe is run on them after installation to create the corresponding jar files.
    So now I have a few questions
    Why are only these 7 files run through pack200.exe. I assume its because they are bigger than other files. But it wouldn't take that much effort to pack all jar files & unpack them after installation.
    The .pack extension suggests that these are packed but not gzipped. Again why would Oracle not do a gzip also? for eg with rt.jar packing reduces size from 45 MB to 12 MB, while adding gzip also reduces it to 6 MB.
    Edited by: 966944 on Oct 22, 2012 8:19 AM

    Whatever the truth of all this may be, you won't find it here. This is a user to user forum, not Oracle support or a channel to the developers. All you will get here at best is valid post hoc reasoning: at worst, guesswork. And if you're trying to bring this issue to Oracle's attention, again this isn't the place to do it. Locking the thread.

  • Upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy

    Hi All,
    upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy button.
    This is the issue which I am facing while working with SharePoint 2010. In a sharePoint 2010 document library I am having an excel file and I am trying to open it from Windows 7 and is office 2010.
    I cam e across few suggestion as mentined below but unable to find the location where to do
    Go to Resource Policies > Web >
    Rewriting > Custom Headers > (if 'Custom Headers' is not visible, click
    Customize on the right top to enable the view).
    Create a new policy with the Resource as <fully qualified domain name of the SharePoint server:*/*> (for example https://sharepoint.juniper.net:*/* ).
    Create the action as Allow Custom Headers.
    Apply the settings to the required roles.
    Please suggest.

    Hi rkarteek
    All things you have to do is as follows:
    1. Open regedit.exe
    2. Naviagate to following key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\Internet]
    3. Click Edit Menu -> New -> DWORD with name of "FSSHTTPOff"
    (without quotes)
    4. Click on "FSSHTTPOff" and enter value of 1
    5.
    Close any Office Applications and browser sessions
    6. Try to reopen your document (no more read only or failure to upload)
    have a nice day!

  • HELP!!! Could someone help me with a jar file issue and JRE 1.3 & 1.4

    We had a problem with the last Oracle patch in that it tried to extract from a jar file using the "jar" executable. But the jar executable is not installed on the server where we have JRE 1.4
    On one server, Jar.exe is installed where we have JRE 1.3. Is the jar.exe apart of JRE 1.4? If so, where do I find the jar.exe file? If it's not part of JRE 1.4, what do I need to do to get the jar.exe onto the server where JRE 1.4 is installed?
    Thanks, Carl

    Thanks for your replies.
    I know that a jar file is like a zip file but I'm asking, "Can you download just the jar.exe without downloading the JDK?"
    I keep reading everywhere that you can only get the jar.exe tool if you download the JDK but I can't use JDK(because it is a compiler) on our website here at work.
    Thanks,
    Carl

  • HELP!!! Could someone help me with a jar file issue and JRE 1.3 and JRE 1.4

    We had a problem with the last Oracle patch in that it tried to extract from a jar file using the "jar" executable. But the jar executable is not installed on the server where we have JRE 1.4
    On one server, Jar.exe is installed where we have JRE 1.3. Is the jar.exe apart of JRE 1.4? If so, where do I find the jar.exe file? If it's not part of JRE 1.4, what do I need to do to get the jar.exe onto the server where JRE 1.4 is installed?
    Thanks, Carl

    The jar tool isn't part of the jre but the jdk. You should find it on your server in %ORACLE_HOME%\jdk\bin (seems you use some kind of Windows).

  • I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Is Apple aware of this problem? No longer supported?

    My web page uses a Java Applet to allow my visitors to replay chess games; the Chess Viewer Deluxe applet was written by Nikolai Pilafov some time ago and has been working properly for some time (until recently). I don't monitor this part of my site regularly so I am not sure when it began to fail. On his web site [http://chesstuff.blogspot.com/2008/11/chess-viewer-deluxe.html] he has a link to check LiveConnect object functionality (which fails for OBJECT tags). His recommendation is to "seek platform specific support which might be available from the JRE developers for your platform".
    I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Until I checked the LiveConnect object functionality, I was unable to identify the source of the console error messages. This does seem to be the smoking gun.
    Is Apple aware of this problem? Are these classes no longer supported? Has anyone else had this problem? You can attempt to recreate the problem locally by going to my web page: http://donsmallidge.com/DonSmallidgeChess.html
    Thanks in advance for any help you can provide!
    Abbreviated Java Console output:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    load: class ZeroApplet.class not found.
    java.lang.ClassNotFoundException: ZeroApplet.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)
    load: class JavaToJS.class not found.
    java.lang.ClassNotFoundException: JavaToJS.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)

    I just went up to check the LiveConnect object functionality page AND IT WORKED THIS TIME! I must confess, this is very mysterious. I will do some more checking and reply here if I can determine why it is working now (and more importantly, why it didn't work before).

  • Java\jdk1.6.0_02\jre\lib\ext\mysql-connector-java-5.1.16-bin.jar was unexp

    Hello, please i am new to Jdeveloper and weblogic servers and i developed an application using jdeveloper and when i try to run the application it brings up this error message
    "*** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    C:\Users\Lucky\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    \Java\jdk1.6.0_02\jre\lib\ext\mysql-connector-java-5.1.16-bin.jar was unexpected at this time.
    Process exited."
    I tried deleting the jdk1.6.6.0_02 and tried it again but it still did not run, I also uninstalled the JDeveloper and weblogic server and reinstalled them but the error message still pops up. Please i need help to fix this.
    Thanks.
    Edited by: Chinedu on Feb 21, 2013 8:48 AM

    Andrew,
    Thanks for the lightning response... but the problem has been solved.
    I rebooted again, and installed again (didn't download again because the filesize checked out) and now it works fine, and I'm none the wiser as to the root cause of the problem, except that rt.jar has magically appeared:
    C:\Users\Administrator>dir "C:\Program Files\Java\jre6\lib\*.jar"
    Volume in drive C has no label.
    Volume Serial Number is 00AC-1BC7
    Directory of C:\Program Files\Java\jre6\lib
    08/11/2009  06:38 PM         6,685,813 charsets.jar
    08/11/2009  06:38 PM         2,989,538 deploy.jar
    08/11/2009  06:38 PM           716,841 javaws.jar
    08/11/2009  06:38 PM            88,256 jce.jar
    08/11/2009  06:38 PM           558,189 jsse.jar
    08/11/2009  06:38 PM               382 management-agent.jar
    08/11/2009  06:38 PM         1,704,664 plugin.jar
    08/11/2009  06:38 PM         1,115,985 resources.jar
    08/11/2009  06:38 PM        44,295,255 rt.jar                             <<<<<<<<<<<<<<<<<<
                   9 File(s)     58,154,923 bytes
                   0 Dir(s)  115,454,173,184 bytes freeSOOOO... I presume that the installer failed on rt.jar, probably because something (something in my start-up, I suppose) was using the JRE while the instal was running... but I didn't do anything different the second time (to the best of my knowledge).
    Thanks anyways... My hair (what's left of it) greatly appreciates your time.
    Cheers. Keith.

  • JAR files just won´t run, multiple systems, JRE & JDK installed.

    Hi!
    I´ve been looking on many different places for an answer for this issue:
    I have to run different JAR files for applications, one is from Apache ActiveMQ, and the other is a hash calculating app. I´ve read on many topics that if you get error "Failed to load Main-Class" when running a JAR, the problem is how the JAR was packed (MANIFEST). Well, I find highly unlikely that two different JARs, from different sources, are wrongly packed. Also, I´ve installed JRE, JDK and even Java EE, on MS Server 2003 and on Windows 7 (on this last one only JRE), and no JAR runs. I´ve tried declaring PATH and JAVA_HOME environment variables... no use. Can anyone help me solve my problem?

    Hi,
    You might want to look in your control panel for 'Java' icon. It should give you an option to enable java plugin into your browser. Let me know if you still face the issue.
    Thanks!

  • Jar files download problems in Java Webstart with JRE 1.6

    We have encountered a few problems in Java Webstart with JRE 1.6
    In JRE 1.5, the jar files are getting downloaded onto the client
    machine with it's original names.
    Example :
    Server File Name : acm.jar
    Client File Name : RMacm.jar
    But in JRE 1.6, the jar files are getting downloaded with improper file names.
    Example :
    Server File Name : acm.jar
    Client File Name : 4fb074cc-66fc7407
    Moreover the path itself seems to be invalid.
    Example Path :
    JRE 1.5 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\javaws\https\D17.16.23.11\P443\DMtest\DMwebStart
    JRE 1.6 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\6.0\12
    Due to this, we are facing Classpath problems.
    What changes do we have to make to the code, for Java
    Webstart to work ?
    We are using JBoss 4.0.4 and JDK 1.5 in the Server
    On the client machine, we have IE 6 and JRE 1.6.01
    Help would be appreciated.

    Ask your Java Web Start question at:
    http://forum.java.sun.com/forum.jspa?forumID=38

  • When re-installing JRE 1.2.2 I get an error "can't create JAR file"

    When I uninstalled Java Runtime 1.2.2 and reinstalling, at the end of the installation I get an error:
    "Error while creating JAR file.
    Check you have enough disk space.
    See c:\winnt\temp\uncrunch.log for details"
    Only trouble is I've got 14 GB open and the uncrunch.log file isn't even created.
    Any suggestions or help would be greatly appreciated!
    Johan

    I am also getting a similar error with JRE 1.3.1
    I actually get an uncrunch.log:
    Running uncrunch
    lpCmdLine = "C:\Program Files\JavaSoft\JRE\1.3.1\tmp\rt.out" "D:\\rt.jar"
    Crunching from C:\Program Files\JavaSoft\JRE\1.3.1\tmp\rt.out to D:\\rt.jar
    Temporary file = D:\\rt.tmp
    Couldn't open output file "D:\\rt.tmp"
    The only problem is that D: is a CD ROM drive. Don't know why it is trying to use D:
    Any one have any ideas?

  • May by anyway view Local Network files[e-book] or videos or html pages, from the main PC

    In ipad 3 upgraded to 4 ios, may by anyway view Local Network files[e-book] or videos or html pages, from the main PC if, this main has local host[php/mysql] or, from the local network itself: eg //user/downloads/pdf/ebook1.pdf?

    In ipad 3 upgraded to 4 ios, may by anyway view Local Network files[e-book] or videos or html pages, from the main PC if, this main has local host[php/mysql] or, from the local network itself: eg //user/downloads/pdf/ebook1.pdf?

  • Xdo jar files not compatible to j2ee / jre 6.0?

    Hello,
    we are using JRE 6.0 to develop a nice webapplication and we want to use the BIP inside the application. suddenly it is not possible to combine java.util.Hashtable<String, String> with the required com.sun.java.util.collections.Hashtable.
    com.sun.java.util.collections.ArrayList is also not available.
    What should I do? Is there a newer version of the jar files outside? Or can I download com.sun.java.util.collections anywhere?
    Best Regards
    Alexander

    grab the collections.jar ($JAVA_TOP/oracle) file and use that. it should work.

  • JRE won't cache some jar files.

    I have seen this behavior several times and cannot figure it out. For some reason, the JRE will not always cache jar files. I have tried to narrow down a pattern, but cannot. The closest pattern I can see is that on occasions when a jar is not cached, the file was not signed. I have not seen an instance when a signed jar would not cache. Having said that, occassionally, unsigned jars do appear to be cached.
    This behavior has been seen with all versions from 1.4 - 1.6. In all cases, the max cache size is far great than would ever be needed and in most cases, jar cache is cleared prior to testing.
    Any hints, or is this expected behavior? If expected, is it documented anywhere?

    Hi Matthew,
    I get the same error when using the Camino browser and StuffIt v9.0.1. So, I'd guess it's a problem with the file rather than anything on our machines.

  • Jar file with JRE and lib's

    I'd like to create a jar file that also contains the JRE that I want to use as well as some libraries I'm using. Is that possible?
    I have created in the past a batch file that points to an specific JRE that I package with my classes in a directory. But this time I'd like to package it in the jar file as well.
    Thanks!

    I'd like to create a jar file that also contains the
    JRE that I want to use as well as some libraries I'm
    using. Is that possible?Not and run that JRE. You have to extract it from the jar and put it in a directory. On Windows, this will allow you to run only Java applications from the commandline (not applets or anything associated with a browser).
    I have created in the past a batch file that points
    to an specific JRE that I package with my classes in
    a directory. But this time I'd like to package it in
    the jar file as well.
    Thanks!

  • Jar file triggers download of JRE

    Hi,
    I am wondering if it's possible to implement the JAR file in such a way that it'll automatically trigger a download of JRE if the system doesn't have it or at least point the user to the URL where they can then download JRE. If it is possible, an example of how it can be done would be greatly appreciated.
    Regards,

    You could:
    Assuming that atlest a 1.2 JRE will be installed, as will Java Webstart, and then let JWS autoupdate the JRE if it is out of date
    Write a small "launcher" application (in C/C++/Java compiled to native).
    Use something like ZeroGs Install Anywhere to install the JRE if it does not alread exist.
    Mlk

Maybe you are looking for

  • The Big ?

    I thought i would start a thread for customers thinking of getting a iphone so the big question is so how gd is the iphone can u share ure thoughts on the iphone good and bad

  • I don't know my security questions...

    I don't know my security questions and I can't figure them out. I tried looking at different pages and I still cant figure out where the link is to send an email to reset the questions. How do I reset them?

  • I need this requirement :create PR+get list of PO+ack of MIGO

    Hi All, Can u tell me the releationship for the flow of PRequistion,POrder,GRecipts. and what are the Standard BAPI/RFC's available. Thanks @Prami Moderator message: please search for available information/documentation. Edited by: Thomas Zloch on Ma

  • HD series "cannot be played"?

    I downloaded the entire first season of Mad Men in HD. Now, my Apple TV won't sync because "they cannot be played on this Apple TV." Can I do anything or have I just wasted the money. I've looked through all the settings...and read through many of th

  • The Exception of https connection

    When i connect to https server if i input the IP,it throws java.io.IOException: HTTPS hostname wrong: should be <X.X.X.X>, but cert says<server> But if i input the server name, i.e. "server" it throws java.net.UnknownHostException:server what is the