Geraldine Premkumar

Greenhorn
+ Follow
since May 01, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Geraldine Premkumar

Hi

I have a shell script that calls java program. I need to pass parameters not as command line arguments to the java program but to java's standard input. Is there a way to do this in the shell script. I do know that < redirects I/O but how do I apply it here since I want to send only specific parameters and not the entire contents of the file.
I am very new to shell scripts and really appreciate any pointers.

Thanks
Geraldine
17 years ago
Thanks a lot. Helped me figure it out.
17 years ago
Hi,

I am new to this forum so if this is not the right place to post this please redirect it. I have a perl script obtains passwords from STDIN and passes it to a java program(Utilities) as command line arguments, as shown

my $Utilities = "C:/jdk/bin/java -classpath $ENV{CLASSPATH} Utilities $oldpass $newpass";
system ($Utilities);

For security reasons I would like to pass the passwords as standard input to the java program instead of command line argruments.
I am really very new to perl and would really appreciate any input.

Thanks
Geraldine
17 years ago
Hi

Thank you for your reply. web isnt the top level directory but I have included the absolute path from the top level as

"file:///home/user/web/myfiles.jar" in the grant statement and it still doesnt work.

Thanks
Geraldine
17 years ago
Hi,

I am new to javaranch and am not sure if this is the right place to post question on java2 policy files. If not please route it to the right forum.

I have restricted access to a pacakge in the ${java.home}/jre/lib/security/java.security file through
package.access = test.mypackage;

Now I want to grant access to the above package only to web.myfiles.jar which I did through the following entry in ${java.home}/jre/lib/security/java.policy

grant codeBase "file:///web/myfiles.jar" {
permission java.lang.RuntimePermission "accessClassInPackage.test.mypackage";
};

I run the following command

java -DenableJava2Security=true -Djava.security.manager Trialcode

where Trialcode is a class file in web/myfiles.jar.

TrialCode just calls a class in test.mypackage. I expect TrialCode to have the permission to do that but I get the
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.test.mypackage).

What am I missing out here?

Thanks
Geraldine
17 years ago