PRAC
asked on
Jar and Policy file
Hi All,
Earlier we used to execute our application using the run.bat file containing the following command:
java -classpath .\lib -D"java.ext.dirs=.\lib"
-Djava.security.policy==cl ient.polic y com.sciatl.svt.ui.Login
Obviously it opens up a dos console which we are trying to avoid in the current release and the only option is to package all the class file in a jar file. With the help of the manifest file i am launching the Login class.
Here is the manifest file:
Manifest-Version: 1.2
Created-By: 1.3.1 (Sun Microsystems Inc.)
Main-Class: com.sciatl.svt.ui.Login
Class-Path: lib/classes12.jar lib/ejb.jar lib/jaas.jar lib/jaxb-rt-1.0-ea.jar lib/jta.jar lib/oc4j.jar lib/oc4jclient.jar
Now i don't know how to specify the client.policy file in my manifest file or can i specify my policy file somewhere?
Kindly let me know if you have any suggestions or ideas.
Thanks & Regards,
Prem.
Earlier we used to execute our application using the run.bat file containing the following command:
java -classpath .\lib -D"java.ext.dirs=.\lib"
-Djava.security.policy==cl
Obviously it opens up a dos console which we are trying to avoid in the current release and the only option is to package all the class file in a jar file. With the help of the manifest file i am launching the Login class.
Here is the manifest file:
Manifest-Version: 1.2
Created-By: 1.3.1 (Sun Microsystems Inc.)
Main-Class: com.sciatl.svt.ui.Login
Class-Path: lib/classes12.jar lib/ejb.jar lib/jaas.jar lib/jaxb-rt-1.0-ea.jar lib/jta.jar lib/oc4j.jar lib/oc4jclient.jar
Now i don't know how to specify the client.policy file in my manifest file or can i specify my policy file somewhere?
Kindly let me know if you have any suggestions or ideas.
Thanks & Regards,
Prem.
don't think you can sorry
You can avoid the console window by invoking javaw in stead of java
I don't know the answer about the policy file.
;JOOP!
I don't know the answer about the policy file.
;JOOP!
ASKER
Even if i use javaw instead of java, when i double click my run.bat the dos console window comes up.
ASKER
I am able to ignore the dos window by adding "start" before javaw in my run.bat file. Now my run.bat contains:
start javaw -classpath .\lib -D"java.ext.dirs=.\lib"
-Djava.security.policy==cl ient.polic y com.sciatl.svt.ui.Login
Thanks & Regards,
Prem.
start javaw -classpath .\lib -D"java.ext.dirs=.\lib"
-Djava.security.policy==cl
Thanks & Regards,
Prem.
I presume you run on Windows98 or ME : indeed that's a bug.
;JOOP!
;JOOP!
ASKER
The OS is Windows XP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am able to set my policy file using the following line in my Login class:
System.setProperty("java.s ecurity.po licy", "client.policy");
Thanks to "helloexpert".
System.setProperty("java.s
Thanks to "helloexpert".
http://java.sun.com/j2se/1.3/docs/guide/security/PolicyFiles.html