Results 1 to 20 of 41
Thread: Cannot run applet
- 06-24-2010, 06:52 PM #1
Cannot run applet
Hello
I have a problem of the applet Select stock
I put in params
Stock: 3315
Start date: 2008-07-31
Time: 1000
click Chart
But get this error
What can it be? And Is it runs in your browsers? Maybe mine is not working...load: class ru/fmv/stock/ChartApplet.class not found.
java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://www.findata.info/chart/ru/fmv...et/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
- 06-24-2010, 07:06 PM #2
your errors clearly state your chartapplet class not found...
and looks like because of your http connection.
http://www.findata.info/chart/ru/fmv...et/class.class:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'
- 06-24-2010, 07:25 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Check your connection first of all, and make sure that *.class file is accessible.
- 06-24-2010, 08:01 PM #4
But they tell me it works fine in many browsers. they advice me to use the newest FF and IE 8 but my IE 8 doesn't run this applet :(
I checked the connection and it is fine :confused:
help
- 06-24-2010, 08:07 PM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Do you have latest FF in your PC? If so enable Java on the browser and run the code again.
- 06-24-2010, 08:11 PM #6
- 06-24-2010, 08:12 PM #7
- 06-24-2010, 08:27 PM #8
I get the same error. Here's my Java Console
Look at where I have commented <<<<<<<< NOTE.
The browser is using the .class as the name of the class file.
Here's part of the HTML for the <Applet page:Java Plug-in 1.6.0_20
Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Owner
----------------------------------------------------
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 ru/fmv/stock/ChartApplet.class not found.
java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http ://www.findata.info/chart/ru/fmv/stock/ChartApplet/class.class <<<<<<<< NOTE
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
appletClass = "ru/fmv/stock/TableApplet.class"
var appletContainer = document.getElementById("appletContainer");
appletContainer.innerHTML ='<APPLET id="stock" width="100%" height="100%"'+
'code="'+appletClass+'"' +
' archive="jars/stock1.jar, jars/jcommon-1.0.16.jar, jars/jfreechart-1.0.13.jar, SuperCSV-1.52.jar, jars/spiffy-all-0.05.jar " '+
' > ' +
' <PARAM NAME="guid" VALUE="'+appletGuid+'"/> '+
' <PARAM NAME="service" VALUE="select_stock.php"/> '+
' <PARAM NAME="messageService" VALUE="select_message.php"/> '+
' <PARAM NAME="key" VALUE="1z2wqfsda"/> '+
' <PARAM NAME="stockCode" VALUE="'+stockCode+'"/> '+
' <PARAM NAME="startDate" VALUE="'+startDate+'"/> '+
' <PARAM NAME="resolution" VALUE="1"/> '+
' <PARAM NAME="time" VALUE="'+time+'"/> '+
' <PARAM NAME="limit" VALUE="400"/> '+
' <PARAM NAME="offset" VALUE="0"/> '+
'</APPLET>';
//alert( appletContainer.innerHTML);Last edited by Norm; 06-24-2010 at 08:34 PM.
- 06-24-2010, 08:30 PM #9
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
I just guessing but anyway...
The class ru.fmv.stock.ChartApplet.class may be a "not complete" one or something...
So it requires to download something from server using the http... the servlet part I guess? Could you provide us the inner code?If my answer helped you. Please click my "REP" button and add a comment
Have a Good Java Coding :)
- 06-24-2010, 08:33 PM #10
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
- 06-24-2010, 08:55 PM #11
When going to the site via a proxy server, this GET returns a 404:
GET http://www.findata.info/chart/jars/stock1.jar HTTP/1.1
HTTP/1.0 404 Not Found
It finds the other 4 jar files.
i'm using Mozilla
I get the same class not found error in the Java Console with IE8
- 06-24-2010, 09:19 PM #12
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Emm I just ref in some other way and got this
http://www.findata.info/chart/jars/stock.jar
So there must be missing the JAR as
http://www.findata.info/chart/jars/stock1.jarLast edited by Webuser; 06-24-2010 at 09:23 PM.
- 06-25-2010, 02:54 AM #13
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yea, it's able to find the JAR file on the first URL. But seems that main class is not define in manifest.
- 06-25-2010, 03:30 AM #14
Remember its an applet. The code= tag points to the starting class.main class is not define in manifest
- 06-26-2010, 02:11 AM #15
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yeah, that's true. But the Jar fail to load, may be that's not a valid applet. Or more main classes is available.
No more details.Manifest-Version: 1.0
Created-By: 1.6.0_06 (Sun Microsystems Inc.)
- 06-26-2010, 03:46 AM #16
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Eranga, did you succeed to download the jar as
http://www.findata.info/chart/jars/stock1.jar
cause I couldn't do this owing to my browser 404 :confused:If my answer helped you. Please click my "REP" button and add a comment
Have a Good Java Coding :)
- 06-26-2010, 04:16 AM #17
I couldn't download the jar at night but I could download it in the morning :confused:
I started the applet but now got this
What do you think?load: class ru/fmv/stock/ChartApplet.class not found.
java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://www.findata.info/chart/ru/fmv...et/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: ru.fmv.stock.ChartApplet.class
- 06-26-2010, 04:36 AM #18
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Emm...
1) I think that applet reads a class.class file using the URL or something to download correctly. It must be its protection key or something...
as you can see it is to read class.class and it is obvious by this exception
2) finds nothing and gets no bytes so we can see this exceptionCaused by: java.io.IOException: open HTTP connection failed:http://www.findata.info/chart/ru/fmv...et/class.class
3) then applet demands to use a native method and of course it should use a platform dependant code here but has no Privileges and we can see this exception as followsat sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
As I can see it is a test applet so could you provide us the ru.fmv.stock.ChartApplet.class problem code ?at java.security.AccessController.doPrivileged(Native Method)
For some reason the class.class is not accessable :confused:
I am not sure but maybe some stream cipher or something?If my answer helped you. Please click my "REP" button and add a comment
Have a Good Java Coding :)
- 06-26-2010, 04:43 AM #19
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
@everybody
Hey guys just let me know you succeed to download the class.class file cause I've got 404 only :(
But I suppose it is a servlet... How you think?
- 06-26-2010, 04:48 AM #20
Similar Threads
-
Pass parameter from one applet to another applet in different webpages...
By anubhavranjan in forum Java AppletsReplies: 2Last Post: 09-29-2009, 03:33 PM -
Applet & sql
By gan5016 in forum Java AppletsReplies: 19Last Post: 08-27-2009, 04:28 PM -
more help with my applet
By vouslavous in forum Java AppletsReplies: 5Last Post: 04-25-2009, 02:05 AM -
Calling another applet on click of button in one applet
By niteshwar.bhardwaj in forum Java 2DReplies: 1Last Post: 02-19-2009, 12:54 PM -
Applet, To center text and To open I engage in a dialog in an Applet
By Marcus in forum Java AppletsReplies: 4Last Post: 06-08-2007, 06:15 AM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks