You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Java works, but not for local files
I am using Opera 10.53 and have Java 1.6 u20. It works great. I can run all the apps here for example,http://java.sun.com/applets/jdk/1.4/index.html
I can't run Java apps locally though. I have folder with an index.html and the class files. I'm using Win7 and the java icon appears in the tray so java loads. The local Java app loads fine in Chrome and IE from the folder.
I went through all the Java threads and opera:config is good the plugins are good (none in C:program files/opera....) Again, Java applets work fine from the web. Seems like maybe a security issue or something? I thought maybe a Win7 issue, but they work in Chrome and IE locally so...
The html file loads and the where the Java app should be it says error and you can get more details which are below:
Java Plug-in 1.6.0_20
Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
User home directory = C:\Users\bob
----------------------------------------------------
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 BubbleSort.class not found.
java.lang.ClassNotFoundException: BubbleSort.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.io.FileNotFoundException: \localhost\BubbleSort\class.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(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: BubbleSort.class
Here is what the HTML file looks like. The class file is just sitting in the same folder:
<HTML>
<HEAD>
<TITLE>Stack</TITLE>
</HEAD>
<BODY>
<TABLE BORDER UNITS=PIXELS COLSPEC="L330 L250" CELLPADDING=7>
<CAPTION><STRONG>Lafore's Stack</STRONG></CAPTION>
<TH>Stack
<TH>Operation
<TR>
<TD>
<APPLET
CODE=Stack.class
WIDTH=440
HEIGHT=320>
</APPLET>
<TD>
<BR>
<FONT SIZE=2>
<STRONG>New</STRONG> creates new stack
</FONT><P>
<FONT SIZE=2>
<STRONG>Push</STRONG> inserts item with value N at top
of stack.
</FONT><P>
<FONT SIZE=2>
<STRONG>Pop</STRONG> removes item from top of stack,
returns value.
</FONT><P>
<FONT SIZE=2>
<STRONG>Peek</STRONG> returns value of item at top
of stack.
</FONT><P>
<FONT SIZE=2>
(Type N into "Enter number" box.)
</FONT><P>
</TABLE>
</BODY>
</HTML>
Basically I just started Opera Unite webserver and pointed to the folder where I have my local java apps. Then I just access them through the opera unite url and they work fine.
A little bit of a pain, but hey, it works.
JRE: Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
OS: WinXP SP2
load: class applet.TestApplet not found. java.lang.ClassNotFoundException: applet.TestApplet ... Caused by: java.io.FileNotFoundException: \localhost\c:\work\applet\TestApplet.class ....
HTML:
<applet code="applet.TestApplet" archive="test.jar" codebase="." width="710" height="540"/>
totally same without specifying codebase attribute
Core fixes: Thursday, 17. June 2010, 09:05:00
CORE-27614 (New Java plug-in can't find applet on local pages because it doesn't understand "")
This was in Builds 3426 for Windows, Mac-8387, *nix-6372. There have been four newer builds since this was released. Also be aware of this notice for alpha, beta software: WARNING: This is a development snapshot of Opera. It is released for testing purposes, and there may be serious bugs and unfinished features.
Linux in VirtualBox | Opera 12.15-1748