Setting the system property in java application

Hi,
I want to make a connection to https://URL through my java application class
which will be deployed in the weblogic server. Could any one help by
telling how could I set the system properties in my java application. If I
pass the value in the java class do I have to change any value in the
weblogic.properties file.
Thanks in advance and looking forward to hear your valuable suggestion.
Sirisha

System.getProperty(..)
System.setProperty(..) is this what you are asking for?
This gets and sets the system (your machine) environment properties
Filip
In article <396d0a93$[email protected]>, [email protected] says...
>
Hi,
I want to make a connection to https://URL through my java application class
which will be deployed in the weblogic server. Could any one help by
telling how could I set the system properties in my java application. If I
pass the value in the java class do I have to change any value in the
weblogic.properties file.
Thanks in advance and looking forward to hear your valuable suggestion.
Sirisha
Filip Hanik
Software Architect
XMarkstheSpot.com
[email protected]

Similar Messages

  • Setting Derby system property in Sun Application Server batch file

    Hi all,
    I am trying to set up a home directory for my Derby databases other than the default C:\Sun\AppServer\lib that is used when asadmin.bat runs.
    I have found in the derby documentation you can set the derby.system.home System Property using -Dderby.system.home="C:\databases" and I have tried to do this in the asadmin.bat file next to all the other system properties containing the -D option.
    But still no luck, when I load the server using asadmin and check the server log file I can tell the property is not being set. I can also tell its not being set because I can't ping my database connection in the admin console. Any ideas anyone?
    Much appreciated,
    Alman

    Here is what I tried.
    No jndiname works but when I leave the value empy I get the result (see end)
    Properties props = new Properties();
    props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put("java.naming.provider.url", "iiop://localhost:3700");
    InitialContext initialContext = new InitialContext(props);
    //queueConnectionFactory = (QueueConnectionFactory) initialContext.lookup( "jms/qschdinfact");
    //queue = (Queue)initialContext.lookup("jms/qschdin");
    Enumeration en = initialContext.listBindings("");
    while(en.hasMoreElements()) {
    Binding b =(Binding)en.nextElement();
    System.out.println(b);
    ServerObject: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakefacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    commonfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    J2EE_UNIQUE_VALUE_GEN: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    trackfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    hsface: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    DatabaseInformation: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Realm_Manager: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    SerialContextProvider: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    usergroups: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakereporter: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Help please

  • How to set a system property via the config tool?

    Hello,
    how can I set a system property via the config tool? Before I chose WAS from SAP I used java with option -D<name>=<value> to set the system properties.
    Very much thanks in advance.
    Regards
    Carsten

    Hi Carsten,
    WAS config tool is located under
    e.g. usr\sap\J2E\JC00\j2ee\configtool
    start configtool.bat
    there will be opened a configuration tool GUI
    Click on the instance_ID.... leaf of the tree in the left pane and then on the server_ID.... leaf.
    Java settings will appear in the right pane after this steps.
    Best Regards,
    Violeta

  • How to set the system clock in win2000? in linux? (RH)

    hi There,
    I need to set the system time on a pure java application.
    what is the proper way to do so? (I can't find any system property which corresponds to the system clock).
    if it's platform dependent , then I need to do so on win2000 and on linux RH.
    thanks

    I don't know about Windows but on RedHat, I would use the date command. Check the man pages for date and look at the -s or --set options.  Do a Runtime.exec to execute that.
    Of course, doing the in Java is not the best option. If you are trying to synchronized clocks on Windows and Linux systems, I would use some freely available Network Time Protocol programs. RedHat has a free NTP daemon available as an RPM in the standard distribution. For Windows, theres a free program called "Net Time" that runs as a service. Both can act as clients and servers.

  • Why do I have to set the PrincipalName property on my discovered ApplicationComponent instances?

    In the simple example below I define three classes:
    MyComputerRoleClass (with base Microsoft.Windows.ComputerRole)
    MyLocalApplicationClass (with base Microsoft.Windows.LocalApplication)
    MyApplicationComponentClass (with base Microsoft.Windows.ApplicationComponent)
    As well as a hosting relationship
    MyLocalApplicationClassHostsMyApplicationComponentClass
    that let's MyLocalApplicationClass host MyApplicationComponentClasses.
    In a timed PowerShell discovery targeting the RootManagementServer (Root Management Server Emulator) I create
    1 MyComputerRoleClass instance
    1 MyLocalApplicationClass instance and 
    2 MyApplicationComponentClass instances hosted on the instance of MyLocalApplicationClass
    By setting the PrincipalName property for the instances of MyComputerRoleClass
    and MyLocalApplicationClass I implicitly create hosting relationship instances of
    Microsoft.Windows.ComputerHostsComputerRole and Microsoft.Windows.ComputerHostsLocalApplication
    respectively.
    But why do I have to set PrincipalName on instances of MyApplicationComponentClass as well? If I don't I'll get this error:
    Microsoft.EnterpriseManagement.Common.DiscoveryDataMissingKeyException,Missing key in the discovery data item.
    Key property name: Microsoft.Windows.Computer.PrincipalName
    Here my discovery script:
    param($sourceId,$managedEntityId)
    $api = new-object -comObject "MOM.ScriptAPI"
    $api.LogScriptEvent('DiscoverClassesAndRelationships.ps1', 1001, 0, "Discovery started (12)")
    $discoveryData = $api.CreateDiscoveryData(0,$sourceId,$managedEntityId)
    $computer = 'SomeServer.SomeDomain'
    $myComputerRoleClass = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyComputerRoleClass']$")
    $myComputerRoleClass.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyComputerRoleClass instance on $computer")
    $myComputerRoleClass.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer)
    $discoveryData.AddInstance($myComputerRoleClass)
    $myLocalApplicationClass = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClass']$")
    $myLocalApplicationClass.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyLocalApplicationClass instance on $computer")
    $myLocalApplicationClass.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer)
    $discoveryData.AddInstance($myLocalApplicationClass)
    $myApplicationComponentClass1 = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']$")
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyApplicationComponentClass instance")
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer) # Why is this needed
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']/Name$", "Number 1")
    $discoveryData.AddInstance($myApplicationComponentClass1)
    $myApplicationComponentClass2 = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']$")
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyApplicationComponentClass instance")
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer) # Why is this needed
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']/Name$", "Number 2")
    $discoveryData.AddInstance($myApplicationComponentClass2)
    $relationshipInstance1 = $discoveryData.CreateRelationshipInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass']$")
    $relationshipInstance1.Source = $myLocalApplicationClass
    $relationshipInstance1.Target = $myApplicationComponentClass1
    $discoveryData.AddInstance($relationshipInstance1)
    $relationshipInstance2 = $discoveryData.CreateRelationshipInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass']$")
    $relationshipInstance2.Source = $myLocalApplicationClass
    $relationshipInstance2.Target = $myApplicationComponentClass2
    $discoveryData.AddInstance($relationshipInstance2)
    $api.LogScriptEvent('DiscoverClassesAndRelationships.ps1', 1002, 0, "Discovery ended - data returned now")
    #$api.return($discoveryData)
    $discoveryData
    Here my classes and relationships:
    <TypeDefinitions>
    <EntityTypes>
    <ClassTypes>
    <ClassType ID="MyDiscoveryDemoManagementPack.MyComputerRoleClass" Base="Windows!Microsoft.Windows.ComputerRole" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false"/>
    <ClassType ID="MyDiscoveryDemoManagementPack.MyLocalApplicationClass" Base="Windows!Microsoft.Windows.LocalApplication" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false"/>
    <ClassType ID="MyDiscoveryDemoManagementPack.MyApplicationComponentClass" Base="Windows!Microsoft.Windows.ApplicationComponent" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false">
    <Property Key="true" ID="Name" Type="string"/>
    </ClassType>
    </ClassTypes>
    <RelationshipTypes>
    <RelationshipType ID="MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass" Base="System!System.Hosting" Abstract="false" Accessibility="Internal">
    <Source ID="Source" Type="MyDiscoveryDemoManagementPack.MyLocalApplicationClass"/>
    <Target ID="Target" Type="MyDiscoveryDemoManagementPack.MyApplicationComponentClass"/>
    </RelationshipType>
    </RelationshipTypes>
    </EntityTypes>
    </TypeDefinitions>
    For anyone who would like to try this out, the complete management pack (you need to change $computer = 'SomeServer.SomeDomain' to match some managed computer in your system):
    <?xml version="1.0" encoding="utf-8"?>
    <ManagementPack SchemaVersion="2.0" ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Manifest>
    <Identity>
    <ID>MyDiscoveryDemoManagementPack</ID>
    <Version>1.0.0.28</Version>
    </Identity>
    <Name>MyDiscoveryDemoManagementPack</Name>
    <References>
    <Reference Alias="SC">
    <ID>Microsoft.SystemCenter.Library</ID>
    <Version>7.0.8433.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="Windows">
    <ID>Microsoft.Windows.Library</ID>
    <Version>7.5.8501.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    <Reference Alias="System">
    <ID>System.Library</ID>
    <Version>7.5.8501.0</Version>
    <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    </Reference>
    </References>
    </Manifest>
    <TypeDefinitions>
    <EntityTypes>
    <ClassTypes>
    <ClassType ID="MyDiscoveryDemoManagementPack.MyComputerRoleClass" Base="Windows!Microsoft.Windows.ComputerRole" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false" />
    <ClassType ID="MyDiscoveryDemoManagementPack.MyLocalApplicationClass" Base="Windows!Microsoft.Windows.LocalApplication" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false" />
    <ClassType ID="MyDiscoveryDemoManagementPack.MyApplicationComponentClass" Base="Windows!Microsoft.Windows.ApplicationComponent" Accessibility="Internal" Abstract="false" Hosted="true" Singleton="false">
    <Property Key="true" ID="Name" Type="string" />
    </ClassType>
    </ClassTypes>
    <RelationshipTypes>
    <RelationshipType ID="MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass" Base="System!System.Hosting" Abstract="false" Accessibility="Internal">
    <Source ID="Source" Type="MyDiscoveryDemoManagementPack.MyLocalApplicationClass" />
    <Target ID="Target" Type="MyDiscoveryDemoManagementPack.MyApplicationComponentClass" />
    </RelationshipType>
    </RelationshipTypes>
    </EntityTypes>
    </TypeDefinitions>
    <Monitoring>
    <Discoveries>
    <Discovery ID="MyDiscoveryDemoManagementPack.MyDiscovery" Target="SC!Microsoft.SystemCenter.RootManagementServer" Enabled="true" ConfirmDelivery="false" Remotable="true" Priority="Normal">
    <Category>Discovery</Category>
    <DiscoveryTypes>
    <DiscoveryClass TypeID="MyDiscoveryDemoManagementPack.MyComputerRoleClass" />
    <DiscoveryClass TypeID="MyDiscoveryDemoManagementPack.MyLocalApplicationClass" />
    <DiscoveryClass TypeID="MyDiscoveryDemoManagementPack.MyApplicationComponentClass" />
    <DiscoveryRelationship TypeID="MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass" />
    </DiscoveryTypes>
    <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedPowerShell.DiscoveryProvider">
    <IntervalSeconds>300</IntervalSeconds>
    <SyncTime />
    <ScriptName>DiscoverClassesAndRelationships.ps1</ScriptName>
    <ScriptBody><![CDATA[param($sourceId,$managedEntityId)
    $api = new-object -comObject "MOM.ScriptAPI"
    $api.LogScriptEvent('DiscoverClassesAndRelationships.ps1', 1001, 0, "Discovery started (12)")
    $discoveryData = $api.CreateDiscoveryData(0,$sourceId,$managedEntityId)
    $computer = 'SomeServer.SomeDomain'
    $myComputerRoleClass = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyComputerRoleClass']$")
    $myComputerRoleClass.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyComputerRoleClass instance on $computer")
    $myComputerRoleClass.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer)
    $discoveryData.AddInstance($myComputerRoleClass)
    $myLocalApplicationClass = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClass']$")
    $myLocalApplicationClass.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyLocalApplicationClass instance on $computer")
    $myLocalApplicationClass.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer)
    $discoveryData.AddInstance($myLocalApplicationClass)
    $myApplicationComponentClass1 = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']$")
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyApplicationComponentClass instance")
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer) # Why is this needed
    $myApplicationComponentClass1.AddProperty("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']/Name$", "Number 1")
    $discoveryData.AddInstance($myApplicationComponentClass1)
    $myApplicationComponentClass2 = $discoveryData.CreateClassInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']$")
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "MyApplicationComponentClass instance")
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $computer) # Why is this needed
    $myApplicationComponentClass2.AddProperty("$MPElement[Name='MyDiscoveryDemoManagementPack.MyApplicationComponentClass']/Name$", "Number 2")
    $discoveryData.AddInstance($myApplicationComponentClass2)
    $relationshipInstance1 = $discoveryData.CreateRelationshipInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass']$")
    $relationshipInstance1.Source = $myLocalApplicationClass
    $relationshipInstance1.Target = $myApplicationComponentClass1
    $discoveryData.AddInstance($relationshipInstance1)
    $relationshipInstance2 = $discoveryData.CreateRelationshipInstance("$MPElement[Name='MyDiscoveryDemoManagementPack.MyLocalApplicationClassHostsMyApplicationComponentClass']$")
    $relationshipInstance2.Source = $myLocalApplicationClass
    $relationshipInstance2.Target = $myApplicationComponentClass2
    $discoveryData.AddInstance($relationshipInstance2)
    $api.LogScriptEvent('DiscoverClassesAndRelationships.ps1', 1002, 0, "Discovery ended - data returned now")
    #$api.return($discoveryData)
    $discoveryData]]></ScriptBody>
    <Parameters>
    <Parameter>
    <Name>sourceId</Name>
    <Value>$MPElement$</Value>
    </Parameter>
    <Parameter>
    <Name>managedEntityId</Name>
    <Value>$Target/Id$</Value>
    </Parameter>
    </Parameters>
    <TimeoutSeconds>120</TimeoutSeconds>
    </DataSource>
    </Discovery>
    </Discoveries>
    </Monitoring>
    <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="true">
    <DisplayStrings>
    <DisplayString ElementID="MyDiscoveryDemoManagementPack.MyComputerRoleClass">
    <Name>A demo Computer Role (base Microsoft.Windows.ComputerRole)</Name>
    <Description></Description>
    </DisplayString>
    <DisplayString ElementID="MyDiscoveryDemoManagementPack.MyLocalApplicationClass">
    <Name>A demo Local Application (base Microsoft.Windows.LocalApplication)</Name>
    <Description></Description>
    </DisplayString>
    <DisplayString ElementID="MyDiscoveryDemoManagementPack.MyApplicationComponentClass">
    <Name>A demo Application Component (base Microsoft.Windows.ApplicationComponent)</Name>
    <Description></Description>
    </DisplayString>
    <DisplayString ElementID="MyDiscoveryDemoManagementPack.MyDiscovery">
    <Name>My Demo Discovery</Name>
    <Description>Script based discovey of all demo classes and relationships in this demo. To run at the Root Management Server Simulator</Description>
    </DisplayString>
    </DisplayStrings>
    <KnowledgeArticles></KnowledgeArticles>
    </LanguagePack>
    </LanguagePacks>
    </ManagementPack>

    According to
    System Center Authoring Hub:
    "Any key properties of the class being discovered and the key properties of any of its parents must be provided. Values for other properties are optional. In this example [as well as mine], the class being discovered is hosted by Windows Computer
    and the key property of that class is added to the instance."
    http://social.technet.microsoft.com/wiki/contents/articles/14261.operations-manager-management-pack-authoring-discovery-scripts.aspx
    So that's why :-)
    Michael

  • 1.5 How to globally set the System Cache location

    FROM ANOTHER USER ON ANOTHER BOARD:
    This one did not get answered completely.
    ************************* Question:
    Hello,
    I want to deploy JWS on a client PC with Microsoft XP OS. This client have multiple users. JWS put a file deployment.properties in the directory "documents and setting" for the current user.
    How can I create a uniquely file deployment.properties for all users of this client (new and existing profiles) ?
    Create a directory "documents and setting/all users/application data/sun/java/deployment/" with the file deployment.properties don't work.
    Create a directory "documents and setting/default user/application data/sun/java/deployment/" with the file deployment.properties is working but is not good for the existing users. This is good uniquely for new users.
    is there a solution ?
    King regards,
    funchung
    ************************* ANSWER:
    For windows, the system config file is at:
    {Windows Directory}\Sun\Java\Deployment\
    The value of the {Windows Directory} is determined by using the Win32 API GetWindowsDirectory.
    So for example, on XP, the system config file is:
    c:\WINDOWS\Sun\Java\Deployment\deployment.properties
    The settings in this system config file will be used by all users on the system.
    ***************************** HIS REPLY
    I've tried this and it doesn't seem to work.
    I've also tried createing a deployment.config file as per the http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html article and this doesn't work for me.
    Has anyone done this successfully??
    ******************************** MY REPLY:
    This is true.
    I can get the system install to work if I add the parameter:
    deployment.system.cachedir=C\:\\testcache
    to the deployment.properties file found under:
    C:\Documents and Settings\username\Application Data\Sun\Java\Deployment
    but it will NOT work by adding it to the:
    C:\WINDOWS\Sun\Java\Deployment
    directory. It just creates a new default one in the user's folder.
    What am I doing wrong?
    If there is not a way to globally set the System Cache location, then this isn't much better than the user cache for being able to "install" the software once on the PC and let any user that signs in access that application.
    We had high hopes for this, since this functionality was taken away from us once the java cache started being stored in the user's folders.
    More details:
    I just tried setting the mandatory=true setting and it tells me that it is not allowed to start because it can't find the
    deployment.properties in the same folder (full path is displayed) but I know it is there, because it is the same folder. I even double checked the spelling.
    Maybe there is a bug in the way it finds that properties file, or maybe I need to include something in that file that I didn't find in documentation?
    All it has in it is the one line:
    deployment.system.cachedir=C\:\\testcache
    Can anybody help shed light on this?
    It seems to be a bug that it can't find the deployment.properties file in the 'system' folder.
    -Chris

    I now found more on another thread:
    http://forum.java.sun.com/thread.jspa?messageID=3500778&#3500778
    You can close this one.
    Sorry.

  • How to set my System Property for frmall.jar like !

    I have a JAR file named SecAuth.jar in ORACLE_HOME\forms\java\ directory.
    I configured this JAR file in ORACLE_HOME\forms\server\formsweb.cfg file archive tag. Like,
    archive=frmall.jar,SecAuth.jar
    Its working very nice.
    Now I need to give a System Property to one of the Class file in the SecAuth.jar !
    Actually my System Property is,
    -Dproject.system.securityFile=C:\client\security.properties
    How can I do this sir ? Can someone help me ?

    Try looking in the $ORACLE_HOME/opmn/conf/opmn.xml file. You'll see a set of process definitions that correspond to the OC4J instances you have configured. There should be a "start-properties" or some similar element to that, in which you can place your required System property. There should be examples of properties in there already.
    When OPMN starts your OC4J process, it will pass it the System property you set (along with all the other ones that were already there).
    -steve-

  • Setting a system.property twice in a same JVM

    Hello,
    I have got a problem concerning the setting of a system property.
    When I run a first time my program I test a case by setting a system property, that works fine.
    Now I want to change the same property in the same JVM by doing:
    System.setProperties("key","oldvalue");
    System.getProperties("key", "oldvalue"); //I obtain oldvalue
    System.setProperties("key","newvalue");
    System.getProperties("key", "newvalue"); //I obtain newvalueBut apparently it seems the JVM doesn't take the new value of the property even if the getProperty() give me the new value.
    So my question is can I change several times the value of a same property in the same JVM or it is technically not possible?
    I read the tutorial about System and it says :"The setProperties method changes the set of system properties for the current running application "
    Thank you for any assistance

    And I say that it apparently does not work because I run some tests
    to find why my results were wrong even if in setting a new property.Well, one of those tests might be to just check the changed property right after the change.
    Which you do in your code.
    And which results in a correctly changed property, doesn't it?
    So, what are those other tests you've performed, what was it that you've expected them to do and what did they actually do?
    So it is just because if you have initialized the system property once you
    cannot do it again or you have to record the new value in a file and then restart
    your application by take the value of the system property inside the previously created fileNone of both. You can just change the system properties (just like every other properties) and the changes take place immediately (unless you run multithreaded, in which case you should put the "setproperty" stuff into a synchronized block or method.
    Of course, if you try and change the properties of your operating system, then that's different. But I won't start and guess around about what exactly you try to do and what does not work.
    Again, try to state plainly
    1.) what you programmed, perhaps with some line of code
    2.) what you expected your code to do
    3.) what happened instead
    Provided with that information, forum readers should be able to provide you with some help.
    -T-

  • Help-how can i connect to the XE through my java application?

    Hi, i am trying to connect to the XE through my java application. I have downloaded the jdbc driver tho. but the error occured: cant find the symbol (class oracledatasource not found) . could anyone here tell me what else should i try to fix it? where should i put the jdbc packages ? anyone's prompt reply would be much appreciated! thanks a lot.

    Hi ,thank you very much for your guide.
    i am actually trying to connect to the XE server through my JSP files.
    i download the Oracle jdbc driver packages and put them in the same folder with JSP files. but i did not set the class path tho.
    do i have to set the enviroment variables for the classpath of Oracledatasource class? thanks a lot.
    another problem i got is installing the JDeveloper, it seemed my computer just got stuck there when installing JDeveloper. my laptop is with 256MB memory tho.
    the code i used to connect to the XE server in my jsp file is as below:
    <%@ page language="java" contentType="text/html"%>
    <%@ page import="java.sql.*" %>
    <%@ page import java.sql.Connection%>;
    <%@page import java.sql.SQLException%>;
    <%@page import oracle.jdbc.pool.OracleDataSource%>;
    <%@ page import="java.io.*" %>
    <% String jdbcUrl = "jdbc:oracle:thin:@localhost";
    Connection conn;
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(jdbcUrl);
    %>
    dose it have some problems there?
    thanks a lot.
    Message was edited by:
    Novice

  • [svn:fx-trunk] 8903: Tiny adjustment to the previous change in revision 8902 - this actually allows the fx : language namespace qualification to opt out of setting the id property in all scenarios .

    Revision: 8903
    Author:   [email protected]
    Date:     2009-07-29 11:17:43 -0700 (Wed, 29 Jul 2009)
    Log Message:
    Tiny adjustment to the previous change in revision 8902 - this actually allows the fx: language namespace qualification to opt out of setting the id property in all scenarios.
    QE notes: N/A
    Doc notes: N/A
    Bugs: SDK-21700
    Reviewer: Discussed with Paul
    Tests run: Checkintests, Mustella AdvancedCSS
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21700
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • How to know the System State in java

    Hi
    I would like to know ,is there a way to get the System status in java, like whether System is idle or any browser is opened or any application is running?
    this information is required to run the screensaver as we know Screen saver will run when System is idle.
    This is very Urgent
    Thank U
    Dharma

    You cannot get the systems status without running something.
    Then when you run something it will say, something is running.
    You cannot implement this functionality in Java.
    You may be able to get this information in JNI but you will need to have a good low level understanding to do it.
    I would suggest you write a Windows screensaver (there should be examples on the web) and then have it run a Java application when it is active.

  • How to set the actionname property in B2B 11g

    I have an outbound file sent via AS2 over http. I gather from other b2b forums/documents that for preserving the file name I have to set the actionname property. I have a BPEL process which is setting the fromTP, toTP, document TYPE etc, and then invoking the B2B and sending the document. Can I set the actionname property in the BPEL?
    When I am trying to assign a value like "contentType:application/octet-stream;filename:abc.xml", I don't see any actionname property in the "To" side.

    As there are three ways through which you may pass a message to B2B, so there are three ways to set Action name property.
    If you are using SCA/Fabric then set below properties -
    b2b.fileName
    b2b.contentType
    If you are using JCA JMS adapter, then set below property -
    jca.jms.JMSProperty.ACTION_NAME
    If you are using JCA AQ adapter then set -
    ACTION_NAME
    Regards,
    Anuj

  • How to create the exe files for java application

    How to create the exe file for java application?
    got any software to do that?
    Thanks

    In terms of converting java applications into exe files, there are 3 schools of thought:
    1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
    http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
    2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
    http://www.sureshotsoftware.com/exej/
    http://www.objects.com.au/products/jstart/index.jsp
    http://www.duckware.com/products/javatools.html
    http://www.ucware.com/jexec/
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/
    http://www.jelude.cjb.net/
    http://thor.prohosting.com/~dfolly/java/index.html
    3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
    http://www.excelsior-usa.com/jet.html (evaluation version available)
    4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
    Can't think of any free options right now.

  • Set the pagination property of master page through scripting

    Hi,
    Is it possible to set the Pagination property of a master page via scripting.
    Where and how can this be set if at all possible.
    There are properties like oddOreven etc available. but how can they be used in scripting.
    Regards
    Neha

    Yes you can set the pagination property dynamically in Java Script or formcalc.
    The sample code in Java script as follows:
    xfa.form.form1.pageSet.Page1.oddOrEven = "even";
    The possible values are "any" , " odd" , "even"
    You can write this code in the initialize event.
    Also, the 'Printing' property of the master page set should not Page occurance.It should be either both sides or front side only.

  • How do I set the system time?

    Hello
    The system time can be read using System.currentTimeMillis(), but, how can I set it?
    Thanks

    several approaches:
    you could use the OS function to set and call it via Runtime.exec().
    For WIndows e.g.: "time 08:15:00" to set the system time.
    another solution: http://www.rgagnon.com/javadetails/java-0285.html

