How to use com.ms.win32 in java

hi..
I am tring to copy a file from a computer which is connected in lan through java.
I want to logged into it thrugh java,where it is not shared.
I want to use win32sockect programing or is there is any other way out.
please provide some examples or code if possible.
thanks

Hi,
I have spent many n many hours looking for the com.ms .win32 to install. I need this pacage to develop an application and it is not installed in my computer. Do you please can tell me where I can download it? Please, if you know, tell me.
thanks.

Similar Messages

  • How to Use COM Component in a Java Bean

    Dear Sir,
    How can I use a COM Component in a Java-Bean . I am having a COM Component for reading Weighment Reading on a Serial Port and want to use this Component in a Java-Bean . I would also like to call the methods of this COM Component inside my Java-Bean . COM Component is a dll file .
    Please guide me how to go ahead . If possible kindly provide some sample code for the same .
    With Thanks and Regards
    B V Mittal

    You need a Java to COM bridge like Jacob. Try searching this forum for more information, I've answered this question several times before.
    Dom.

  • How to use the TCP/IP in Java?Thanks!

    How to use the TCP/IP in Java?Thanks!

    Look at the java.net package, more specifically to classes ServerSocket (The server TPC conection) and Socket (the client TCP conection)
    Abraham

  • How to Use Windows XP theme in Java

    How to Use Windows XP theme in Java.
    I am an developing application which L&F should be like Windows XP.
    Because I am going use this application in different OS.
    Which LookAndFeel I have to use it

    try this in main:
    try {UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());}
    catch (Exception exc) {System.err.println("Eroare la incarcarea look & feel" + exc);}

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • What are the simple to use COM library in your java code

    Hi,
    what are the simple to use COM library in your java code

    PhHein wrote:
    [javax/comm|http://java.sun.com/products/javacomm/reference/api/javax/comm/package-summary.html]
    No, he wants to use Windows COM objects!
    @OP
    It's not easy. You can try j-integra or ezjcom, which I tried years ago and was not too happy, but maybe
    they improved or they are just fine for your needs. $$$ involved!
    If you want to do it by yourself, it won't be easy at all, I promise, but it can be done with JNI or JNA.
    If your interactions are very few and simple, maybe some workarounds could be found.

  • Java mapping how to use com.sap.tc.logging

    Hi I would like to know how to use logging within a java mapping.
    I know i have to use theese classes : Location, Category, ConsoleLog but i dont know how.
    1) How to load the P1, P2, P3 and P4 tags in the Error tag of the SOAP header watched in SXMB_MONI
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>
      <SAP:P1>SwissMedical/Interfaces/IFI002/LiquidacionMapping~</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    2) How to load and activate log in the DIAGNOSTIC tag of the SOAP Header.
    - <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information</SAP:TraceLevel>
      <SAP:Logging>Off</SAP:Logging>
      </SAP:Diagnostic>
    Thanks!!

    As already suggested, you can display custom messages using AbstractTrace.
    trace = (AbstractTrace)param.get( StreamTransformationConstants.MAPPING_TRACE );
                        trace.addInfo("G1-CYCLE is missing");
    For more on coding front refer:
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformation.html
    To get this trace seen in MONI, set parameter TRACE_LEVEL in SXMB_ADM to 2.

  • How to use .properties files in Webdynpro Java code?

    Hi all,
      I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but  I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
    Thans and Best regards
    Deyang

    Hi,
    1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
    2) load property:
         final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
         final Properties properties = new Properties();
         try
              properties.load(is);
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    Regatds Maxim R.

  • Help with windows Prcesses  - using "com.jniwrapper.win32.process.Process"

    Hi everybody,
    I'm trying to get a list of running processes, and for each process I need its Process ID, Process Name, and the command line that run this process.
    I found a way to get everything but the command-line, by JNI wrappers (below are links to their documentation).
    com.jniwrapper.win32.process.CurrentProcess (has the method - getCOmmanLine() ) :
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html -
    com.jniwrapper.win32.process.Process
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html
    I wrote the following code :
    String a, b;
    List processes = Process.getProcesses();
    for (int i = 0; i < processes.size(); i++) {
    Process process = (Process)processes.get(i);
    a = "process: FileName = " process.getProcessImageFileName();
    b = "id = " process.getProcessID();
    But I need to create an object of "CurrentProcess" (that extends Process class) in order to get the command-line. However, this class only has an empty constructor:
    CurrentProcess() - Creates an instance that corresponds to currently running process.
    and I don't understand what does "corresponds to currently running process" means (Cause there are many running processes) , and how to use it in my code.
    I would appreciate you help very much!
    Thanks,
    Nofar.
    Edited by: Nofarb on Jul 11, 2010 2:38 AM
    Edited by: Nofarb on Jul 11, 2010 2:41 AM

    I'm trying that as well, :)
    I was hoping maybe one of you have some experience with that.
    Thanks anyway.

  • How to use a swf file in java

    plz any body tell me about this
    that how to use SWF in java (JFrame)

    I suggest you look in google http://www.google.co.uk/search?q=SWF+java

  • How to use shell program parameters in java program??

    Hai all,
    I am writing a java program which must read strings from a file and must assign to variables.these strings are nothing but the output of ls -l command in shell. i need to have all those 9 fields in a file as variables.
    I cant find any method that will read only string.I came accross read line but that is not what i need.So, i thought of writing a shell script and by using awk, storing those 9 fields in 9 variables.. but how to use that variables in java programming???
    the shell script is executed by exec() but i need that variables also.
    Help me please:(
    thanks in advance

    i now changed the code... and closed the output file and then i read.Later i splited with the line i read.. but the same happened...
    this is the code:
    while ((l = inputStream.readLine()) != null)
                        op=new FileOutputStream("op.txt");//output of exec goes to this file
                        String[] cmd= {"/bin/sh","-c","ls -l "+l};
                        rt = Runtime.getRuntime();
                        proc = rt.exec(cmd);
                        // any error message?
                          StreamGobbler errorGobbler = new
                          StreamGobbler(proc.getErrorStream(), "ERR");
                        // any output?
                          StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "",op);
                        errorGobbler.start();
                               outputGobbler.start();
                        op.close();//the file is closed now
                        ip = new BufferedReader(new FileReader("op.txt"));     //now i opened to read
                        p=ip.readLine();
                        a=p.split("\\s");
                        ip.close();
                   }where i went wrong?

  • How to Use GnuPG(GPG) winth in java

    Hi all
    I am having one tough time getting How to use GnuPg with in Java languge to encrypt and decrypt file. Can anyone offer any help ...
    Satya

    I'm using this wrapper founded somewhere. Works fine to me.
    /* License: GPL
    * Author: John Anderson
    * Description: A small class to encrypt and decrypt text using GnuPG.
    import java.io.*;
    public class GnuPG {
            private Process p;
            private String gpg_result;
            private String gpg_err;
            GnuPG() {
            public void verifySign(String signedFile, String originalFile){
                    System.out.print("Verifying...");
                    try {
                            //p = Runtime.getRuntime().exec("gpg --output "+originalFile+" --decrypt --yes --verbose " + signedFile);
                            p = Runtime.getRuntime().exec("gpg --verify " + signedFile);
                    } catch (IOException io) {
                            System.out.println("Error creating process.");
                    ProcessStreamReader psr_stdout = new ProcessStreamReader("STDIN", p.getInputStream());
                    ProcessStreamReader psr_stderr = new ProcessStreamReader("STDERR",p.getErrorStream());
                    psr_stdout.start();
                    psr_stderr.start();
                    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                    try {
                            out.write("\n");
                            out.close();
                    } catch (IOException io) {
                    try {
                            p.waitFor();
                            psr_stdout.join();
                            psr_stderr.join();
                    } catch (InterruptedException i) {
                    gpg_result = psr_stdout.getString();
                    gpg_err = psr_stdout.getString();
                    System.out.println("Done.");
            public void encrypt(String str, String rcpt) {
                    System.out.print("Encrypting... ");
                    try {
                            p = Runtime.getRuntime().exec("gpg --armor --batch --encrypt -r " + rcpt);
                    } catch (IOException io) {
                            System.out.println("Error creating process.");
                    ProcessStreamReader psr_stdout = new ProcessStreamReader("STDIN", p.getInputStream());
                    ProcessStreamReader psr_stderr = new ProcessStreamReader("STDERR",p.getErrorStream());
                    psr_stdout.start();
                    psr_stderr.start();
                    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                    try {
                            out.write(str);
                            out.close();
                    } catch (IOException io) {
                    try {
                            p.waitFor();
                            psr_stdout.join();
                            psr_stderr.join();
                    } catch (InterruptedException i) {
                    gpg_result = psr_stdout.getString();
                    gpg_err = psr_stdout.getString();
                    System.out.println("Done.");
            public void decrypt(String str, String passphrase) {
                    File f = null;
                    try {
                            f = File.createTempFile("gpg-decrypt", null);
                            FileWriter fw = new FileWriter(f);
                            fw.write(str);
                            fw.flush();
                    } catch (IOException io) {
                    System.out.print("Decrypting from: " + f.getAbsolutePath());
                    try {
                            p = Runtime.getRuntime().exec("gpg --passphrase-fd 0 --batch --decrypt " +
                                    f.getAbsolutePath());
                    } catch (IOException io) {
                            System.out.println("Error creating process.");
                    ProcessStreamReader psr_stdout =
                            new ProcessStreamReader("STDIN",
                            p.getInputStream());
                    ProcessStreamReader psr_stderr =
                            new ProcessStreamReader("STDERR",
                            p.getErrorStream());
                    psr_stdout.start();
                    psr_stderr.start();
                    BufferedWriter out = new BufferedWriter(
                            new OutputStreamWriter(p.getOutputStream()));
                    try {
                            out.write(passphrase);
                            out.close();
                    } catch (IOException io) {
                    try {
                            p.waitFor();
                            psr_stdout.join();
                            psr_stderr.join();
                    } catch (InterruptedException i) {
                    gpg_result = psr_stdout.getString();
                    gpg_err = psr_stdout.getString();
                    System.out.println("Done.");
            public String getResult() {
                    return gpg_result;
            public String getError() {
                    return gpg_err;
    class ProcessStreamReader extends Thread {
            String name;
            StringBuffer stream;
            InputStreamReader in;
            final static int BUFFER_SIZE = 256;
            ProcessStreamReader(String name, InputStream in) {
                    super();
                    this.name = name;
                    this.in = new InputStreamReader(in);
                    this.stream = new StringBuffer();
            public void run() {
                    try {
                            int read;
                            char[] c = new char[BUFFER_SIZE];
                            while ((read = in.read(c, 0, BUFFER_SIZE - 1)) >
                                    0) {
                                    stream.append(c, 0, read);
                                    if (read < BUFFER_SIZE - 1)
                                            break;
                    } catch (IOException io) {}
            String getString() {
                    return stream.toString();
    }

  • How to use File Transfer Protocol in Java?

    hi all,
    im new to java. i dont know how to use FTP in java. but i want to transfer files from my machine to another machine and also i want to download files from that machine through FTP. how can i start this program. pls any one give me the code for this program. thanks in advance.

    Of course you didn't get an "exact result", since that link was to an article which reviewed several products. If you aren't capable of making a decision based on that article, try using the Apache Commons/Net FTP component.

  • How to use to_char(oracle function) in java

    Hi,
    I am getting the value as a integer from one table in my java file and want to insert it into another table as a varChar..
    I found one method in oracle like to_char().. can i use this in java..
    can u pls let me know how to use this in java..or is there any other way to convert it..
    for example, i am getting the value is : 4 (number) from one table. and want to insert it into another table like : 04 (varchar)..
    how can i convert it and insert into another table as a varchar..
    please help me

    Well part of the answer depends on what db your using but semantically if I just HAD to do what you're doing I would use a stored procedure to do the insert into the second table or better yet do the whole thing in a stored procedure which would make life much easier all the way around.
    Implicit lesson here: Use the RIGHT tool for the job at hand.
    The big question though is why do you have data that's of one type in one place and another type in another place?
    PS.

  • How to use COM DLL in LabWindows

    Hello
    I have a COM .dll which looks like that when opened with dll export viewer:
    I would like to use the Get4AxisPos function in LabWindows.
    I understood that, as I only have the .dll, the only way of calling these functions are with the LoadLibrary() and GetProcAddress() functions.
    My problem is that the Get4AxisPos function is not of type Exported Function but COM Method so I don't know how to use it in my LabWindows project!
    My questions are: Is it possibleto use this dll in Labwindows? If yes how?
    Thanks
    Solved!
    Go to Solution.

    Hi ,
    I am new to C++ and COM  .
    i need to implement a client application in C(lab windows CVI) , server is a c++ COM object.
    steps followed by me
    ---> accessed the registered COM object with Labwindows CVI active x controller template,output was a c file which is implementation of the class names in COM (interfaces).
    I can use majority of the functions directly from the generated, but i need to implement some event functions like message box events and then use it.
    I have seen one method of accessing in C++ client sample ,
    which implements Queryinterface function...takes the IID_Unknown as input and returns interface pointer(inhereted static_castof the required class, uses static_cast for that) as output.
    when i try to follow up the same in c , i am lost  with the inheritance concept.
    In short i need to send IID Unknown to the Queryinterface function and should get the interface pointer of message box type or other class type ...
    Sorry for the long mail,Please guide me
    Thanks in advance ,
    Satish

Maybe you are looking for