Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Unix Commands from windows

  1. #1
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Unix Commands from windows

    Hi everyone..
    I'm using windows..
    and our server is UNIX..
    I knew that it's possible to create DOS commands in java programs,
    I have tried it already..

    What I want to know is, is it possible to create a
    java program (from windows) that can execute UNIX
    command?

    Something like:
    I have a java program in my windows, and it will
    create a directory in UNIX server /home/dir..

    base on my research, I can connect to our server in
    command prompt of my windows using ftp <domain>
    but the commands there is limited.

    Thanks a lot


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Unix Commands from windows

    Are you asking if it's possible to build a Unix command shell for Windows, like Cygwin, or whether it's possible to write a Java program to run on a Windows machine that sends Unix commands to the server? If the latter, the Java program would use the host OS to interface with the server so would be limited by what the host OS can do. So I believe it's possible, but the results may not be what you'd hoped for.

  3. #3
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: Unix Commands from windows

    If the latter, the Java program would use the host OS to interface with the server so would be limited by what the host OS can do. So I believe it's possible, but the results may not be what you'd hoped for.
    Thanks for your response I'll make more research about it.

Similar Threads

  1. [SOLVED] Running Program in UNIX with package
    By dicdic in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 13th, 2014, 12:06 AM
  2. [SOLVED] Compiling program to unix
    By dicdic in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 11th, 2014, 07:47 PM
  3. Read a binary unix file with Java?
    By dunamase3 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 24th, 2014, 09:36 AM
  4. Duplicating default behavior of unix sort
    By dreamerBoy in forum Java Theory & Questions
    Replies: 1
    Last Post: May 31st, 2013, 07:10 PM
  5. How to get unix timestamp from formatted date?
    By snytkine in forum Java Theory & Questions
    Replies: 5
    Last Post: October 12th, 2010, 08:07 AM