Error in javac

Project:JNode All
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:works for me
Description

I used javac to compile the following:

import java.awt.*;
public class Test{
public static void main(String[] args){
Frame frame = new Frame();
// etc,...
}
}

Got a waring at compile: Cannot find annotation method 'name()' in type 'org.jnode.vm.annotation.MagicPermission'

Got an error at run time: java.security.AcessControlException: permision not granted to Test (+...)

Same for swing.JFrame.

My question: how to use awt/swing packages?

#1

I tentatively tried to compile Test.class, just in case I miss understood something.

JNode answers "Test.class does not exist".

#2

Status:active» works for me

The problem is a simple permission problem.
"javac X.java" and "java X" should work, except you don't have appropriate permission level. If it does not work with set permissions please reopen.

Try again with security turned off, as I'm not sure if one can change permissions for new code at runtime. To turn it off configure your build (see here) to disable security or you could also try it at runtime but I'm not sure if that works ("set jnode.security.enabled false" in shell).