Default Java properties

Does anyone know how to set a default property, without specifying it on the command line. ie if you use the command line the command is:
java -Dthis.property=somevalue MyProg.class
I want to be able to do that without specifying it on the command line. ie this command:
java MyProg.class
automatically picks up some default properties.
I know you can do this with swing properties by defining a file called swing.properties in the lib directory of the jre. Can this be done with normal system properties?

Thanks for your reply.
I am looking for a more general purpose use. As in I
am using a program that I did not write. In Windows
NT I can choose to set up a service to start this app
or use a script file that includes a call to "java
.... file.class" to start the application. In the
command script I have it set up to set a certain
property that the application needs. In order to run
this script, someone has to log on and run it manually
or have it in their start up folder. If I allow the
app to start up as a service, no one has to log on,
the machine just needs to be powered up for the app to
run. The problem is, the property I need set is not
there.
So to sum it up ALL of the following are true.
1. You need a command line property.
2. You are using a script to run the jvm (and java application.)
3. That script is set up to run as a service.
4. Lastly it "just doesn't work."
Given the above it means that this has nothing to do with java.
You are probably running the service with the 'default' user. That generally isn't a good idea, mainly because it is rather hard to tell exactly what that user can access, and in particular because it means things that normally are set up are not set up.
So the first step is to set up a user to run that service. Then change the service so it starts up with that user.
The second step is to log on as that user (the user should not be a normal user.) And then run the application using the script. Modify the environment and the script until the application works as you want.
Finally, log off, restart the box and see if the service starts. If it doesn't then the most likely reason is because you made an assumption about the environment of the user that just wasn't true. The most common problem is where the service starts up (the 'current working directory'.) That can be most easily fixed by hard coding all paths or determining where the real current working directory is for that service (probably 'windows/system') and modifying the environment again so it works there.

