Solved

getting a security question in intellij

Posted on 2014-01-20
4
444 Views
Last Modified: 2014-02-03
this simple applet runs in eclipse ok, but in intellij i am getting a security error (I use mac os x 10.9) :

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 12.app/bin" -Dfile.encoding=UTF-8 -classpath "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/deploy.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/dt.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaws.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jconsole.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/management-agent.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/sa-jdi.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/izabelaskibinska/applet/out/production/applet:/Applications/IntelliJ IDEA 12.app/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain sun.applet.AppletViewer file:/private/var/folders/mn/kvyn15p53cj2y60tvvr4f9m80000gn/T/AppletPage8374294205929564142.html
Exception in thread "main" java.security.AccessControlException: access denied (java.io.FilePermission /private/var/folders/mn/kvyn15p53cj2y60tvvr4f9m80000gn/T/AppletPage8374294205929564142.html read)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:376)
	at java.security.AccessController.checkPermission(AccessController.java:549)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
	at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
	at java.io.File.isDirectory(File.java:752)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:65)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
	at sun.applet.AppletViewer.parse(AppletViewer.java:1085)
	at sun.applet.AppletViewer.parse(AppletViewer.java:1056)
	at sun.applet.Main.run(Main.java:138)
	at sun.applet.Main.main(Main.java:80)
	at sun.applet.AppletViewer.main(AppletViewer.java:1239)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Process finished with exit code 1

Open in new window

0
Comment
Question by:sniger
  • 3
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 39795500
Any Java applet has to be signed to run properly
0
 

Author Comment

by:sniger
ID: 39795592
how to sign  a java applet ?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39796644
See http://docs.oracle.com/javase/7/docs/technotes/guides/plugin/developer_guide/rsa_signing.html

Bear in mind if you use a self-authorised certificate, you will get an 'Unknown publisher' warning when the applet runs
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39830489
:)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet example issue 6 46
eclipse buid path vs tomcat lib path 10 34
eclipse console opening separately 2 29
Chrome and Firefox Java 5 51
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question