begin
dbms_java.grant_permission
('SCOTT',
'java.io.FilePermission',
'<<ALL FILES>>',
'execute');
dbms_java.grant_permission
('SCOTT',
'java.lang.RuntimePermission',
'*',
'writeFileDescriptor' );
end;
Friday, 18 January 2019
grant dbms_java.grant_permission
Revoke DBMS_JAVA permissions
Revoke dbms_java permission
Query the dba_java_policy table
$sqlplus / as sysdba
SQL>select * from dba_java_policy
KING GRANTEE TYPE SCHEMA TYPE NAME NAME ACTION ENABLED SEQ
GRANT XXPMS SYS java.io.FilePermission * read ENABLED 178
GRANT XXPMS SYS java.io.FilePermission /- read,write ENABLED 181
GRANT XXPMS SYS java.io.FilePermission /bin/ls execute ENABLED 180
Using the SEQ value, you can run the following statement to revoke the granted java permissions
eg: suppose you want to revoke SEQ 178
Query the dba_java_policy table
$sqlplus / as sysdba
SQL>select * from dba_java_policy
KING GRANTEE TYPE SCHEMA TYPE NAME NAME ACTION ENABLED SEQ
GRANT XXPMS SYS java.io.FilePermission * read ENABLED 178
GRANT XXPMS SYS java.io.FilePermission /- read,write ENABLED 181
GRANT XXPMS SYS java.io.FilePermission /bin/ls execute ENABLED 180
Using the SEQ value, you can run the following statement to revoke the granted java permissions
eg: suppose you want to revoke SEQ 178
begin
DBMS_JAVA.disable_permission(178);
DBMS_JAVA.delete_permission(178);
end;
Saturday, 28 April 2018
List ciphers used by JVM
List ciphers used by JVM
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import javax.net.ssl.SSLServerSocketFactory;
public class Ciphers
{
public static void main(String[] args)
throws Exception
{
SSLServerSocketFactory ssf = (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
String[] defaultCiphers = ssf.getDefaultCipherSuites();
String[] availableCiphers = ssf.getSupportedCipherSuites();
TreeMap ciphers = new TreeMap();
for(int i=0; i<availableCiphers.length; ++i )
ciphers.put(availableCiphers[i], Boolean.FALSE);
for(int i=0; i<defaultCiphers.length; ++i )
ciphers.put(defaultCiphers[i], Boolean.TRUE);
System.out.println("Default\tCipher");
for(Iterator i = ciphers.entrySet().iterator(); i.hasNext(); ) {
Map.Entry cipher=(Map.Entry)i.next();
if(Boolean.TRUE.equals(cipher.getValue()))
System.out.print('*');
else
System.out.print(' ');
System.out.print('\t');
System.out.println(cipher.getKey());
}
}
}
Source
how to get the version of the Spring using Spring.jar
Using below two ways we can find the Spring version:
Process 1: using java program
import org.springframework.core.SpringVersion;
public class VersionChecker
{
public static void main(String [] args)
{
System.out.println("version: " + SpringVersion.getVersion());
}
}
Process 2: using md5
$ md5sum spring-2.5.5.jar
82a2134b227f717066da4f4b059925d3
http://www.google.com/search?q=82a2134b227f717066da4f4b059925d3
Process 1: using java program
import org.springframework.core.SpringVersion;
public class VersionChecker
{
public static void main(String [] args)
{
System.out.println("version: " + SpringVersion.getVersion());
}
}
Process 2: using md5
$ md5sum spring-2.5.5.jar
82a2134b227f717066da4f4b059925d3
http://www.google.com/search?q=82a2134b227f717066da4f4b059925d3
Friday, 10 July 2015
Redo keyboard shortcut for eclipse
In Eclipse go to:
Window > Preferences > General > Editor > Keys
source.
Window > Preferences > General > Editor > Keys
Type filter text to redo then select command.
copy command to give another shortcut to redo
-->Apply
-->OK.source.
Labels:
eclipse
System Settings icons missing in 14.04
sudo apt-get install ubuntu-desktop
sudo apt-get install unity-control-center-signon gnome-control-center-unity
source
Labels:
ubuntu
Ubuntu software center keeps crashing
Ubuntu software center keeps crashing
- sudo apt-get install -f
- apt-get autoremove
- sudo apt-get purge software-center
- sudo apt-get update
- sudo apt-get dist-upgrade
- sudo apt-get install software-center
- sudo dpkg-reconfigure software-center --force
Labels:
ubuntu
Wednesday, 14 January 2015
How to include Java Source code within Eclipse?
How to include Java Source code within Eclipse?
In Netbeans, I can see the built-in sourse code of Java by clicking on LeftClick + Ctrl, and the .java file is shown:
In Netbeans, I can see the built-in sourse code of Java by clicking on LeftClick + Ctrl, and the .java file is shown:
Labels:
eclipse



