Can you post your updated code for us to look at then please...
Type: Posts; User: JavaPF
Can you post your updated code for us to look at then please...
Hey Truffy.
In the TruffyLog class, try changing:
public static boolean isOn() {
return on;
}
to
Trail: RMI (The Java™ Tutorials)
Are you looking to make the program print out only the changes in the file? You are still going to need to download and parse the entire log file atleast once....
No problem Truffy. I'm glad I can help.
I don't have any SSH code examples. I suggest you look for a Java SSH API.
SourceForge.net: SSHTools
SourceForge.net: SSHTools: Files
Try this. I have used a boolean variable which is set to false at run time. When the log file is changed for the first time, the createAndShowGUI method is run and the boolean variable is set to...
I haven't tested that code on large files but as far as im aware, it will download them as fast as your internet connection will allow. I'm not sure how you would make the process faster.
Good morning Truffy,
I'm glad that code is working with the new server.
So you want to watch the log file and when it is changed, your application does something?
How about this code....
Hello Truffy,
You said you normally use WinSCP to connect to the linux box. Does that mean you can connect via FTP?
If so, you could try this code. You may need to edit it slightly.
...
Why not login to the Linux box and launch the application from there?
OK in that case your user has access to the path/file in question.
Are you running this application in a Linux environment?
If so, I'm thinking it could be something to do with the path String....
Do you have access to this file before you run the Java program?
Hello Truffy,
Here is a simple example. It will read in a file called log.txt and print it's content to the console:
import java.io.BufferedReader;
import java.io.FileInputStream;
import...
Hello Truffy,
Do you know the location of the log files? What do you wish to do with the file once you have it?