LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-16-2007, 07:11 PM   #1
MaxistXXL
Member
 
Registered: Dec 2006
Distribution: Debian/etch
Posts: 36

Rep: Reputation: 15
Java-Applet Reads file but shouldnt


Hiho,
i want to embed my Applet in a website, but it will not start.
The errormessage is the following:
java.security.AccessControlException: access denied (java.io.FilePermission ./init.txt read)

But it isnt like this. I programm with eclipse, and i delete/replace EVERYTHING, which is related to a file-read, then save and then export. For those who want to see it by themself: http://rapidshare.com/files/12036271/Compton.zip.html It is a zip, which contains my html and the jar.

Are there any ideas how i can get it runable? Because there is definitively nothing, which wants to read the init.txt, i deleted it.

greets
MfG.:
der Maxist
 
Old 01-16-2007, 09:55 PM   #2
jonnycando
Member
 
Registered: Nov 2006
Location: Virginia
Distribution: OpenSuSE 10.2
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by MaxistXXL
Hiho,
i want to embed my Applet in a website, but it will not start.
The errormessage is the following:
java.security.AccessControlException: access denied (java.io.FilePermission ./init.txt read)

But it isnt like this. I programm with eclipse, and i delete/replace EVERYTHING, which is related to a file-read, then save and then export. For those who want to see it by themself: http://rapidshare.com/files/12036271/Compton.zip.html It is a zip, which contains my html and the jar.

Are there any ideas how i can get it runable? Because there is definitively nothing, which wants to read the init.txt, i deleted it.

greets
MfG.:
der Maxist
I know squat about Java applet programming and at least as little about HTML, but just a wild guess, could you set permissions to allow a "read" of the phantom file? In other words if it thinks the file is there let it try to read it. At least then if it can't find it you might get another more revealing error message. Or maybe when it sees there's nothing to read it'll step to the next instruction. Or am I all wet? Anyway here are the errors I got, and I don't know at all what they mean.

java.lang.UnsupportedClassVersionError: compton/Compton (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:578)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:619)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1897)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:548)
at sun.applet.AppletPanel.run(AppletPanel.java:299)
at java.lang.Thread.run(Thread.java:534)

Last edited by jonnycando; 01-16-2007 at 10:10 PM.
 
Old 01-18-2007, 08:44 AM   #3
MaxistXXL
Member
 
Registered: Dec 2006
Distribution: Debian/etch
Posts: 36

Original Poster
Rep: Reputation: 15
I thougt *this* error is Windows-Only!!!!

After reboot it works fine.

I'l go to kill my self :-D (1h debugging..)


greets
der Maxist
 
Old 01-18-2007, 11:20 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,522

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
The problem was you were using an older version of the JVM.

"Unsupported major.minor version 49.0" means the class was compiled to target JVM 1.5 but running on a 1.4 or older JVM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 03:13 AM
JAVA JRE installation to view java applet through browser dipenchaudhary Linux - Software 1 01-23-2006 10:20 AM
Java Applet ekl_n Programming 2 02-26-2005 12:48 PM
Java applet error: "Applet Failed" nro Programming 1 08-28-2004 06:52 PM


All times are GMT -5. The time now is 03:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration