Enums for System.getProperty(...) method in Java API?

Just had a thought today as a result of a colleaugue mis-spelling "file.separator" in a System.getProperty() call:
How about an enum for the above method (e.g. SystemProperty) that has all the known properties and the String method for any prop not included in the enum?
Am I being too greedy or pedantic about type-safety?
Appreciate your feedback.
Cheers,
Ali
Edited by: user7627452 on 30-Apr-2012 19:09

Yes. The whole idea is that anybody can add their own. As opposed to an API.

Similar Messages

  • Export method OWB JAVA API

    Hello,
    I've been getting an eyeful to Warehouse Builder JAVA API offers and I find that JAVA API have a method to Import metadata but I don't find a method to export metadata from a repository. �Why JAVA API does not offer an export metadata method?
    Thanks

    Hi Pedro,
    I quickly glanced at the functional spec and there should be an export (actually this seems to be more granular than the import). I will look around some more, but I think you have export for MDL as well as import.
    I'll get back to you with some more details on this.
    Jean-Pierre

  • How to change the parameter 'Default Servers To Use For Viewing And Modification' using java api dynamically.

    Hi,
    I need to change the Crystal Reports setting 'Default Servers To Use For Viewing And Modification' to a particular server.this i need to do using java api.
    could you pls provide me the sample code for this.
    Regards
    Srinivas

    The IReport interface extends IViewingServerGroupInfo interface, that allows you to specify the server group. 
    The choice selection for that interface is as follows:  0 = first available, 1 = prefer the selected server group, and 2 =  only use the selected server group.
    The server group selection is by the SI_ID for that server group InfoObject.
    Sincerely,
    Ted Ueda - Developer Support

  • Looking for 9.0.3-r2 Java API

    I'm having a lot of trouble digging this up using the website search function, and browsing through the documentation links.
    Thanks in advance!

    http://download-west.oracle.com/docs/cd/A97688_13/toplink.903/tl_flapi/index.html

  • Steps for System Refresh for ABAP + JAVA stack

    Hi friends,
    I am newbie to SAP BASIS adminstration. There is a system refresh activity planned shortly.
    Can someome pls let me know the steps for system refresh of ABAP  + JAVA stack??
    regards,
    Ambarish.

    Please check [systemcopy@SDN|System Copy and Migration] and [guides|http://service.sap.com/instguidesnw] according to your release.

  • [java api f90jdapi]How to change locationnames of attached libs in PLL's?

    I have a couple of PLL files which have some attached libraries. The problem is that the cases of the locationnames of these attached libraries are not exactly the same as the physical files: for example, the physical file 'ofgmes.pll' is attached as 'Ofgmes.pll', or 'OFGMES.PLL'. In Linux this will cause problems during compilation, because Linux is case sensitive.
    We have two solutions to change the locationnames manually:
    1. load PLL in Oracle Forms Builder, remove and reattach the attached libraries.
    2. Convert PLL to PLD, change the .attach LIBRARY property, and convert the PLD to PLL
    As you can imagine, it takes a lot of time to do this manually. So I'm looking for a solution with the java api 'f90jdapi'. I've tried to load de PLL's in a PlsqlObject object, but it's impossible to edit these objects.
    Now I'm looking for a manner to convert a PLL to PLD and vice versa. Can anyone help me with that? If there is another solution to change the locationnames of the attached libraries, please tell me :)
    Jeroen

    Hi Jeroen,
    You have two options to work around your lib's problem. Perhaps the easiest way is to set your FORMS90_PATH to include the missing library modules. This requires no coding, but I can imaging that hard-coded paths are unwanted in the future and you want to remove them (I know I would).
    The second option involves some Java coding (using JDAPI) but than the paths are removed automatically. In essense
    you have to rewrite the whole library as a pld and then parse the pld into a pll and eventually compile it into a plx.
    The code below shows this. It is extracted from a utility I use to reattach libraries to forms, menus and pl/sql-
    libraries. I tried to strip the code from details as much as I could. You can include this method into a new class or into your exsisting class.
    It does:
    1) loop over all modules loaded into the JDAPI session and check if a library module is passing.
    2) For each found library, it loops over the attached libraries and writes a line to a StringBuffer. This StringBuffer is going to be your pld.
    3) Loop over all Program Units and write the code to the StringBuffer.
    4) Construct a proper file name and save the pld module to disk.
    The save method uses a java.io.FileWriter to save the pld to disk and calls the runtime method I posted earlier to parse and compile the file.
    Regards,
    Harm
    * Reattach libraries to Libraries (PlsqlModules). Handling libraries is different
    * than handling forms and menus, therefore, this method does not depend on
    * the reAttach(JdapiModule, List) method.
    * Libraries are handled via a .pld script file and parsing that file to a .pll file.
    private void reAttachLibs2Libs() {
    for (JdapiIterator modules = Jdapi.getModules() ; modules.hasNext() ; ) {
    JdapiModule jmod = (JdapiModule)modules.next();
    if (jmod.getTypeId() == JdapiTypes.LIBRARY_MODULE_OTID) {
    StringBuffer pldModule = new StringBuffer(4800);
    // loop over all attached libraries and remove hard-coded paths
    for (JdapiIterator attachedLibs = ((PlsqlModule)jmod).getAttachedLibraries() ; attachedLibs.hasNext() ; ) {
    AttachedLibrary attachedLib = (AttachedLibrary)attachedLibs.next();
    String lib = attachedLib.getName();
    if (!dettachOrSwap.containsKey(lib)) {
    pldModule.append(".attach LIBRARY ").append(lib).append(" END NOCONFIRM\n");
    } // end for loop attached libraries
    // loop over all PU's and append it (unchanged) to pldModule
    for (JdapiIterator pUnits = ((PlsqlModule)jmod).getProgramUnits() ; pUnits.hasNext() ; ) {
    ProgramUnit pUnit = (ProgramUnit)pUnits.next();
    pldModule.append(pUnit.getProgramUnitText()).append("\n\n");
    // only if libraries are changed, save pld to file system, to the outdirectory
    // entered in jdapi.properties and change file extension from pll to pld.
    String fileName = jmod.getAbsolutePath().substring(
    jmod.getAbsolutePath().lastIndexOf(File.separator) +1
    , jmod.getAbsolutePath().length()-3) + "pld";
    fileName = outDir + File.separator + fileName;
    save(pldModule, fileName);
    } // end if JdapiTypes.LIBRARY_MODULE_OTID

  • Oracle Spatial 10g R2 Java API

    Hi All,
    I have a JAVA tool said to be written for Oracle Spatial 10g R2 Java API which uses for example the class oracle.spatial.georaster.JGeoRaster. I have to port it to 11g R2. The tool is definitely written for an earlier version, because compilation fails on for example JGeoRaster.getProperties() method which is not present in the new API. For this new API I have a fine Javadoc documentation here:
    http://download-llnw.oracle.com/docs/html/E11829_01/
    I have searched for a similar one for 10g R2 but found only like
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14373/toc.htm
    which misses the oracle.spatial.georaster package. Is there such a package and if so, where can I find docs for it?
    thank you in advance, best regards: Balázs Bámer

    Hi Balázs,
    the GeoRaster Java API was first released with 11gR2. Your first link points to that, or this link:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11829/toc.htm
    your second link points to 10g Oracle Spatial Java API, which doesn't include any GeoRaster related API. your tool might have been developed based on the old INTERNAL georaster jar file, which is not supposed to be used by your java program. But if you do want the api doc, you can run javadoc or jdeveloper to find out the api from the old sdogr.jar file.
    jeffrey

  • Java API from ABAP program.

    Hi
    I have a requirement to call a Java API from ABAP program.
    We are using a third party component for encrypting the files
    using Java API The component consist of ".jar" files. I need to
    know exactly where we need to copy the ".jar" files on application server,
    so that I can call the API methods in my ABAP code and process the file in SAP,
    and how to establish a connect with there server for the encryption.
    Thanks
    Regards
    Lalith

    LInk is:
    /people/puru.govind/blog/2006/12/20/let-abap-speak?page=last&x-maxdepth=0

  • Hanging of Java API (java.io.File/java.nio)

    Hi
    I am facing the following problem on one of my machine , we have NFS partition mounted on the server and our application is writing on it using JAVA java.io.File/java.nio api. But when NFS is unavailable its hangs and also causes the hanging of our server. Please help me if some one already faced this problem.
    NFS file system un-reachable the Java API (java.io.File/java.nio) will stuck and see if there is any solution
    Thanks in advance.
    Kaiser

    There do not believe there is any published API for reading rules files (including the Java API, C API and VB APIs).Tim TowApplied OLAP, Inc

  • How to install JAVA API client files :: Using JAVA Proxy & NWDS

    Hi
    I am going to integrate the SAP with one "AB" System which is providing Java API to integrate with their client ( which in turn will connect with AB System ). So AB System is providing JAR files & property files, in order to instantiate objects & call those APIs.
    Now I am going to write the JAVA code in NWDS which is installed on my Laptop so I am sure I need to give this jar files under ::
    <i>Project -> Properties and then Java Build Path -> Libraries.
    Choose Add External JARs</i>
    But where do I need to add property files.
    Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.
    Regards
    - Lalit -

    Lalit,
    ><i>But where do I need to add property files</i>
    How are you going to access the properties file? Are you going to use Java IO to read the file or are you dgoing to bundle the property file as a resource and use the getResource() . If you are going to use Java IO then you will have to hard code the property file path in your code and make sure that your Proxy can read the property file.
    If your property file is going to vary across environments, I woudl suggest this approach. Make sure that the property file path will be same in all environments and it will work fine and make sure that your proxy will have OS level IO access as well.
    Another option would be to have the property file bundled as a respurce, but, making changes to the file in this case will be an issue!
    ><i>Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.</i>
    When you create the EAR file for your Java Proxy, remove all XI .jar files and just make sure that the Client JAR is available in the EAR file. You need not install the Client JAR file anywhere as long as the jar file is a part of the EAR!
    Regards
    Bhavesh

  • How to install JAVA API client files :: Using XI JAVA Proxy & NWDS

    Hi
    I am going to integrate the SAP with one "AB" System which is providing Java API to integrate with their client ( which in turn will connect with AB System ) using SAP XI. So "AB" System is providing JAR files & property files, in order to instantiate objects & call those APIs.
    Now I am going to write the JAVA code in NWDS which is installed on my Laptop so I am sure I need to give this jar files under ::
    Project -> Properties and then Java Build Path -> Libraries.
    Choose Add External JARs
    But where do I need to add property files.
    Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.
    I am not much into JAVA so pls. try to give me detailed steps.
    Regards
    - Lalit -

    Lalit,
    ><i>But where do I need to add property files</i>
    How are you going to access the properties file? Are you going to use Java IO to read the file or are you dgoing to bundle the property file as a resource and use the getResource() . If you are going to use Java IO then you will have to hard code the property file path in your code and make sure that your Proxy can read the property file.
    If your property file is going to vary across environments, I woudl suggest this approach. Make sure that the property file path will be same in all environments and it will work fine and make sure that your proxy will have OS level IO access as well.
    Another option would be to have the property file bundled as a respurce, but, making changes to the file in this case will be an issue!
    ><i>Also do I need to install the same files on XI Server too & do I need to install the "AB" System Client also on XI Server or it can be installed some place else too.</i>
    When you create the EAR file for your Java Proxy, remove all XI .jar files and just make sure that the Client JAR is available in the EAR file. You need not install the Client JAR file anywhere as long as the jar file is a part of the EAR!
    Regards
    Bhavesh

  • Alternative to System.getProperty("microedition.hostname")

    Hey is there any other alternative for 'System.getProperty("microedition.hostname")' to get the ip address of the device running the j2me midlet ??
    When you run the midlet on the emulator, System.getProperty("microedition.hostname") returns the PC's Name, but on a Nokia series 40(3rd E) device, it returns null.
    So is there an alternative to this to select the device's ip address ?

    First this is a pretty specific question which applies to a specific device rather than to reflection/reference. You might want to look for a forum that addresses the specific device.
    Second, you can print the system properties normally. Whether you can do that on the device depends on the device. If you succeed you might find an alternative.
    Third normally one uses the java.net.IpAddress to get a device IP. Does that not work for that device?

  • National characters and new Java API

    Hi All,
    I'm looking for your experience with new java api and national characters (like: ü, &#347;, &#263;, etc.). The problem is that when record was updated using MDM Data Manager, and retrieved using new java api - national character are invalid (in java string the national character are represented incorrectly).
    It's strange due to fact that when I create or update this record from java API it's looks fine. Second finding is that old java api (MDM4J) works fine on text fields with national characters.
    Maybe I forget to set something in server configuration / repository / or on java api connection - any help appreciated...
    Regards, marcin

    While retrieving data via the Java API 2,
    you should set the Unicode Normalization after the user session is authenticated.
    I guess this is available in SP5 patch.
    The documentation for this is available at
    https://help.sap.com/javadocs/MDM/current/index.html
    Package: com.sap.mdm.commands
    SetUnicodeNormalizationCommand cmd = new SetUnicodeNormalizationCommand(connectionAccessor);
    cmd.setSession(userSession);
    <b>cmd.setNormalizationType</b>(SetUnicodeNormalizationCommand.NORMALIZATION_COMPOSED);
    cmd.execute();
    This command is used to set the Unicode normalization.  This is used for the lifetime of the session. It should be set after the session is authenticated.
    Unicode normalization is important when a text string is represented differently depending on the normalization used. The MDM server always store text strings in one normalization format. An user providing a text string to the MDM server and later on tries to retrieve back the same text string might get the text string back in a different normalization. To resolve this issue, the user can use this class to specify the normalization the user wants to work with. The MDM server will always return text strings in the normalization specified by this class.

  • Some question about mdm java api and portal content

    Hi Gurus,
    I am new to MDM. I am going to develop some web dynpro application using mdm java api.
    My question is regarding the relationship between MDM version and NW version:
    for example
    1.MDM5.5 JAVA api can be deployed to CE 7.11 server?
    2.MDM7.1 JAVA API can be deployed to CE 7.11 server? or can only be deployed to CE server.
    the same question for the MDM portal content.
    the possible dev environment  for our company would be:
    1.MDM7.1
    2.CE7.2(do we need another EP7 server for the UWL?)
    Best regards,
    John

    Hi,
    I am using Portal 7.0. MDM version is 7.1.
    My problem is ... i am trying to connect WebDynpro (JAVA) to MDM7.1. But am unable to do so. I have a WD Frame in which i have a WD iView and the MDM iView. But i am unable to pass parameters from the WD iView to MDM Item Details iView.
    Note:
    1. I have deployed MDM JAVA API on NWDS
    2. I have specified " * " as a parameter to pass from the URL in the Item Details iView.
    Please help.
    Every help that i have read talks about CE7.1 but not NW 7.0
    -Alpana

  • System.getProperty("os.name")

    Hey
    Can any one tell me what does the return string value for System.getProperty("os.name") on unix platform. i am asking this since i dont have unix installed on my system to test it.
    Tkx in advance

    It comes back w/ the basic flavor.
    ie
    AIX -> AIX
    Linux -> Linux
    HP-UX -> HP-UX
    Solaris -> Solaris

Maybe you are looking for

  • If I have two iTunes accounts, and only want one to update my apps why does the other account keep opening?

    Here's the issue-I have two iTunes accounts, yet account #1 always comes up when I want to update my apps. This occurs even when account #2 is logged in and has been synced from desktop to iPad. Additionally,Account #2 is logged in on the iPad and ye

  • Cant install new itunes???

    i cant install the new itunes and therefore not update my iphone that is stuck in a "recovery loop" because i have the version 10.4.11? i need help!! please idk what to do.

  • My IPhone orientation freezes / locks and the only resolution Is to restart the iPhone... Help!

    Hi everyone! im using an iPhone 6 Plus with OS 8.0.2 and sometimes when I unlock my phone the orientation is locked upside down or will not change to landscape mode... i've tried the following to resolve without any luck: - Lock and unlock iPhone - T

  • Bulk collect exception save

    DROP TABLE TEST1;DROP TABLE TEST2; CREATE TABLE TEST1(TNO NUMBER(10), TNAME VARCHAR2(5)); CREATE TABLE TEST2(TNO NUMBER(10), TNAME VARCHAR2(3), ERR_MSG VARCHAR2(1000)); INSERT INTO TEST1 VALUES(1,'CAT'); INSERT INTO TEST1 VALUES(2,'CAT'); INSERT INTO

  • Saving login information

    I use a 4s with 6.0.1. There are various websites I need to use where login credentials are required. I can't seem to get the Safari browser to save my login information and its a pain to type 7 numbers of ID and 7 numbers of Password each time I go