Sun JVM works, Microsoft VM gives an error
I've got this applet:
import java.awt.*;
import java.applet.Applet;
import java.net.*;
import java.io.*;
public class Standen
extends Applet {
private URL sourceFile;
private BufferedReader inFile;
private String lines="";
public String getScores(String bestand) {
try {
sourceFile = new URL(getCodeBase(), bestand);
getFile();
getMostRecent();
catch (Exception ex) {
return "";
return lines;
private void getFile() throws Exception {
URLConnection link = sourceFile.openConnection();
inFile = new BufferedReader(new InputStreamReader(link.getInputStream()));
lines = "";
String line = "";//lezen van bestand
do {
if (line != "") {
line = line.trim();
lines = lines + line + "\n";
line = inFile.readLine();
while (line != null);
inFile.close();
private void getMostRecent() {
String term = "<mostrecent>";
String eindTerm = "</mostrecent>";//Tag met mostrecent
String vergelijkLines = lines.toLowerCase();//Hoofdletters maakt niet uit
int plaatsTerm = vergelijkLines.indexOf(term);//plaatsen opzoeken van de tags
int plaatsEindTerm = lines.indexOf(eindTerm);
plaatsTerm = plaatsTerm + term.length();//Tag zelf niet meenemen
if(plaatsTerm!=-1 &&plaatsEindTerm!=-1) {//alleen als de tags voorkomen
lines = lines.substring(plaatsTerm,plaatsEindTerm);//tekst kopieren
} else {
lines="";//anders niks teruggeven
It works fine on my computer with the sun jvm, but it doesn't seem te work if you have the microsoft vm installed. I still want to make the applet compatibel for other people. What can I do about this?
There is a way to enable the IE Java console - try googling for instructions. There's a good chance the console displays an error message. Or if it doesn't, add debugging println's to pinpoint where something goes wrong.
The MS JVM is old and has bugs, including security bugs. If the users of your applet are in any way important to you (such as paying customers), try to get them to dump the MS JVM. They are opening themselves up to worms and such nastiness.
By the way, ' if (line != "")' isn't right, you need 'if (!line.equals(""))'.
Similar Messages
-
Differences between Sun JVM and Microsoft JVM.
Differences between Sun JVM and Microsoft JVM.
I have a very simple applet that I am trying to make compatible with both Microsoft�s JVM and Suns JVM in Internet Explorer.
However, when I turn on the Sun JVM it works occasionally, but frustratingly on most occasions I get the following error messages:
In the status bar: "Applet <name> notinited"
And when I investigate further in the console I get the following output:
load: class <name>.class not found.
java.lang.ClassNotFoundException: <name>.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.net.SocketException: Malformed reply from SOCKS server
at java.net.SocksSocketImpl.readSocksReply(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.createConnection(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
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
It appears that the applet never gets loaded. I have no idea why?
What is the Sun JVM doing here?
Many thanks in advance for any help.Oh, one more thing. Here's the outpt of the VM log when I run the test above:
Java(TM) Plug-in: Version 1.4.2_03
Using JRE version 1.4.2 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Michael
Proxy Configuration: No proxy
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
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
java.lang.NullPointerException
at sun.plugin.cache.Cache.updateTable(Unknown Source)
at sun.plugin.cache.FileCache.getMatchingFile(Unknown Source)
at sun.plugin.cache.CachedFileLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.cache.CachedFileLoader.getCacheFile(Unknown Source)
at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
at sun.plugin.cache.FileCache.get(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.connectWithCache(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
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)
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)
v -
Upon upgrading iPhoto, iPhoto Help no longer works. It gives the error message: "The selected topic is currently unavailable. To see all iPhoto Help, you must be connected to the Internet." I am obviously connected to the internet since you are reading this.
I tried upgrading permissions but it did not help!? Can anyone tell me what is wrong? ThanksTry
Reboot the computer, see if that fixes it.
Then try:
Backup your files off the computer (not TimeMachine) and disconnect
Hold c boot off the 10.6 disk and simply reinstalling OS X
Log in and update to 10.6.8
c boot off the 10.6 disk again and use Disk Utility >Repair Disk
reboot and all should be fine, except some third party programs that install kext files, those will have to be reinstalled from fresh sources. -
Every time I download a new app or update an old one it doesn't work. It gives an error message saying it is unable to download the application. I have 2 choices. Retry or done. Retry doesn't work so I press done. What can I do to fix this? Someone please help!
Try using Google's DNS instead of the one your IPS is providing.
- To change on the iPod go to Settings>wifi and change the DNS to 8.8.8.8
- For the computer see:
Public DNS — Google Developers
- Did anything happen to your router right before this started? Maybe the router is blocking the port used. -
Since uploading Maverick, all of my Microsoft apps give an error message "(name of the app) quit unexpectedly. Click Reopen to open the application again." However, this does nothing but renew this window. I have to click on the "OK" button to get rid of the error message. What to do?
Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
Could be many things, we should start with this...
"Try Disk Utility
1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
*Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
3. Click the First Aid tab.
4. Select your Mac OS X volume.
5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
http://docs.info.apple.com/article.html?artnum=106214
Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
(Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
Do they launch OK while in Safe Mode? -
I can access some of the sites, but others are throwing this error code... not sure why it appears that it is every other site almost...
I can actually get this error, at a top level site, go to a sub-site and that site is displayed.
Any ideas on how to resolve this error..
the Central Admin site is down also, just a blank page is returned. no error message...
we were able to add extra space on the VM brought back the sites but now the Central Admin site throws a 404 not found...Hi ,
According to your description, my understanding is that after adding extra space on the SQL server VM, the error 0x80131904 disappeared, but the CA got 404 error. Is it right?
Afer adding extra space on SQL server, make sure the SQL server is online and run SharePoint 2013 Products Configuration Wizards, when running, select “don’t disconnect from the server farm”.
Check whether this issue occurred on other machines. If CA is working from other computer and only server is facing this issue then you need to create diableloopbackcheck registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa. The value should
be 1 .
Please go to IIS->the server->ISAPI and CGI Restrictions, check whether there are four 'Microsoft SharePoint Foundation 2010' entries. If not, you need to create the following entries with the name as 'Microsoft SharePoint Foundation 2010':
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\_vti_aut\author.dll
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\_vti_adm\admin.dll
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\shtml.dll
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\owssvr.dll
Check Allow extension path of execute to allow the restriction to run automatically.
If this issue still exists, please check the log file to find more information about this issue. The path of the log file is : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.
Or you can use Event Viewer(Start->Run->event viewer) to find the log.
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Snapfish access works, eprint site gives system error or invalid password error
I just installed an HP Photosmart 7525 all-in-one printer, and I am trying to get access to the ePrint site. I have a working Snapfish account. I have tried to create an account at the ePrint site. The site recognizes that I have a Snapfish account, and after I am prompted to provide my Snapfish password, I get a "System error. Please try again" message. This keeps happening. How can this be fixed? I have a Macbook and have tried this using Safari and Firefox. The browser makes no difference. I get the same message. I have tried logging into the ePrint site with my Snapfish credentials, and I get an invalid password error. Please help. Thank you!
Hi,
I thought they've fixed this because I, myself, had to use TWO differrent email addresses for 2 accounts. Before try another email address, please clear cache and try again. Hope this helps.
Regards.
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem. -
Create Shopping Page gives Javascript Error - Sun JVM in a DMZ?
Hi SDN
We are running on SRM 5.0, with server at 5.5 and we have just implemented SP 11. Since then, our users running IE with the Sun JVM 1.4.2_10 are getting a JavaScript error everytime an applet loads on their page (in this case, it is the applet within the Document & Attachments section). Moreover, our portal is being hosted on an SSL secured server within our DMZ, in conjunction with a Provencia IDS System, Blue Coat hardarware, RadWare, ...etc.
The only way we can make that page work, is by disabling the Sun JVM and use the MS Version of the JVM. At that point, no issue with the applet on our SSL Secured Portal. Even funnier, is that when I'm calling directly the Portal Server (without the SSL proxy), even if i run the Sun JVM, I'm not getting the error. Since we have over 1000 users, it woulde be aimpossible to have all of them making that change... We need to make that work.
Have you ever experienced something like that? If yes, what have you done to fix it? Any suggestion, OSS notes
Thanks in advance
Eric L.I am having almost the same issue. This is what my java console throws "load: class com.sapportals.portal.epcf.EPCMfactory not found."
-
My Maps in Iphone 4 IOS 6 are not working
It just gives an error message when I try to search the route .
In IOS 5,its working fine,Apple is required to block Facetime in the hardware of all iPhones (and iPads and iPod touches) sold in the UAE. There is no way you can activate it, no matter what country you're in. If you want Facetime, you will have to sell your UAE-model iPhone and buy another one in another country (not including the KSA which has the same ban).
Regards. -
HelloThank's for your helpsI hope this document is helpfulBest Regards,
Date: Sun, 22 Jun 2014 17:10:17 -0700
From: [email protected]
To: [email protected]
Subject: when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
created by Anoop9178 in Adobe Reader - View the full discussion
Hi,
Would it be possible for you to share the document?
Regards,
Anoop
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Adobe Reader by email or at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.thank's for reply and your help
i did the step's that you told me but i still have the same problem
i have the latest v.11.0.7
i
i disable the protected mode -
Hi,
<BR ><BR >
We are finding some problems using an application on a Tomcat 5.5 server and we want to discover which class is causing an OutOfMemoryException. I seems that jmap could help us whith the task but it fails with the following error:
<BR ><BR >
<i>jps
<br>
11988 Bootstrap<br>
12616 Jps
<BR ><BR >
jmap 11988<br>
Attaching to process ID 11988, please wait...
sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypeEntryTypeNameOffset" in any of the known library names (libjvm.so, libjvm_g.so, gamma_g)
at sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:410)
at sun.jvm.hotspot.HotSpotTypeDataBase.getLongValueFromProcess(HotSpotTypeDataBase.java:391)
at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:85)
at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:68)
at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:550)
at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:476)
at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:314)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:146)
at sun.jvm.hotspot.tools.JMap.main(JMap.java:126)
Debugger attached successfully.
jmap requires a java VM process/core!
</i>
<BR ><BR >
jstack shows the same error with a very similar exception. I have found that other people is having this problem but I have found no fix avalaible on the Internet. ( see, for example, http://www.javalobby.org/java/forums/m91812587.html#91812522 )
<BR ><BR >
Other applications like jconsole work perfectly. Any alternative tool may solve the problem,
<BR ><BR >
By the way: I am using:
O.S. : Linux Mandriva 2006<BR >
JVM: java version "1.5.0_06"<BR >
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
<BR ><BR >
Thanks in advance,
<BR ><BR >
Borjaguys,
I was fiddling around to test jmap,
here are the things that worked for me.
$ jps
6281
8214 Jps
7045 Main
7159 Resin
$ jmap -J-d32 -heap 7045
It seems only the Main pid will work and not all others .......
post your suggestions.
Raj -
Microsoft & Sun JVM compatability
Are there any reasons why an application (with Java 1.1.8 ) designed to work with Microsoft JVM 5.0.0.3234 or above should not work with Sun JVM v1.4.2.03?
Your options are:
1. Run it in the MS JVM (but you knew that)
2. Download, disassemble and fix the code to run in Sun's JVM. Various tools available to aid in this, but it's legally questionable.
3. Use a wrapper environment to host the code.
I don't know if 3 exists, or indeed if it's possible because I don't know much about MS's proprietary changes. If they altered bytecode it's probably not, if they didn't, it probably is. I don't know of a product that does this, but it's worth having a dig around on google. If it's possible and a suitable product exists, that's probably the best solution.
Dave. -
IS cookie handling in the Sun jvm automatic like the microsoft JVM?
Hi,
I am moving from a micrsoft JVM to the sun JVM. I am dealing with cookies. It appears that the microsoft JVM Wininet URL handler automatically handles cookies. Does Sun's do that for more current versions?
thany you,It stores cokies, yes.
In JDK5 there was an API added which even allows you to control cookie handling yourself.
lg Clemens
By the way, JDK6u10 us currently in BETA, it offers many enhancements on desktop, give it a try:
http://download.java.net/jdk6/binaries/ -
Game runs fine in sun jvm, microsoft jvm causes 99% cpu usage and is SLOW
In the microsoft JVM (my target platform) I get 2 frames per second... in the sun JVM I get at least 60.
The strangest part, is that this only repros when iexplorer.exe is the only process running java anything... for example, if I have net beans running, I get 60 FPS in the microsoft JVM as well. That makes no sense to me.
I have tried thread.yeild and thread.sleep in my main loop, and that didn't fix anything.In the microsoft JVM (my target platform) I get 2
frames per second... in the sun JVM I get at least
60. Don't use the MS JVM. I
The strangest part, is that this only repros when
iexplorer.exe is the only process running java
anything... for example, if I have net beans running,
I get 60 FPS in the microsoft JVM as well. That
makes no sense to me.
I have tried thread.yeild and thread.sleep in my main
loop, and that didn't fix anything.About these 2 methods.
sleep() // example in almost every book. Leaves
// Thead on the schedule list
yeild() // Pell mell as in no control of when it unyields.
// prone to race/deadlock UNLESS monitored by
// another thread that wakes up periodically.
Tony's "Theorized" <- make the uptight acedemic sycophants happy.
Law of the exec constant.
"Any Thread or process *that locks the system MUST yeild controls for at
least 20MS pre iteration."
Why 20MS? It gives the underlying OS a little slice and is enough
to ensure everything gets enough CPU. Every MS under 20 increases
the deadlock potential. (*If at zero wait you get a preempted deadlock)
You can play with this value but I have found it is pretty consistent
across CPU speeds / hardware/
Use a synchronized wait() in your main run method every iteration.
Objet waitObject();
synchronized(waitObject)
try
waitObject.wait(20);
catch(InterruptedException ie)
}wait() Removes the Thread from being scheduled.
This iwll give IE the CPU it needs and your CPU should dro
to around 1%.
Hmm now how many kicked dog howls am I going to get about his message
(T) -
I count on using the Firefox restore session feature. But it's stopped working. For the past couple of days, it hasn't worked a single time. (I haven't changed anything on my PC.) It just suddenly stopped working.
Now it gives me an error message that the script has stopped working. It gives me a couple of options. I'm not sure of the exact wording, but one option is to stop the script and the other is to keep trying. But the keep trying never works.
I have to stop the script, hence, the list with my previous tabs never comes up.Which file is mentioned as the cause of that script error?<br />
Is that a file with a chrome protocol?
Maybe you are looking for
-
How do I use Typekit fonts within Edge Animate
I have applied a 'Pragmatica' Typekit font to a website. I'm using Edge animate to construct some pages and within these pages want to add Type; however, Edge Fonts does not include the Typekit font 'Pragmatica' and the instruction for the page to u
-
Hi All, My requirement is, based on the input selection from the frontend we have to query the database and then display the records based on the input. Sometimes we may have to display all the records from database. So I am using a DB Adapter in a S
-
How does "update" work at Wal-Mart etc?
Ok, I'm new to this so bear with me. I have confirmed with one of of my local AT&T stores that I have 2 3GS's eligible for the upgrade price ($199/$299). Unfortunately they closed the preordering before I could do so. So I was planning on getting to
-
Language and input support blackberry
Hi, I've reloaded the BlackBerry OS 5.0.0.676 on my Pearl 9100, now when i go to the language and input support blackberry I only see english, so I went back to the App Loader and tried instaling diferent languages from there, but I only see the opti
-
Remote Computer could not be found?
I have setup a Web Access RemoteApp server on Server 2008 R2 and it is no longer letting anyone connect to apps or use remote desktop from the outside. If I try to run any apps or try to RDP from the Web Access site it tries to launch but then I get