0

I tried Googling but was unable to come up with any results. What I'm looking for is a basic explanation or tutorial on howto navigate a Unix server with Java.

I have several Java programs that I would like to run directly on my server, however I just have no idea how to let these programs go to certain directories, or scan certain files, etc.

How exactly can I use Java with Unix?

3 Answers 3

2

Use File. Specify a path, see if it is a directory, open it, read it, delete it, etc, etc, etc.

listFile will give the files within a directory.

Sign up to request clarification or add additional context in comments.

1 Comment

Much appreciated I just had no idea where to start.
1

To make your life easier use Apache commons-io FileUtils -> http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html

Here is the project home page -> http://commons.apache.org/io/

Comments

1

Here you can find simplest guides:

  1. http://docs.oracle.com/javase/tutorial/essential/io/

  2. http://www.tutorialspoint.com/java/java_files_io.htm

  3. http://home.cogeco.ca/~ve3ll/jatutor9.htm

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.