Maybe you are looking for

  • Asset back dated GRN.(Very urgent)

    Dear Gurus, My client is facing an issue that while making backlog they missed out to pass Some asset GRN related to Asset, say for the month  April and May after all verifications they came to know that some of the Asset GRN is missing. know the iss

  • XSL and text output

    I tried transforming the following XSL but the characters <, @amp never gets transformed as < , & respectively instead the output has their equivalent character codes. Is there something I am missing ? Sample XSl: <?xml version = '1.0'?> <xsl:stylesh

  • My iphone 3g is stuck on plug into itunes screen

    It did this after I tried updating my phone. I have tried different USB cables. I have uninstalled and reinstalled itunes. I have did the software interference thing. Help!!!!!!!!!!!!!!

  • Resizing and exporting to flash = headaches and long nights

    I have footage shot in 16:9 PAL DV (interlaced) Client now wants delivery as a flash file 600 x 400 pixels. +How do I get the best result?+ Should I output the file as a PAL DV interlaced and then convert it to flash? The results I got are not very s

  • Can we change the color of button on mouse over ?

    Hi, - can we change the color of button on mouse over? - I have three groups on my presentation, each has 10 slides. I have inserted the relative progress text. It is showing (Page 2 of 30) but I want it (2 of 10). In other words I want relative prog