How do i invoke Windows APIs in JAVA??? Please help.

Is there a way to invoke Windows APIs in Java??? Please help......Thankx

Short answer, you don't. However, you should look at Java Native Interface (JNI) very closely. It will allow you to wrap the Win32 API calls so that Java can call your wrapper methods. Another side to it, although not necessarily related to your question is a JavaBeans to COM bridge that you may want to look into as well, though it's probably not going to be a solution for what you're wanting to do right now.

Similar Messages

  • Using Windows API in Java

    hi,
    How can i use windows api in java.
    regards
    Malik Faisal

    By writing a wrapper in JNI.
    JNI Tutorial.

  • How can i execute Spaces API in java main class?

    Hi
    I am able to execute Spaces API through portal application. However if i try to execute it in java main class, its throwing an exception
    "SEVERE: java.io.FileNotFoundException: .\config\jps-config.xml (The system cannot find the path specified)"
    oracle.wsm.common.sdk.WSMException: WSM-00145 : Keystore location or path can not be null or empty; it must be configured through JPS configuration or policy configuration override.
    How can i set this path, so that i can execute Spaces API from java main class.
    Need this main class to configure in cron job, to schedule a task.
    Regards
    Raj

    Hi Daniel
    Currently i have implemented create functionality in my portal application using Spaces API, which is working fine. Now the requirement is, i need to implement a "Cron Job" to schedule a task, which will execute to create space(for example once in a week). Cron job will execute only the main method. So I have created java main class, in which I have used Spaces API to perform create space operation. Then it was giving exception.
    Later I understood the reason, as I am executing the Space API with a simple JSE client, its failing since a simple java program has no idea of default-keystore.jks, jps-config.xml, Security Policy. Hence i have included those details in main class. Now I am getting new error,
    SEVERE: WSM-06303 The method "registerListener" was not called with required permission "oracle.wsm.policyaccess"
    For your reference i have attached the code below, please help. How can i use Spaces API in java main method(i mean public static void main(String[] args) by giving all required information.
        public static void main(String[] args) throws InstantiationException,
                                                      GroupSpaceWSException,
                                                      SpacesException {
            Class2 class2 = new Class2();
            GroupSpaceWSContext context = new GroupSpaceWSContext();
            FactoryFinder.init(null);
            context.setEndPoint("http://10.161.226.30/webcenter/SpacesWebService");
            context.setSamlIssuerName("www.oracle.com");
            context.setRecipientKeyAlias("orakey");
            Properties systemProps = System.getProperties();
            systemProps.put("java.security.policy","oracle/wss11_saml_or_username_token_with_message_protection_client_policy");
            systemProps.put("javax.net.ssl.trustStore","C:\\Oracle\\Middleware11.1.7\\wlserver_10.3\\server\\lib\\cacerts.jks");
    systemProps.put("oracle.security.jps.config","C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\jps-config.xml");
            systemProps.put("javax.net.ssl.keyStore",C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\consumer.jks");
            systemProps.put("javax.net.ssl.keyStorePassword", "Test12");
            System.setProperties(systemProps);
            GroupSpaceWSClient groupSpaceWSClient;
            try {
                groupSpaceWSClient = new GroupSpaceWSClient(context);
                System.out.println("URL: " +
                                   groupSpaceWSClient.getWebCenterSpacesURL());
                //delete the Space
                List<String> groupSpaces = groupSpaceWSClient.getGroupSpaces(null);
                System.out.println("GroupSpaces:: " + groupSpaces.size());
            } catch (Exception e) {
    Regards
    Raj

  • How do i sync my iphone 4s to the latest windows 8.1? please help !

    how do i sync my iphone 4s to the latest windows 8.1? please help !

    Copy over the library from your previous computer or see Recover your iTunes library from your iPod or iOS device to avoid losing data.
    tt2

  • Itunes opens in new window??? please help...

    itunes opens in new window??? please help...

    In article <[email protected]>,
    [email protected] wrote:
    > Huge thanks Martin. That was sure easy. By the way, do you know how to get a
    > link to open a PDF?
    Collect the PDFs you want to link to in your site. Then link to them in
    the Inspector palette just like you'd link to other pages. If you want
    the PDF to open in a new window use target _blank as before.
    What actually happens on a visitors computer however depends on whether
    they have the PDF viewer plugin installed. In that case the PDF will
    display in the browser window. If they don't have it installed, the PDF
    will download to their computer and they'll need to open it manually.
    Cheers Martin

  • As an elderly rookie, I don't know how to download, install, & activate this software. Please help!

    I bought this but do not know how to download, install, and activate it. Please help!

    Let's start with the basics. Adobe have a baffling number of choices.
    1. What is your computer system? For example, Windows 7, Mac OS Yosemite
    2. What exactly are you trying to download and install? If you paid for it, check your receipt for the exact name.
    3. Did you pay for it already? If so did you subscribe or get a one time purchase?

  • I haven't updated my iPod in forever so when the new update came out I tried to update it but it kept freezing my computer so I had to manually shut it off and restart it. I have windows btw. Someone please help me !!!!!!!!

    I haven't updated my iPod in forever so when the new update came out I tried to update it but it kept freezing my computer so I had to manually shut it off and restart it. I have windows btw. Someone please help me !!!!!!!!

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • Windows - No Disk Error - Please help!

    Windows - No Disk Error - Please help!
    Hi,
    I have the following set up:
    * Lenovo T-61p
    * Windows XP Pro, SP 3
    * HP Photosmart 8250 printer (with nothing plugged into the various card readers, and USB slot in the printer)
    I am getting the following error:
    Windows - No Disk
    Exception Processing Message 0xc0000013 Parameters 0x75CE023C
    0x84C40C84 0x75CE023C
    I have done a lof experimenting and thru process of  elimination, and believe I have determined that this only happens when the HP Photosmart 8250 printer is plugged in to the USB slot of the computer.
    I can stop it from happening by safely removing hardware, and removing the drive that the 8250 creates on your computer when you plug it in.  In my case, this is drive E.  I'm guessing if there was something in the the various card readers, and USB slot in the printer, that's what those would be, but I don't those use those functions of the printer.
    I understand there is more at work than simply the printer, because I did not used to get this error, so some software changed as well, that is scanning all ports, and finding a drive that has no disk, and producing the error.
    A simple google search finds a lot people all over the world having this problem, and are solving it in different ways, because the suspected source is different: Norton, HP, etc.
    I have tried everything I have read, and the only thing that works was my own idea, of manually safely removing the drive the printer creates each time I plug in the printer.
    Anyone every any better, more permanent solutions?  Or know what the real root of the problem is?  What is scanning all the drives and being showing an error message because it found an empty drive?
    Thanks and Happy Holidays/New Year!

    I've been getting the same error on my 4G nano for the past week. I've had my nano for about a month and the first few weeks were fine. Tried it on 2 different computers (Vista and XP) and same problem. Tried it on a 3rd (XP) and it started ok. Problem started coming back after a day.
    I was able to find a quick fix though. I noticed that sometimes the message says something like "iexplore.exe... no disk..." even if I don't even use IE. What I do is end iexplore.exe on task manager before running iTunes and syncing my nano. I don't get the error whenever I do this, but one drawback is that the contents of my nano suddenly pops up in a window - even when disk use is not enabled.
    I've reset/restored my nano dozens and dozens of times to make sure it's clean. Leads me to believe it's a driver issue. Either that or I have a friggin malware problem I can't seem to find.
    I'll be posting updates every now and then. I'm no expert so I'm hoping an Apple expert also steps in to give some input.

  • HT204053 I have two Apple ID's. How do I delete one of them? Please help. Thank you. Dru

    I have two Apple ID's. How do I delete one of them? Please help. Thank you. Dru

    To add to the above...
    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • Windows 8.1 BSOD please help Minidump file attached

    Windows 8.1 BSOD please help Minidump file and dxdiag info file link is below,
    This BSOD frequency is about once every  1 hour to 4 hours,
    Memtest passed with one pass on the one chip of 4GB
    Brand new 8.1 install
    https://drive.google.com/file/d/0B39S6eNyRvOHRnZHRG1Jd1lwT2M/view?usp=sharing
    https://docs.google.com/document/d/1XueM-ov7wjfePJh45Pp3fg1QSSzFBqMuO1tfr9GZm8k/edit?usp=sharing

    This is a crash related to some type of hardware failure. Please refer to the Wiki link below, for some troubleshooting tips.
    BugCheck Code 124 Co-Authored by ZigZag3143& JMH3143
    http://answers.microsoft.com/en-us/windows/wiki/windows_other-system/bugcheck-code-124/98c998d2-447a-40ce-ae1f-8211e355f14d
    WARNING: Whitespace at end of path element
    Symbol search path is: SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
    Executable search path is:
    Windows 7 Kernel Version 9600 MP (2 procs) Free x64
    Product: WinNt, suite: TerminalServer SingleUserTS
    Built by: 9600.16422.amd64fre.winblue_gdr.131006-1505
    Machine Name:
    Kernel base = 0xfffff800`c0e7b000 PsLoadedModuleList = 0xfffff800`c113f990
    Debug session time: Tue Mar 3 23:19:34.178 2015 (UTC - 5:00)
    System Uptime: 0 days 0:00:04.947
    Loading Kernel Symbols
    Loading User Symbols
    Mini Kernel Dump does not contain unloaded driver list
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 124, {0, ffffe000016f88f8, 0, 0}
    Probably caused by : hardware
    Followup: MachineOwner
    1: kd> !analyze -v
    * Bugcheck Analysis *
    WHEA_UNCORRECTABLE_ERROR (124)
    A fatal hardware error has occurred. Parameter 1 identifies the type of error
    source that reported the error. Parameter 2 holds the address of the
    WHEA_ERROR_RECORD structure that describes the error conditon.
    Arguments:
    Arg1: 0000000000000000, Machine Check Exception
    Arg2: ffffe000016f88f8, Address of the WHEA_ERROR_RECORD structure.
    Arg3: 0000000000000000, High order 32-bits of the MCi_STATUS value.
    Arg4: 0000000000000000, Low order 32-bits of the MCi_STATUS value.
    Debugging Details:
    BUGCHECK_STR: 0x124_AuthenticAMD
    CUSTOMER_CRASH_COUNT: 1
    DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
    PROCESS_NAME: System
    CURRENT_IRQL: 0
    STACK_TEXT:
    ffffd000`2087f6c0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!WheapCreateLiveTriageDump+0x81
    STACK_COMMAND: kb
    FOLLOWUP_NAME: MachineOwner
    MODULE_NAME: hardware
    IMAGE_NAME: hardware
    DEBUG_FLR_IMAGE_TIMESTAMP: 0
    FAILURE_BUCKET_ID: X64_0x124_AuthenticAMD_PROCESSOR_BUS_PRV
    BUCKET_ID: X64_0x124_AuthenticAMD_PROCESSOR_BUS_PRV
    Followup: MachineOwner
    1: kd> !errrec ffffe000016f88f8
    ===============================================================================
    Common Platform Error Record @ ffffe000016f88f8
    Record Id : 01d0563268a81312
    Severity : Fatal (1)
    Length : 928
    Creator : Microsoft
    Notify Type : Machine Check Exception
    Timestamp : 3/4/2015 4:19:34
    Flags : 0x00000002 PreviousError
    ===============================================================================
    Section 0 : Processor Generic
    Descriptor @ ffffe000016f8978
    Section @ ffffe000016f8a50
    Offset : 344
    Length : 192
    Flags : 0x00000001 Primary
    Severity : Fatal
    Proc. Type : x86/x64
    Instr. Set : x64
    Error Type : BUS error
    Operation : Generic
    Flags : 0x00
    Level : 3
    CPU Version : 0x0000000000100f42
    Processor ID : 0x0000000000000000
    ===============================================================================
    Section 1 : x86/x64 Processor Specific
    Descriptor @ ffffe000016f89c0
    Section @ ffffe000016f8b10
    Offset : 536
    Length : 128
    Flags : 0x00000000
    Severity : Fatal
    Local APIC Id : 0x0000000000000000
    CPU Id : 42 0f 10 00 00 08 02 00 - 09 20 80 00 ff fb 8b 17
    00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
    Proc. Info 0 @ ffffe000016f8b10
    ===============================================================================
    Section 2 : x86/x64 MCA
    Descriptor @ ffffe000016f8a08
    Section @ ffffe000016f8b90
    Offset : 664
    Length : 264
    Flags : 0x00000000
    Severity : Fatal
    Error : BUSLG_OBS_ERR_*_NOTIMEOUT_ERR (Proc 0 Bank 4)
    Status : 0xba00001000020c0f

  • After upgrading my software i have seem to have lost all my contacts and photos, i did a back up but i have no idea how to get them back on? maybe im illiterate but i dont know how to find it in my itunes? please help!!

    After upgrading my software i have seem to have lost all my contacts and photos, i did a back up but i have no idea how to get them back on? maybe im illiterate but i dont know how to find it in my itunes? please help!!

    http://support.apple.com/kb/HT5824?viewlocale=en_US&locale=en_US

  • I have iOS 6 on my iPhone. i have linked my contacts with facebook and yahoo, which has doubled or triplicated some of the contacts. how can i integrate them into one? please help. it is getting on my nerves. thanks :)

    I have iOS 6 on my iPhone. i have linked my contacts with facebook and yahoo, which has doubled or triplicated some of the contacts. how can i integrate them into one? please help. it is getting on my nerves. thanks

    click on the contact which you want to integrate, click the edit button scroll down u will find a option called link contacts use it to link it to the duplicate contact

  • HT201363 Hello I forgot my Security question of my Apple ID ? I don't kow what should I do and how to solve this problem ? could you please help  ?

    Hello I forgot my Security question of my Apple ID ? I don't kow what should I do and how to solve this problem ? could you please help  ?

    You need to ask Apple to reset your security questions; ways of contacting them include phoning AppleCare and asking for the Account Security team, clicking here and picking a method for your country, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (104569)

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

Maybe you are looking for