开发者

Not able to display stock market ticker in HTML

I wanted to generate a live ticker of BSE on my java application. Now i have this applet code which is supposed to display the ticker/stock prices in an HTMl page.

<applet code="bse_ticker.class" width="95%" codebase="http://www.bseindia.com/applet/ticker" height="40" archive="mainticker_finals.jar"></p>
<div class="style8">
<param value="HTTP://www.bseindia.com:5000/price_finder/stockreach.asp?scripcd=" name="url"/>
<param value="#0000FF" name="nullarrowcolor"/>
<param value="_blank" name="window"/>
<param value="#8C8C8C" name="WATERCOLOR"/>
<param value="#000000" name="fgcolor"/>
<param value="#ffffff" name="bgcolor"/>
<param value="#00FF00" name="uparrowcolor"/>
<param value="#0671B0" name="fgcolor1"/>
<param value="0" name="default_ticker"/>
<param value="#FF0000" name="downarrowcolor"/>
<param value="21600000" name="thread_sleeptime"/>
<param value="applet" name="INDEXOF"/>
<param value="TickerData_final.asp" name="dataurl"/>
                </div>
<p></applet><br />

However, when i try to open my HTML page which has this code embedded in it, I get Error saying:

www.java-ticker.net

Site: investgeeta.com
Date: 09-17-2005

============================================== Loaded image: http://www.investgeeta.com/include/ticker/img/separator.gif Loaded image: http://www.investgeeta.com/include/ticker/img/up4.gif Loaded image: http://www.investgeeta.com/include/ticker/img/stay4.gif Loaded image: http://www.investgeeta.com/include/ticker/img/down4.gif java.lang.ClassFormatErro开发者_开发问答r: Incompatible magic value 1013478509 in class file bse_ticker at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.lang.ClassFormatError: Incompatible magic value 1013478509 in class file bse_ticker

What is this supposed to mean?


The number 1013478509 in hex is 0x3C68746D. Break that apart and you get

0x3C = <
0x68 = h
0x74 = t
0x6D = m

<htm

Or what looks like the beginning of an HTML document.

It looks like the webserver is serving up some HTML instead of the Java classes.

Try visiting the URL for the applet itself and see what it looks like (and be sure to look at the HTTP headers too).


This is most likely an issue with trying to run a Jar that was created with a newer version of Java than they JVM you are trying to execute the code with.

Do you have multiple versions of bse_ticker? What version was it inteded to run with?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