It works locally. I don't understand what is the problem with this server?
package com.codegym.task.task32.task3201;
import java.io.IOException;
import java.io.RandomAccessFile;
/*
Writing to an existing file
*/
public class Solution {
public static void main(String... args) throws IOException {
String fileName = args[0];
long number = Long.parseLong(args[1]);
String text = args[2];
RandomAccessFile raf = new RandomAccessFile(fileName,"rw");
long len = raf.length();
long seekNumber = number < len ? number : len ;
raf.seek(seekNumber);
raf.writeBytes(text);
raf.close();
}
}