Results 1 to 14 of 14
Thread: help with applet
- 05-24-2011, 08:56 PM #1
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
help with applet
I am trying to instal a java news ticker.
It worked fine when i tried a simple test page with applet in html index and java.class both in root folder.
The problem is that i want to instal it in a complex cms and having them both in root is impossible, i have no idea how to have the pages get the class like i would get a javascript in a html header???
then there something called a 'CLASS file' that used, which i cannot accessJava Code:<APPLET code="ticker1.class" width=270 height=20 style=" float:right; margin-top:-2px"> <PARAM name="FONT" value="ARIAL"> <PARAM name="SIZE" value="14"> <PARAM name="STEP" value="1"> <PARAM name="DELAY" value="100"> <PARAM name="TEXT" value="news articles latest twitter active"> </APPLET>
i get a error
Java Code:oad: class ticker1.class not found. java.lang.ClassNotFoundException: ticker1.class 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) Caused by: java.net.SocketException: Unexpected end of file from server at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: ticker1.class sun.plugin2.main.client.PluginMain: unrecognized message ID 42 load: class ticker1.class not found. java.lang.ClassNotFoundException: ticker1.class 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) Caused by: java.net.UnknownHostException: [url=http://www.vlogirls.com]test index[/url] at java.net.PlainSocketImpl.connect(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.net.[url]www.http.HttpClient.openServer(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.openServer(Unknown[/url] Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.[url]www.http.HttpClient.New(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.New(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.plainConnect(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.connect(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: ticker1.class load: class ticker1.class not found. java.lang.ClassNotFoundException: ticker1.class 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) Caused by: java.net.SocketException: Unexpected end of file from server at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: ticker1.class load: class ticker1.class not found. java.lang.ClassNotFoundException: ticker1.class 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) Caused by: java.net.SocketException: Unexpected end of file from server at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTPHeader(Unknown[/url] Source) at sun.net.[url]www.http.HttpClient.parseHTTP(Unknown[/url] Source) at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream(Unknown[/url] Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: ticker1.class
Last edited by DarrylBurke; 05-24-2011 at 09:06 PM. Reason: Changed QUOTE tags to CODE tags
- 05-24-2011, 09:33 PM #2
Member
- Join Date
- Mar 2011
- Posts
- 64
- Rep Power
- 0
Specify the location of the class by codebase parameter:
Java Code:<APPLET codebase="/directory/to/the/class" code="ticker1.class" width=270 height=20 style=" float:right; margin-top:-2px">
- 05-24-2011, 09:43 PM #3
Where are the class files for your applet located? Are they in a jar file?
If in a jar file, you would use the Applet tag's archive= attribute to reference the jar file.
Another idea, remove the .class from the code= attribute. Some browsers think that code=ticker.class refers to the file class.class in the ticker folder. Ie it assumes that the .class was left off.
- 05-31-2011, 11:15 PM #4
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
still not working
I tried and applet still is not showing but error message is not exactly same as before.
Added path as suggested and no results
Javascripts on page are exactly in same folder and they all work<APPLET codebase="/searchEngine/templates/default-pink/js/ticker1.class" code="ticker1.class" width=270 height=20 style=" float:right; margin-top:-2px">
Also tried by removing .class every which way and no results either
this is Java console message error:
load: class ticker1 not found.
java.lang.ClassNotFoundException: ticker1
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.mysite.com/searchEngine/t.../ticker1.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: ticker1
load: class ticker1 not found.
java.lang.ClassNotFoundException: ticker1
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.mysite.com/searchEngine/t.../ticker1.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: ticker1
load: class ticker1.class not found.
java.lang.ClassNotFoundException: ticker1.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.mysite.com/searchEngine/t...r1/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: ticker1.class
load: class ticker1.class not found.
java.lang.ClassNotFoundException: ticker1.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.mysite.com/searchEngine/2...r1/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: ticker1.class
- 05-31-2011, 11:21 PM #5
Where is the ticker.class file located? Is it in the same folder with the HTML file?
Are you able to load the applet in a browser from a local folder with the html and class file in that folder.
With a simple applet tag:
<APPLET code=ticker1 width=270 height=20>
- 05-31-2011, 11:34 PM #6
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
The ticker.class is in same folder as my javascripts, not as html(there is no simple html, its made with php/js includes).
I tried a simple test in the beginning with a html index and class file in same folder and it worked fine(is that your question?)
but this complex cms does not allow it i will try it with the 'codebase=...' pointing to same folder as html(which is a combo of php sub files)Last edited by oli22; 05-31-2011 at 11:38 PM.
- 05-31-2011, 11:54 PM #7
What does the html that the browser receives look like?
I misread the title for this thread. I thought you were having problems with an applet.
It looks more like a server file configuration problem.
- 06-01-2011, 06:12 AM #8
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
reply
is that what you see in last copy/paste java error console?
All this is due to a file config error?
Thanks for your help by the way
- 06-01-2011, 01:34 PM #9
Sorry, I don't understand your questions.
- 06-01-2011, 11:37 PM #10
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
works now
yes it was a file path thingy, i finally got it right, i used the codebase param you showed me, but it was another file path then i thought.
Thanks much cool guy on the beach picture and other guy.
- 06-01-2011, 11:45 PM #11
Can you post your <APPLET tag so others can see what you had to do?
- 06-08-2011, 05:08 PM #12
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
The problem was resolved when i finally placed the ticker1.class that was to be called by the <applet> in the same folder as the associated php section that formed that page section where i have applet, not at root level index where all php sections gather to form index.
- 06-08-2011, 05:11 PM #13
Thanks for that.
The problem also was with the server configuration.
- 08-13-2011, 03:08 AM #14
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
Java Applet to Applet communication
By jsman in forum Java AppletsReplies: 3Last Post: 04-05-2011, 02:23 PM -
applet class inside java.applet.* or java.awt.*
By Manish87 in forum Java AppletsReplies: 1Last Post: 09-27-2010, 02:15 PM -
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 -
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