Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Disabling Java security manager on linux?
Posted 2016年2月3日 GMT+1 16:41 1 Reply
Please login with a confirmed email address before reporting spam
Hello,
I want to use my Java code under linux, that worked before under Windows. It seems that the Java security manager disables many things, among others creating any files. Running the code below from the command line (java -cp . test) produces the file in my home directory. When I run it from comsol, I get the message
access denied ("java.io.FilePermission" "/home/barna/comsol.test.out" "write")
How can I disable the security manager in comsol? (I am using comsmol 5.1)
Thank you
daniel
import com.comsol.model.*;
import com.comsol.model.*;
import com.comsol.model.util.*;
import java.io.*;
public class test
{
public static void main(String[] args) throws Throwable
{
try
{
PrintWriter pw = new PrintWriter("/home/barna/comsol.test.out");
pw.printf("Hello world\n");
pw.close();
}
catch(SecurityException t)
{
Message.show(t.getMessage());
}
}
}
I want to use my Java code under linux, that worked before under Windows. It seems that the Java security manager disables many things, among others creating any files. Running the code below from the command line (java -cp . test) produces the file in my home directory. When I run it from comsol, I get the message
access denied ("java.io.FilePermission" "/home/barna/comsol.test.out" "write")
How can I disable the security manager in comsol? (I am using comsmol 5.1)
Thank you
daniel
import com.comsol.model.*;
import com.comsol.model.*;
import com.comsol.model.util.*;
import java.io.*;
public class test
{
public static void main(String[] args) throws Throwable
{
try
{
PrintWriter pw = new PrintWriter("/home/barna/comsol.test.out");
pw.printf("Hello world\n");
pw.close();
}
catch(SecurityException t)
{
Message.show(t.getMessage());
}
}
}
1 Reply Last Post 2016年2月8日 GMT+1 11:02