Java class to connect Windows server and excecuting bat file

Hi All,
Could some please provide or let me know how to connect windows server and executing bat file in windows box.
All i have in hand to connect is Host name,Username and Password.
Basically i am SOA guys and facing difficult in building class to do.
I want to use Java code in my integration project in order to achieve the above case.
I am using Linux OS. And i want to run Java code in Linux Box and to connect to Windows server
Thanks in advanace
Regards,
Tarak.
Edited by: Tarak on Aug 8, 2012 4:08 PM
Edited by: Tarak on Aug 11, 2012 9:08 PM

I'm afraid few if any of us are going to know anything more about connecting to Windows Server than you do. All I can suggest is to check if its client interface is publicly documented and try reverse engineering it from that.

Similar Messages

  • Java Class to connect to oracle

    Hi all,
    I am a new in Java in database...
    I have written a java class to connect to oracle and to get some information from the databse. In the class i use the driver oracle.jdbc.driver.OracleDriver.
    When I exeute the code in JDeveloper it works fine.
    I have loaded the classes to database (10gR2), have written the wrapper function. That all was compilled without errors.
    But when I execute the wrapper function I get in SQL*Plus my custom Error-Message from Java Code "Not able to connect to oracle".
    The oracle driver classes are owned by sys. Should SYS grant to the user any special rights with dbms_java.grant_permission?
    Or is it any other way to connect to the database, in which the java classes are loaded? The user is connected with SQL*Plus. The Java Classes are owned by the user. Should I use JDBC to connect to the same database?
    Best regards,

    Hi
    You don't need to re-connect... Have a look here...
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/ssid.htm#i1024903
    HTH
    Chris

  • Accessing MS Sql Server with Java classes - problem connecting to socket

    I found an example at this location which uses java classes to connected to MS Sql Server.
    http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
    --bummer - it is a login location - so I will include the article
    Anyway, the example is using Websphere, but I am still on Jbuilder (will get wsad soon). So I planted the classes from the example in
    C:\Borland\JBuilder\jkd1.4\jre\lib\ext\...the classes
    Then I copied the code from the example to my jpx project and got an error that it could not connect to the socket. The only thing I changed in the code was the connection string:
    --original string from example:
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
    I was getting an error with the 2 argument version of DriverManager - and the second argument here was empty (properties argument). Here was my connection string:
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
    I am only using the 1 argument version of DriverManager. Note that the password=" is blank because my RnD workstation is standalone - no one accesses the sql server except me - so no password. I also left out the last semicolon I noticed. Any suggestions appreciated how I could fix this.
    Thanks
    source of article:
    http://search400.techtarget.com/tip/1,289483,sid3_gci1065992,00.html
    iSeries 400 Tips:
    TIPS & NEWSLETTERS TOPICS SUBMIT A TIP HALL OF FAME
    Search for: in All Tips All search400 Full TargetSearch with Google
    PROGRAMMER
    Sample code: Accessing MS SQL Server database from the iSeries
    Eitan Rosenberg
    09 Mar 2005
    Rating: --- (out of 5)
    Nowadays with the help of Java the iSeries can be integrated with other databases quite easy. This tip shows you how. The code included here uses the free Microsoft driver that can be downloaded from here. (SQL Server 2000 Driver for JDBC Service Pack 3)
    If your SQL server does not include the Northwind Sample Database you can find it here.
    http://www.microsoft.com/downloads/details.aspx?familyid=07287b11-0502-461a-b138-2aa54bfdc03a&displaylang=en
    The download contains the following files:
    msbase.jar
    mssqlserver.jar
    msutil.jar
    Those files needs to be copied to the iSeries directories (/home/r_eitan/ExternalJARs).
    Here's the directory structure (on the iSeries) for this sample:
    /home/r_eitan/ExternalJARs - Microsoft files (msbase.jar,mssqlserver.jar,msutil.jar)
    /home/r_eitan/JdbcTest02 - My code (Main.java,Main.class)
    The Java code
    import java.sql.*;
    import java.io.*;
    class Main {
    * Connect to Microsoft SQL server and download file northWind.products as tab
    * seperated file. (products.txt)
    public static void main(String args[]) {
    try {
    PrintStream outPut = new PrintStream(new BufferedOutputStream(new FileOutputStream("products.txt")));
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    //Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://1433", "");
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://Myserver:1433;User=sa;Password=");
    System.out.println("Connection Done");
    connection.setCatalog("northWind");
    String sqlCmdString = "select * from products";
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery(sqlCmdString);
    ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
    int columnCount = resultSetMetaData.getColumnCount();
    // Iterate throught the rows in resultSet and
    // output the columns for each row.
    while (resultSet.next()) {
    for (int index = 1; index <=columnCount; ++index)
    String value;
    switch(resultSetMetaData.getColumnType(index))
    case 2 :
    case 3 :
    value = resultSet.getString(index);
    break;
    default :
    value = """ + resultSet.getString(index) + """;
    break;
    outPut.print(value + (index < columnCount ? "t" : ""));
    outPut.println();
    outPut.close();
    resultSet.close();
    connection.close();
    System.out.println("Done");
    catch (SQLException exception)
    exception.printStackTrace();
    catch (Exception exception)
    exception.printStackTrace();
    --------------------------------------------------------------------------------------------------

    My guess is that the server's host name isn't right. It necessarily (or even usually) the "windows name" of the computer. Try with the numeric IP address instead (type "ipconfig" to see it).
    First aid check list for "connection refused":
    - Check host name in connect string.
    - Check port number in connect string.
    - Try numeric IP address of server host in connect string, in case name server is hosed.
    - Are there any firewalls between client and server blocking the port.
    - Check that the db server is running.
    - Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
    - Try "telnet serverhost the-port-number" from the client, to see if firewalls are blocking it.
    - If "telnet" fails: try it with the numeric ip address.
    - If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
    - Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"?

  • Can't update firefox. window says downloading firefox 3.6.18 connecting to server and continues for over an hour

    ''dupe of https://support.mozilla.org/en-US/questions/919032''
    can't update firefox. window says downloading firefox 3.6.18 connecting to server and continues forever

    Hi jrtartaglia,
    You should take a look at the Knowledge Base article [[Updating Firefox]]. There is a lot of good information in there and some troubleshooting steps as well.
    If that doesn't work, you might want to try installing a fresh copy of Firefox:
    http://www.mozilla.org/firefox/new/
    I would suggest that you first back up your personal information and bookmarks, just in case. You can find details in the article [[Backing up your information]].
    Hopefully this helps!

  • Connection between server and client using thread

    hi
    i am new to java..i hav done a program to connect a server and client...but i hav not used threads in it..
    so please tel me how to use threads and connect server and client..i tried it out not getin...i am havin thread exception...my program is as shown below
    SERVER PRG:
    import java.io.*;
    import java.net.*;
    public class Server{
    String clientsen;
    String serversen;
    public void go(){
    try{
         ServerSocket serverSock=new ServerSocket(6789);
         while(true) {
         Socket sock=serverSock.accept();
         BufferedReader inFromClient=new BufferedReader(new InputStreamReader(sock.getInputStream()));
         BufferedReader inFromuser=new BufferedReader(new InputStreamReader(System.in));
         DataOutputStream outToClient=new DataOutputStream(sock.getOutputStream());
         clientsen=inFromClient.readLine();
         System.out.println("From Client: "+clientsen);
         System.out.println("Reply mess to Client");
         serversen=inFromuser.readLine();
         outToClient.writeBytes(serversen+'\n');
    } catch(IOException ex) {
         ex.printStackTrace();
    public static void main(String[] args) {
         Server s = new Server();
         s.go();
         CLIENT PRG
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    import java.lang.Thread;
    import java.applet.Applet;
    class Client1
    public static void main(String argv[]) throws Exception
              String Sen;
              String modsen;
              BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in));
    Socket clientSocket=new Socket("192.168.1.2",6789);
              DataOutputStream outToServer=new DataOutputStream(clientSocket.getOutputStream());
              BufferedReader inFromServer=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              System.out.println("Enter the mess to be sent to server");
              Sen=inFromUser.readLine();
              outToServer.writeBytes(Sen + '\n');
              modsen=inFromServer.readLine();
              System.out.println("FROM SERVER: " +modsen);
              clientSocket.close();
    please send me the solution code for my problem...

    sorry for inconvenience...
    SERVER PROGRAM
      *import java.io.*;*
    *import java.net.*;*
    *public class MyRunnable implements Runnable*
       *public void run() {*
       *go();*
    *public void go(){*
    *try {*
        *String serversen;*
       *ServerSocket  welcomeSocket=new ServerSocket(6789);*
       *while(true)*
    *Socket connectionSocket=welcomeSocket.accept();*
    *//BufferedReader inFromClient=new BufferedReader(new //InputStreamReader(connectionSocket.getInputStream()));*
    *System.out.println("enter the mess to be sent to client");*
    *BufferedReader inFromuser=new BufferedReader(new InputStreamReader(System.in));*
    *DataOutputStream outToClient=new DataOutputStream(connectionSocket.getOutputStream());*
    *//clientsen=inFromClient.readLine();*
    *//System.out.println("From Client: "+clientsen);*
    *//System.out.println("Reply mess to Client");*
    *serversen=inFromuser.readLine();*
    *outToClient.writeBytes(serversen+'\n');*
    *} catch(IOException ex) {*
    *        ex.printStackTrace();*
    *class Server1{*
    *public static void main(String argv[]) throws Exception*
         *Runnable threadJob=new MyRunnable();*
    *Thread myThread=new Thread(threadJob);*
    *myThread.start();*
    *}*CLIENT PROGRAM
    import java.io.*;
    import java.net.*;
    class Client2
    public static void main(String argv[]) throws Exception
              //String Sen;
              String modsen;
              //BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in));
    Socket clientSocket=new Socket("192.168.1.2",6789);
              //DataOutputStream outToServer=new DataOutputStream(clientSocket.getOutputStream());
              BufferedReader inFromServer=new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
              //System.out.println("Enter the mess to be sent to server");
              //Sen=inFromUser.readLine();
         //     outToServer.writeBytes(Sen + '\n');
              modsen=inFromServer.readLine();
              System.out.println("FROM SERVER: " +modsen);
              clientSocket.close();
    this is the code which i hav used using thread but i am gwetin error..ts is the error
    Exception in thread "main" java.lang.NoSuchMethodError : Main

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar "behave"?

    MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar usable? The problem began after I updated to Maverick.

    babowa, it seems like it is using Fuse & NTFS, so I don't think it's the classic WD + 10.9 mess, but extra WD tools & drivers can still break things MtTran.
    MrTran, if you must use unsupported disk formats on your Mac you must also consider actually paying the developers that made the trial software.
    It's probably a good idea to follow the developers removal instructions, reboot & then install one tool at a time.
    MacFuse, FuseOSX, NTFS-3G are all likley to confict if you run older versions so you need to be sure you are using the latest version. I can't remeber which one depends on the other, so you will need to read the manuals.
    When the disk is readable copy the data to another disk. You could probably do this from a Linux distro or Windows if OS X won't do it.
    If you insist on only using the trial versions you will need to reinstall Mac OS, copy data off this disk & reformat it.
    Is there any good reason for not using the Mac HFS extended format?

  • I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465

    I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465 SSL) and none of them work. Please help!

    You will need to get the required info to create/access the account with an email client from your school.
    Are you currently accessing the account with an email client on your computer - if you have a Mac with the Mail.app, or if you have a PC with Outlook Express, etc.? If so, you can get the required account settings there.

  • My office uses windows based computers setup with a server setup. Can an apple server emulate or find compatibility with an apple server or apple computer linked to the server and allow full file sharing and printer sharing with pc's?

    I have 11 computers all pc's linked to an old windows server and all used primarily for microsoft office and printer sharing as well as for internet browsing. Can an apple joining the setup cause compatability issues?

    HI,
    grey-haired IT guy here, old enough to come from the counter culture. I ran (COO, including IT & compliance) a third billion dollar financial institution all on Macs 15 to 20 years ago.  All the "experts" had a long list of reasons it would be impossible, and it drove the examiners nuts, but it's only gotten better.
    So your benefits are going to be mostly in ease of administration after the learning curve, less aggravating glitches, better overall reliability, and arguably better security.  And reductions in cost and improvement in time to implement changes.
    In my current environment of mostly dozens of PCs, the moment I let the OS X Server be the domain master controller, the Windows network browser settled down and instantly showed network neighborhoods like it should have.  (We may have some forgotten pre-NT machines plugged in somewhere -- this is NOT a financial institution).
    Couple anecdotes might explain the feeling of coming in out of the cold:  Putting a test copy of a web site from the cloud onto the Mac server, XAMPP or MAMP is pretty much already there. The site has a couple WordPress blogs, and they need .htaccess files, and Apache needs an option set to permit remapping URLs. After much searching far and wide to find why it didn't seem to be working, I found the checkbox right there on Apple's management screens.  Much easier than editing .conf from command line.  Linux web admins hate it.
    Tale # 2:  We aren't fully Windows domain controlled -- just using the old network browser.  Need to upgrade that, and I Googled quite a while trying to understand what needed to be done to use Apple's Open Directory instead of setting up an Active Directory on Windows -- both SLDAP3.  Turns out one reason I couldn't find much is there isn't much to say:  it just works.  Just join the domain from a Windows machine.
    One more and I'll be quiet a bit.  We use the Wiki collaboration which is nice enough as far as it goes (no spreadsheets, fatal flaw) and it occupies the server's native web site slot.  So the test copy needed to be another site.  Easy enough -- site setup is all GUI and works fine, but WordPress could not handle a multiuser blog coming to a non-standard port (other than 80) so I needed a second IP multihomed on the server.  How do you do this?  Go to Network in the System Prefs, click on the Ethernet interface and select "duplicate".  Set your IP address.  Done.
    In summary a Mac OS X Server is a better server for a Windows shop than Windows Server 200x.
    My bottom line for choosing Apple:  lower blood pressure.  I SHOULD be money.  After all is said and done, it's about money.  The incredibly more pleasant experience is a free benefit.  You'll pay more for better hardware, but way less in time and trouble.  And you won't be hounded on a daily basis to update the system.  Not that Adobe or Firefox are any better about it on a Mac, but the Apple approach to updates stays in the background.
    Think different.  Simplify.  Focus.  Enjoy your work.

  • At UC platform i can see some applications are installed on Windows server and some directly to VMWare. Pls explain?

    At UC platform i can see some applications are installed on Windows server and some directly to VMWare. Pls explain?

    Pretty much all newer versions of UC applications have started supporting virtualization so they can be installed on the VMware. 
    Have a look at dockwiki for virtualization supported apps:
    http://docwiki.cisco.com/wiki/Unified_Communications_Virtualization_Supported_Applications
    Some applications like CUCM version 4 were windows based previously but going ahead with version 5, 6 onwards the OS has been changed to Linux Operating system.
    Let me know if you need any more information.
    -Terry

  • Applet works in Windows Server and not in Unix server

    My friends,
    I have a signed applet working fine in a windows server and a client with win98. When a put this applet in a AIX/Unix server in same win98 client did not work.
    The applet call a program in the client by Runtime.exec and a give "error=0".
    Someone can help me ?

    Show the code with the runtimeexec line.
    Windows file system is different than UNix.
    Windows eg. Runtime.exec (c:/fileToRun.exe)
    *ix eg.          Runtime.exec (fileToRun)                                                                                                                                                                                                                                                                                                                                                       

  • I have a problem with my ipad i'ts not connected to server and also, on top of my keyboard it says private

    Everyday i was able to access to the internet via wi-fi but later on Iwas'nt able to access, it's not connected to server and also when I used my keyboard it says private I want to undo it. I don't want private could you pls help me. 

    The Private is a button, tapping it allows you to turn private browsing on and off - as it's a button, so like the rest of the keys on the keyboard, it can't be removed. If the menu bar at the top of Safari is light grey (or the Private button has a white background) then private browsing is 'off' ; if the bar is dark grey (or Private has a darg grey background) then private browsing is 'on'.
    For wifi, what have you tried, any/all of :
    - disconnecting/reconnecting to your network
    - soft-reset of your iPad and rebooting your router
    - Settings > General > Reset Network Settings ?

  • After downloading InCopy I click on the downloaded file to install, but the process stops when trying to connect with server and doesn't carry on.

    After downloading InCopy I click on the downloaded file to install, but the process stops when trying to connect with server and doesn't carry on. Can you please help?
    Thanks,

    Agathe.texier which copy of InCopy are you downloading and installing?  Do you receive any specific error messages?  Finally what operating system are you using?

  • When it starts setting up the trial, it says "trying to connect to server" and will not go any farther in the process. I have left it for multiple hours, yet it never works. I need help!!

    I already stated the problem above, but I am able to download the file. Yet, when I try to begin the setup it says "trying to connect to server" and does not do anything else. I need help to finish the set-up!

    Download trial photoshop are you on a managed network?  Please see Sign in, activation, or connection errors | CC, CS6, CS5.5 - http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html for information on how to resolve connection errors.

  • I had a windows laptop, and I save files like photos, documents, videos and other things on an external hard drive, and now I want to move those files to the Mac book Pro, and then move those files again to another external hard drive 1T. My question is:

    I had a windows laptop, and I save files like photos,documents, videos and other things on an external hard drive, and now I want tomove those files to the Mac book Pro, and then move those files again toanother external hard drive 1T. My question is: Is it possible? Doing this willnot affect the files that I had in windows? No information is lost? or how cani do it?

    Connect the external drive to your Mac and drag the files from it to your Mac's internal drive. Then dismount and disconnect the external drive, connect the 1TB external drive, and drag the files from the internal drive onto the external. Nothing will have been deleted from any of the drives up to this point; the files will only have been copied. Verify that the files are readable. There's no reason they shouldn't be; this is just a precaution.
    Now if you wish to delete the files from any of the drives, drag them to the Trash, and Empty the Trash while the drive from which they came is still connected. If you disconnect the drive before emptying the Trash, the files you were trying to remove from it won't be deleted. They'll remain in the Trash and continue to take up space on the drive.
    Note that if your external drives are in NTFS format, you won't be able to write anything to them or delete anything from them, though you will be able to read and copy the files they contain. The NTFS disk format is read-only to the Mac OS, unless you have a third-party NTFS driver installed. To make your drives cross-platform readable and writable, you must reformat them in the FAT32 or ExFAT format.

Maybe you are looking for

  • Vendor Master data report

    HI All, My client want to see the payment terms for the vendor which was created from June-11 to Oct-31-11. Colud you guys plesae guide me how to pull the vendor master records created, changed and Extended from June-11 to Oct-31-11, is there any T.c

  • Problems with the installation of oracle9ias infrastructure

    Hello, I have this very popular problem: "Error in invoking target install of makefile $ORACLE_HOME/sqlplus/lib/ins_sqlplus.mk" in the linking stage of the installation of the infrastructure of IAS 9.0.2. on Linux AS 2.1 - I downgrade the binutils to

  • Org.apache.jackrabbit.api.security.principal.PrincipalManager not resolving in 5.6.1

    Hi, I am trying to add acl to the node dynamically. For a path "/content/dam/abc" folder I want to add read and write access to "testusers" group through the api. For this I am trying to create principal and privilages objects. I am using below code

  • Hyperion workspace username and password

    Hi all, what is the default user name and password for hyperion workspace .. i tried out with admin & password , but it is saying provide valid user name& password...

  • Isqlplus service is not starting

    I have oracle 10.1.0.2.0 installed in my windows xp..I have worked with isqlplus the week before,but unfortunately now it's not displaying.when i see the isqlplus in windows services,it is always displayed as starting..What might be the problem Thank