Results 21 to 40 of 41
Thread: Cannot run applet
- 06-26-2010, 05:07 AM #21
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
- 06-26-2010, 05:10 AM #22
- 06-26-2010, 01:43 PM #23
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-26-2010, 01:51 PM #24
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-26-2010, 01:53 PM #25
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can't you find the source of it?
- 06-26-2010, 03:13 PM #26
I've down loaded all the jar files and created a html file that will execute it. I changed the code= to be: code="ru.fmv.stock.ChartApplet"
I guess some browsers don't expect the .class extension. They must append .class to what is given on the code= attribute
The applet will load and executes but tries to connect to its codebase via a URL like:
And fails thereC:\Temp\StockApplet\select_stock.php?key=1z2wqfsda &s=3315&r=1&sd=2008-07-31&t=1000&l=1000
The data in the above is from:<PARAM NAME="service" VALUE="select_stock.php">
<PARAM NAME="messageService" VALUE="select_message.php"
<PARAM NAME="key" VALUE="1z2wqfsda">
- 06-27-2010, 01:57 AM #27
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Emm... This one
Maybe it should be requested from the same host - the host the applet is from I guess not the local C:\Temp... etcC:\Temp\StockApplet\select_stock.php?key=1z2wqfsda &s=3315&r=1&sd=2008-07-31&t=1000&l=1000
Perhaps that is the getCodeBase() problem :confused:
@Norm
Did you tried to sign it?Last edited by Webuser; 06-27-2010 at 02:01 AM.
- 06-27-2010, 02:03 AM #28
No. The problem is that the code uses getCodeBase() to build the URL.Did you tried to sign it
Say String url = getCodeBase() + "select_stock.php?";
The URL: C:\Temp\StockApplet\select_stock.php?
has the path on my computer: C:\Temp\StockApplet\
followed by the file:select_stock.php that is supposed to be at the site where the applet was loaded from. In my case, the applet was loaded from my computer.
- 06-27-2010, 02:30 AM #29
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
- 06-27-2010, 03:53 AM #30
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-27-2010, 12:50 PM #31
What do you see in the Java Console?but it fails
My version displays a GUI and then fails because there is no one to communicate with.
Here's what I get in the JC:
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
...
file:/C:/Temp/StockApplet/select_stock.php?key=1z2wqfsda&s=3315&r=1&sd=2008-07-31&t=1000&l=1000
e - java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at ru.fmv.stock.ChartApplet.init(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Temp\StockApplet\select_stock.php?key=1z2wqfsda &s=3315&r=1&sd=2008-07-31&t=1000&l=1000 (The filename, directory name, or volume label syntax is incorrect)
at ru.fmv.stock.a.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Temp\StockApplet\select_stock.php?key=1z2wqfsda &s=3315&r=1&sd=2008-07-31&t=1000&l=1000 (The filename, directory name, or volume label syntax is incorrect)
at ru.fmv.stock.d.b.b(Unknown Source)
at ru.fmv.stock.d.b.a(Unknown Source)
... 9 more
Caused by: java.io.FileNotFoundException: C:\Temp\StockApplet\select_stock.php?key=1z2wqfsda &s=3315&r=1&sd=2008-07-31&t=1000&l=1000 (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at ru.fmv.stock.f.c.b(Unknown Source)
at ru.fmv.stock.e.a.a(Unknown Source)
... 11 more
- 06-29-2010, 03:10 PM #32
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
The IO thing
I think to make it work locally its inner code should be modified from getCodeBase() to an absolute one :) just like a
Originally Posted by Norm
@Norm
Did you modified this and still has the error?Last edited by Webuser; 06-29-2010 at 03:14 PM.
If my answer helped you. Please click my "REP" button and add a comment
Have a Good Java Coding :)
- 06-29-2010, 03:14 PM #33
I don't have the source for this applet. I downloaded the html and jar files to test it and see what the problem was.
- 06-29-2010, 03:23 PM #34
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
@everybody
Strange ... I tried to run the applet http://www.findata.info/chart/select_stock1.html today but now I can see this errors list only. Different errors day after day? What you think?
PS I used IE 8...java.lang.NullPointerException
at sun.plugin2.applet.Plugin2Manager.findAppletJDKLev el(Unknown 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)
Exception: java.lang.NullPointerException
- 06-29-2010, 03:25 PM #35
I think this has been mostly a waste of time.
We're trying to debug a third party's code without their help or knowledge.
- 06-30-2010, 01:58 AM #36
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
@everybody
Hey, guys... Today I just remembered a thing like a the Java cache bug... So then I deleted all my TEMP files and started the applet and it runs fine :rolleyes:
watch it

The console shows only the outer resource ref...
Perhaps the problem is somewhere in overloaded java cache :cool:
@Norm and @Eranga
Did you try to clean your Java cache before running it? Please, guys, let me know if that helps you too...Last edited by Webuser; 06-30-2010 at 02:09 AM.
If my answer helped you. Please click my "REP" button and add a comment
Have a Good Java Coding :)
- 06-30-2010, 03:21 AM #37
I just went to the site without doing anything with IE8 and it worked.
And also it worked with Chrome without my doing anything.
My conclusion is that the programmer fixed his site.
- 07-01-2010, 01:43 PM #38
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 07-01-2010, 02:48 PM #39
No, I have not cleared Java cache.
- 07-03-2010, 01:16 AM #40
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