我想在我的Java應用程序上生成BSE的實時股票報價。 現在我有了這個小程序代碼,它應該在HTMl頁面中顯示股票價格/股票價格。無法顯示HTML中的股票市場報價
<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 />
但是,當我嘗試打開已這段代碼嵌入到它在我的HTML頁面,我得到錯誤說:
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.ClassFormatError: 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
這是什麼意思?
[不兼容魔術值1008813135]的可能重複(http://stackoverflow.com/questions/2390733/incompatible-magic-value-1008813135) – 2011-03-04 17:55:43