Similar Messages

  • Static lookup lists:read data from a Java *.properties file

    Hi
    i need to make static lookup lists i am using read data from a Java *.properties file
    i am using the Class "PropertyFileBasedLookupViewObjectImpl" that wrote by Steve Muench in ToyStore.
    but i need to use the default language for that i update the loadDataFromPropertiesFile()
    method to find the correct properties file
    String temp=Locale.getDefault().getLanguage();
    String propertyFile =
    getViewDef().getFullName().replace('.', '/')+"_"+temp+ ".properties";
    the problem:
    For English(TEST_en.properties) it is good and working
    For Arabic(TEST_ar.properties) read from correct file _ar.properties
    but the dispaly character is wrong
    When Debug
    In the File 1=دمشق
    In debug 1=/u32423

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Can't set default java for Mozilla in java control panel

    OK. It was fine before installation of SE 6u5. Now Sun java works ok in IE7 but not in Firefox 2.0.0.8. THe problem is obviously in the java control panel that sun java is set as default java for MS IE, but not Mozilla. Here is my question:
    I used to be able to tick BOTH IE and Mozilla. But now, when I tick Mozilla, it accepts but after I click yes to close the control panel and open it again, the tick i just made disappears. (So, it means not accepted as a default java) I did make new installation of Firefox for other reasons. Could it be that something has been messed up by both installations. I have tried to remove the deployment.properties and install JRE 1.6.0_5 again while Firefox is already there, but in vein. Thre is another problem that may be related. I can't use the installer downloaded from the internet. I have to use the installer available in the Documents and Settings\administrator\application data\sun\java\jre1.6.0_05 to install jre1.6.0_5.
    Environment: Windows XP pro SP2 with up-to-date Windows updates. Sun java installed: JRE 1.4.2_17, JRE1.6.0_5, and JDK 1.5.0_15.
    I need help to know what can I do to make sun java woking with my Firefox again.... Another question: can i uninstall the JRE 1.4.2_17 since I have now JRE 1.6.0_5?
    Thanks in anticipation.

    You cannot set a default value for this attribute, because by default Identity Sync sets useraccountcontrol to 512.
    You can find this default value in the configuration registry (under the ou=services tree on your configuration directory server) and change it to 514. Make sure you restart the Identity Sync services after you update the value.
    Bertold

  • Bug - Default Java version

    When I'm changing the default java version in the Default Project Properties to 1.5.0_05-b05 and creating a new project; the new project still has java version 1.5.0_05 (Default).
    Bug?
    /Per-Arne

    I have just made the test of setting JDK 1.5.0_04 as the default version of Java and when I created a new project it worked perfectly. The change was made by downloading JDK 5 update 4 from Sun; making it accessible to JDeveloper by defining a new J2SE Definition in JDeveloper (from Default Project Properties) and selecting it as the default version of Java.
    Please note that even though 1.5.0_05-b05 was not selected by default, it was selectable for the new project, so it's not a big deal, but I still think that it must be a bug under the hood that should be corrected.
    The reason that I tried to change the default Java version was that Sun's version was 1.5.0_05-b05 and JDeveloper's was "only" 1.5.0_05-b03. ;-)

  • Help - I cannot set the Default Java for Browsers

    Hello:
    I'm running Win 7, the Home Premium, 64 bit flavor. I have IE 8 and FF 3.5.8 installed. FF is the default browser. I've installed Java and when I go to the test page: http://www.java.com/en/download/help/testvm.xml
    I get a message which says: "Something is wrong. Java is not working."
    HOWEVER, if I open a command prompt and type java -version, I get this:
    C:\Users\dogzilla>java -version
    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode)
    So I went to the control panel app, the advanced tab, and expanded the node for Default Java for Browsers. I have 2 problems.
    1. The checkbox for Microsoft Internet Explorer is greyed out; I cannot change any settings here at all.
    2. I checked the checkbox for Mozilla Family. Then, when I click OK, I get an error message which states:
    "Unable to change browser settings. Please check that Mozilla or Firefox or Netscape is properly installed on the system and/or that you have sufficient permissions to change system settings."
    Since I'm writing this message to the forum using FF, I'm going to guess that I have the browser installed correctly. So that leaves me with a permissions problem -- which I don't doubt. I have no idea where to start looking though. Especially considering I can run the files in the bin directory from a command line without any problems.
    Does anyone know how I can solve the two problems I described in this thread? Suggestions are greatly appreciated.
    Thanks!

    Thanks for the reply!
    I tried running as admin and no luck. Still experiencing the same problems.
    I've did some more reading (much more in fact for what this problem should be worth) and other forums mention that on 64 bit Windows systems, both the 32 bit and 64 bit JRE need to be installed.
    When I was running Win XP, I could just download the SDK, create an environment variable, and I was good to go. Now, it looks like if I just install the SDK, I need the JRE plugin download for just the browsers -- what a ridiculous waste/duplication!
    Thanks again for your help.

  • How to set proxy authentication using java properties at run time

    Hi All,
    How to set proxy authentication using java properties on the command line, or in Netbeans (Project => Properties
    => Run => Arguments). Below is a simple URL data extract program which works in absence of firewall:
    import java.io.*;
    import java.net.*;
    public class DnldURLWithoutUsingProxy {
       public static void main (String[] args) {
          URL u;
          InputStream is = null;
          DataInputStream dis;
          String s;
          try {
              u = new URL("http://www.yahoo.com.au/index.html");
             is = u.openStream();         // throws an IOException
             dis = new DataInputStream(new BufferedInputStream(is));
             BufferedReader br = new BufferedReader(new InputStreamReader(dis));
          String strLine;
          //Read File Line By Line
          while ((strLine = br.readLine()) != null)      {
          // Print the content on the console
              System.out.println (strLine);
          //Close the input stream
          dis.close();
          } catch (MalformedURLException mue) {
             System.out.println("Ouch - a MalformedURLException happened.");
             mue.printStackTrace();
             System.exit(1);
          } catch (IOException ioe) {
             System.out.println("Oops- an IOException happened.");
             ioe.printStackTrace();
             System.exit(1);
          } finally {
             try {
                is.close();
             } catch (IOException ioe) {
    }However, it generated the following message when run behind the firewall:
    cd C:\Documents and Settings\abc\DnldURL\build\classes
    java -cp . DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:315)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:510)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:487)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:615) at java.net.URL.openStream(URL.java:913) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    I have also tried the command without much luck either:
    java -cp . -Dhttp.proxyHost=wwwproxy -Dhttp.proxyPort=80 DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.yahoo.com.au/index.html
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.URL.openStream(URL.java:1009) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    All outgoing traffic needs to use the proxy wwwproxy (alias to http://proxypac/proxy.pac) on port 80, where it will prompt for valid authentication before allowing to get through.
    There is no problem pinging www.yahoo.com from this system.
    I am running jdk1.6.0_03, Netbeans 6.0 on Windows XP platform.
    I have tried Greg Sporar's Blog on setting the JVM option in Sun Java System Application Server (GlassFish) and
    Java Control Panel - Use browser settings without success.
    Thanks,
    George

    Hi All,
    How to set proxy authentication using java properties on the command line, or in Netbeans (Project => Properties
    => Run => Arguments). Below is a simple URL data extract program which works in absence of firewall:
    import java.io.*;
    import java.net.*;
    public class DnldURLWithoutUsingProxy {
       public static void main (String[] args) {
          URL u;
          InputStream is = null;
          DataInputStream dis;
          String s;
          try {
              u = new URL("http://www.yahoo.com.au/index.html");
             is = u.openStream();         // throws an IOException
             dis = new DataInputStream(new BufferedInputStream(is));
             BufferedReader br = new BufferedReader(new InputStreamReader(dis));
          String strLine;
          //Read File Line By Line
          while ((strLine = br.readLine()) != null)      {
          // Print the content on the console
              System.out.println (strLine);
          //Close the input stream
          dis.close();
          } catch (MalformedURLException mue) {
             System.out.println("Ouch - a MalformedURLException happened.");
             mue.printStackTrace();
             System.exit(1);
          } catch (IOException ioe) {
             System.out.println("Oops- an IOException happened.");
             ioe.printStackTrace();
             System.exit(1);
          } finally {
             try {
                is.close();
             } catch (IOException ioe) {
    }However, it generated the following message when run behind the firewall:
    cd C:\Documents and Settings\abc\DnldURL\build\classes
    java -cp . DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
    at sun.net.www.http.HttpClient.New(HttpClient.java:320)
    at sun.net.www.http.HttpClient.New(HttpClient.java:315)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:510)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:487)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:615) at java.net.URL.openStream(URL.java:913) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    I have also tried the command without much luck either:
    java -cp . -Dhttp.proxyHost=wwwproxy -Dhttp.proxyPort=80 DnldURLWithoutUsingProxy
    Oops- an IOException happened.
    java.io.IOException: Server returned HTTP response code: 407 for URL: http://www.yahoo.com.au/index.html
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.URL.openStream(URL.java:1009) at DnldURLWithoutUsingProxy.main(DnldURLWithoutUsingProxy.java:17)
    All outgoing traffic needs to use the proxy wwwproxy (alias to http://proxypac/proxy.pac) on port 80, where it will prompt for valid authentication before allowing to get through.
    There is no problem pinging www.yahoo.com from this system.
    I am running jdk1.6.0_03, Netbeans 6.0 on Windows XP platform.
    I have tried Greg Sporar's Blog on setting the JVM option in Sun Java System Application Server (GlassFish) and
    Java Control Panel - Use browser settings without success.
    Thanks,
    George

  • This is regarding CBMA in SAP PI 7.3.1. I have set up the alert mail using default java mail client.I do receive the alerts via mail. But my requirement is to direct all the mails to Business workplace inbox in ECC.

    This is regarding CBMA in single stack SAP PI 7.3.1. I have set up the alert mail using default java mail client.I do receive the alerts via mail. But my requirement is to direct all the alert mails to Business workplace inbox in ECC.
    So I need to set up PI to redirect mails to ECC Business workplace user inbox (sbwp). From here rules are set up & routed per distribution list.
    Please guide me how I can achieve this requirement.

    Hi,
    yes, it is a little bit different. This is the issue.....  
    But I am not sure if your links will help:
    1) /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    is about a different solution. I do not need to count the number of lines of the source message.
    And the second variable is about concat line by line from unbound node to unbound node.
    My issue is:
    Souce:
    Message line (0...unbound) ! ! ! ! ! ! ! !
    .    ResultLine   (1..1)
    Mapping:
    =>   ResultLine1
           ResultLine2
           ResultLine........          => into UDF to an element  (1..1) in one mapping operation.
    So that all "ResultLine"s are included.
    The result is explained in the given link for Mail attachment with UDF.
    So I am not sure how to use this thread for my issue.
    In the comments of that blog Christoph Gerber writes that the new variable feature can only handle single values.
    So it is not suitable for my purposes as I have a list of values here that needs to be moved into the target message field.
    2) http://wiki.sdn.sap.com/wiki/display/Java/UsingEditJavaSectioninMessageMapping
    shows where to find the button "Java section" which is not available here in 7.1
    3) /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    too is about the nice little button for Java Section that is no longer existing on PI 7.1 screen for mappings.  
    So my issue is: How to replace the Java section function with global variables in PI 7.1?
    Best regards
    Dirk

  • Websites that use java are not working. In the Java control panel, under advanced, default java for browsers "mozilla family" won't stay clicked

    I've recently gotten a new Windows 8 computer. Ever since, I've tried accessing certain websites (like www.cnet.com) and can't get the java scripts to load like for the drop down menus. When I hover over them they don't do anything. Other computers I have that run Windows 7 are working just fine.
    I've upgraded Firefox and Java to all of the newest versions but it's still not working. When I go to the Java control panel, under "Advanced" and under "Default Java for browsers", the check box next to "Mozilla family" won't stay checked. I'll check it, click "Apply" and "Ok" and then when I open it back up it's unchecked again.
    Help.

    cor-el -
    The dom.w3c_touch_events.enabled was already set to 0.
    I don't have a "dom.w3c_touch_events.expose" line. Is that something I should?

  • Acrobat 9 Text Box Default Text Properties

    Acrobat 9: How do you change the default text properties for a text box?

    I take it you are talking about the text box from the Comment and Markup Toolbar?
    Yes, to access the Properties of a drawn box, select the box and right click(Control click on Mac) , a pop up menu will appear, choose > Properties... and amend as necessary. (Sounds like you probably knew that bit already).
    When in the Properties dialog box you will see a check box at the bottom that says 'Make Properties Default'
    Also an already modified box can be right clicked on the reveal 'Make Current Properties Default' from the pop up menu
    Paul

  • How to configure Java Properties File location in WLW

    How do we tell Workshop 7.0 where to look for Java properties files (loaded by
    PropertyResouceBundle in code) ?
    Thanks,
    Ray

    Ray,
    The build number indicates that you have not upgraded to Service Pack 2 of
    version 7.0. I will strongly recommend you to do so. That will shield you
    from the issues which were fixed in the 2 service packs.
    Regards,
    Anurag
    "Ray Yan" <[email protected]> wrote in message
    news:[email protected]...
    >
    Raj,
    We are using WebLogic Workshop Build 7.0.1.0.0829.0 on Windows 2000.
    We shut down the WebLogic Server on Solaris 2.6, log off, log back on,startWebLogic
    in production nodebug mode, and re-run jwsCompile on the same source code.The
    error does not occur anymore. Everything seems to be fine now.
    Thanks,
    Ray
    "Raj Alagumalai" <[email protected]> wrote:
    Hello Ray,
    Can you let me know if you are using the GA version of WebLogic Workshop
    or
    if you have the latest Service Pack.
    Thank You,
    Raj Alagumalai
    WebLogic Workshop Support
    "Ray Yan" <[email protected]> wrote in message
    news:[email protected]...
    Anurag:
    Thanks for your response!
    By moving the property files to WEB-INF/classes from WEB-INF, we arealmost there.
    But we have a follow up problem. We use a static initializer to loadthe
    log4j
    property file like this:
    static {
    try {
    ClassLoader cl= (new Log()).getClass().getClassLoader();
    InputStream is = cl.getResourceAsStream(logfile);
    Properties props = new Properties();
    props.load(is);
    PropertyConfigurator.configure(props);
    } catch (Exception e) {
    e.printStackTrace();
    When we run jwsCompile, we keep getting this:
    Compiling: com/****/TestWS.jws
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[weblogic.management.Admin
    may only be used on the Server ]
    at weblogic.management.Admin.getInstance(Admin.java:104)
    at
    weblogic.security.internal.ServerPrincipalValidatorImpl.getSecret(ServerPrin
    cipalValidatorImpl.java:79)
    at
    weblogic.security.internal.ServerPrincipalValidatorImpl.sign(ServerPrincipal
    ValidatorImpl.java:59)
    at
    weblogic.security.service.PrivilegedActions$SignPrincipalAction.run(Privileg
    edActions.java:70)
    at java.security.AccessController.doPrivileged(Native Method)
    at
    weblogic.security.service.SecurityServiceManager.createServerID(SecurityServ
    iceManager.java:1826)
    at
    weblogic.security.service.SecurityServiceManager.getServerID(SecurityService
    Manager.java:1839)
    at
    weblogic.security.service.SecurityServiceManager.sendASToWire(SecurityServic
    eManager.java:538)
    at
    weblogic.security.service.SecurityServiceManager.getCurrentSubjectForWire(Se
    curityServiceManager.java:1737)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:434)
    at
    weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:
    88)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :255)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :230)
    at
    weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
    Source)
    atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
    atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at weblogic.knex.bean.EJBGenerator$1.run(EJBGenerator.java:101)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:780)
    atweblogic.knex.bean.EJBGenerator.lookupAdminHome(EJBGenerator.java:84)
    atweblogic.knex.bean.EJBGenerator.ensureAdminHome(EJBGenerator.java:122)
    at weblogic.knex.bean.EJBGenerator$6.run(EJBGenerator.java:660)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:821)
    atweblogic.knex.bean.EJBGenerator.generateJar(EJBGenerator.java:482)
    at
    weblogic.knex.dispatcher.DispJar.generateJar(DispJar.java:401)
    atweblogic.knex.dispatcher.DispCache.ensureDispUnit(DispCache.java:695)
    atweblogic.knex.compiler.JwsCompile.compileJws(JwsCompile.java:872)
    at
    weblogic.knex.compiler.JwsCompile.compile(JwsCompile.java:619)
    at weblogic.knex.compiler.JwsCompile.main(JwsCompile.java:109)
    ejbc successful.
    Generating EAR ...
    The EAR was generated and we can even deploy it on Solaris. But whatdoes
    the
    AssertionError mean?
    Thanks,
    Ray
    "Anurag Pareek" <[email protected]> wrote:
    Ray,
    ResourceBundle looks for the properties file in the current thread's
    classpath.
    Since a Workshop webservice's project is nothing but a webapp, the
    properties files can be kept in the WEB-INF/classes directory, which
    is part
    of the webapp classpath.
    You can also use
    Thread.currentThread().getContextClassLoader().getResourceAsStream("MyProp
    s
    properties"); to get access to the properties file.
    Thanks,
    Anurag
    "Ray Yan" <[email protected]> wrote in message
    news:[email protected]...
    How do we tell Workshop 7.0 where to look for Java properties files(loaded by
    PropertyResouceBundle in code) ?
    Thanks,
    Ray

  • Persisting Java Properties

    I am currently using OpenLDAP with a Tomcat JNDI Realm to do authentication and to store Java User objects mapped to an InetOrgPerson objectClass and have been doing so for some time in production.
    What I would like to do and have been searching for, is to take the Plethora of *.properties files I have in multiple webapps and extend my properties loader to look in OpenLDAP and build the Properties object from values stored in LDAP instead of from the filesystem. The obvious advantage is that for some properties files, each webapp has the same properties file, like the connect info to the content server. If I change the connect info to the content server I want to change it in ONE place, i.e. LDAP, not each and every separate properties file.
    In my search I see examples of using serialization to bind a java object to an entry
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://localhost:389");
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PRINCIPAL,"cn=Directory Manager"); // specify the username
    env.put(Context.SECURITY_CREDENTIALS,"password"); // specify the password
    DirContext ctx = new InitialDirContext(env);
    Properties properties = new Properties();

    ctx.bind("cn=coolProps,ou=JavaObjects,o=myserver.com ", properties);
    This throws an InvalidAttributeIdentifierException on javaSerializedData on OpenLDAP 2.2.29-db-4.3.29 win32 distribution, running on XP Pro.
    Even this will be ok as far as it goes but the problem with this is that I would rather have an objectClass schema entry that gave me LDAP modification of the individual properties, so I can use JXplorer (or any LDAP Browser) to manage the properties, just the same as I can modify the properties in the more concrete classes I have mapped. But I do NOT want to create a new schema for every properties file and map each one individually.
    Does someone have a Java Properties objectClass schema and java helper example they can/will share? Or is it something I just didn�t manage to find because I didn�t search for the right words?
    NOTE* The OpenLDAP Software forum's moderator said this was "off topic" and the latest Open LDAP does NOT include the JavaObject schema.
    Ollie

    This throws an InvalidAttributeIdentifierException on
    javaSerializedData on OpenLDAP 2.2.29-db-4.3.29 win32
    distribution, running on XP Pro. My bad, I realized I didn't have the java.schema configured.
    >
    Does someone have a Java Properties objectClass
    schema and java helper example they can/will share?
    Or is it something I just didn�t manage to find
    d because I didn�t search for the right words?
    However I still would like to get a JavaProperties schema if someone has one and some Java helpers to work with it.

  • How to load Java properties file dynamically using weblogic server

    Hi,
    We are using Java properties file in Java code. Properties in java properties file are frequently modified. If I keep these properties file in project classpath or as part of war, I will have to redeploy application after each change.
    We are using Weblogic Server.
    Can you please suggest me how can this properties file be loaded at weblogic server startup. Then in that case, how to refer property file in Java code?
    What is the best practice for this?
    Thanks,
    Parshant

    Another alternative is, keep the property file in any pre-defined location. Write a class which reads the properties from the file and returns the one which is requested by caller and deploy this class. Whenever you have to change the properties just update the property file on server and next call to fetch the property should return the updated one.
    Downside of this approach is file I/O everytime. To overcome that you can actually "cache" the properties in a hashmap. Basically when any property if requested, first check the hashmap, if not found then only read from property file and also update in hash map. Next time same property will be returned from hash map itself. The hash map will be cleared at every server restart since its in the memory. You will also need to build a method to clear the hashmap when you update the values in the property file on server.
    This solution would be suitable for small size files and when network overhead of calling a DB needs to be avoided.

  • Bad http.agent in Java properties : a bug in the HTTP user-agent string?

    Hi all,
    Me :
    I'm patching AWSTATS (web log analyzer tool) in order to recognize which Java version has
    been used to download files.
    Context of the problem :
    Each time a Java program (or applet) is downloading a file (for example .class, .png, .html)
    from a web server, a line will be added in the web server log file. If the web server is well
    configured, the user agent used to download the file will be at the end of the line in the log file.
    For Sun Java JVM, the user agent string is configured in the Java properties under "http.agent".
    Usually, the user-agent string contains the word "Java" and the virtual machine version. In most
    cases, this is just a string like "Java/1.4.2", so this is relatively easy to parse.
    Problem :
    Looking in my web server stats, and then on the web, I found that a JVM's user-agent is
    "Mozilla/4.0 (Windows XP 5.1)", which obviously does not contains the word "Java".
    Consequently, it is difficult to say that this user-agent string belongs to a JVM.
    Further look in my log files and on google shows that this http.agent string appears
    on Microsoft Internet Explorer (it seems MSIE 6.0) over Windows XP with the J2RE plugin:
    http://board.gulli.com/thread/300321
    http://forum.java.sun.com/thread.jsp?thread=531295&forum=30&message=2559523
    http://forum.java.sun.com/thread.jsp?forum=63&thread=132769&start=210&range=15&tstart=0&trange=15
    http://forum.java.sun.com/thread.jsp?forum=32&thread=480899
    http://www.goodidea.ru/setupJava/javaInstall.htm
    The J2RE plugin version does not seems to play a role as this user-agent string has
    been seen on 1.4.1_02-b06, 1.4.2_01, 1.4.2_03 and 1.4.2_04-b05.
    Further information requested :
    I would like to know:
    1) if you have reported the same problem;
    2) if there is some rules for the http.agent property;
    3) if this is a bug.
    Thank you very much, and feel free to add you opinion.
    Julien

    The web log files where the "Mozilla/4.0 (Windows XP 5.1)" user-agent appears can be displayed using the following search terms on google :
    "Mozilla/4.0 (Windows XP 5.1)" -"(Windows XP 5.1) Java"
    http://www.google.ch/search?hl=fr&ie=UTF-8&q=%22Mozilla%2F4.0+%28Windows+XP+5.1%29%22+-%22%28Windows+XP+5.1%29+Java%22&btnG=Rechercher&meta=
    Julien

  • Default java / jsp file which gets executed before DAM asset rendering

    Hi,
    I have a requirement to implement access control on DAM assets on the basis of a metadata property (tags).
    Is there a default JAVA / JSP file which gets executed before rendering a DAM asset?
    If yes, how can I override it?
    If no, how can I add a new JSP / JAVA file to be executed before rendering of each DAM asset?
    Thanks in advance,
    Anurag

    Hello Anuran,
    I dont think there is any api which is executed when you rendering any DAM asset on page component because for each type of DAM asset there are different APIs available which you use the render those dam asset like "Image" class to render the image asset.
    Each dam asset also support having different rendition format and if you are interested in that then refer http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/DamEvent.Type.html
    Please let me know if you need more information
    Thanks,
    Pawan

  • How to change default text properties and text box properties

    I'm adding text to a PDF document by using the text box tool. The default is to put a border around the box and also the font is red and larger than I'd like. I think I found how to change the default box properties (so it has no boarder).
    For the text/font, I can pull up a menu to change the font properties, but so far I'm having to do this for each box I create. One workaround is to cut and paste new text boxes with the formatting I want, but I still want to know how can I set the defaults to the font, size and color of text I want?
    I'm using AA 8 Professional
    Best, David

    This is one of Acrobat's less intuitive areas!
    For defaults, right-click on the text box that is as you want it: then select menu item 'Make current properties default'
    Use Ctrl-E to bring up the Properties toolbar: its content will change depending on whether you have the box or the text selected, and selecting the box or text can be a bit clunky.
    Steve.

Maybe you are looking for

  • Can't get rid of pesky junk mail

    I use the Apple Mail Version 6.5 (1508) application for my emails.  I have found the Junk Mail feature to be very helpful.  If I label a message "Junk," It is treated as junk when I receive the same message later on.  However, there is one pesky junk

  • I'm having trouble converting file to excel...i just purchased this yesterday

    I keep getting the message 'FILE FAILED TO BE CONVERTED USING ADOBE EXPORTPDF ONLINE PLEASE HELP.

  • System date format

    hi all, in my system i've date format in dd.mm.yyyy. how can i change it to mm.dd.yyyy.

  • Edit to tape with Kona Lhe

    At work tomorrow, I have to lay a 59.94 sequence on to a DVCPRO HD deck with no firewire option. So I'm using my Kona Lhe with SDI output and deck control. A couple things to ponder... Audio and Video ARE getting to the deck through the SDI. I am abl

  • Glibc issue....

    hi.... firstly..... please don't jump to any conclusions.... I have successfully upgraded 2 machines so far and not had any major issues.... I read all the information about how to upgrade glibc successfully, and all ran smoothly..... unfortunately,