Jump to content

file not found but yet it exists


Recommended Posts

[01/11/2021 12:29:12 PM]: Loading server settings...
[01/11/2021 12:29:12 PM]: Failed to load server settings!
java.io.FileNotFoundException: server1.properties (The system cannot find the file specified)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at io.ruin.GameServer.main(GameServer.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at kilim.WeavingClassLoader.run(WeavingClassLoader.java:122)
	at kilim.tools.Kilim.trampoline(Kilim.java:110)
	at kilim.tools.Kilim.trampoline(Kilim.java:79)
	at io.ruin.GameServer.main(GameServer.java:78)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at kilim.tools.Kilim.trampoline(Kilim.java:113)
	at kilim.tools.Kilim.trampoline(Kilim.java:79)
	at io.ruin.GameServer.main(GameServer.java:78)
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at kilim.WeavingClassLoader.run(WeavingClassLoader.java:122)
	at kilim.tools.Kilim.trampoline(Kilim.java:110)
	... 2 more
Caused by: java.io.FileNotFoundException: server1.properties (The system cannot find the file specified)
Caused by: java.io.FileNotFoundException: server1.properties (The system cannot find the file specified)

	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at io.ruin.GameServer.main(GameServer.java:93)
	... 8 more
println("Loading server settings...", false);
        Properties properties = new Properties();
        try (InputStream in = new FileInputStream("server" + Configuration.WORLD + ".properties")) {
            properties.load(in);
        } catch (IOException e) {
            println("Failed to load server settings!", true);
            logError(e);
            throw e;
        }
public static int WORLD = System.getProperty("user.home").equals("D:\\RSPS\\Server 1\\Galvek_Master\\galvek-game-server") ? 1 :
            System.getProperty("user.home").equals("C:\\Users\\name") ? 2 :
                    System.getProperty("user.home").equals("C:\\Users\\name") ? 3 :
                            1;//else 1

The file exists in the location but when I try and run the game server it can't find it? Could someone help me to fix this issue please?

Link to post
Share on other sites
16 minutes ago, Jack said:

This is because its looking for "server1.properties" not "server.properties".

Remove the 1 and it should work.

The file name is server1.properties but I will remove the 1 and see if it works.

Nope, still the same and I took away the configuration.world part and make it a single string and changed the names but still the same error.

Edited by bblewitt
Link to post
Share on other sites
  • 2 weeks later...
public static int WORLD = System.getProperty("user.home").equals("D:/RSPS/Server 1/Galvek_Master/galvek-game-server/") ? 1 :
            System.getProperty("user.home").equals("C:/Users/name/") ? 2 :
                    System.getProperty("user.home").equals("C:/Users/name/") ? 3 :
                            1;//else 1

 

should fix your issue.

 

When pasting in directories IDE's like to try and be helpful and change your route from: 

D:/RSPS/Server 1/Galvek_Master/galvek-game-server/

 

to

D:\\RSPS\\Server 1\\Galvek_Master\\galvek-game-server

as \\ symbolises a regular /

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...