Server error when opened from shell script

Forum rules
Before you post please read how to get help

Server error when opened from shell script

Postby rgrwtrs on Sun Apr 08, 2012 11:04 am

Hello everyone,

I am having an issue with a server that I am running. I am using the Remote PC server. This server allows me to use an app on my tablet (or phone) to control my laptop. When I open terminal and execute this command "java -jar ~/RemotePC/RemotePCServer.jar", the server starts up and works flawlessly.

I wanted to create a shell script that I can just click on and have the server start. I created a file containing the following:
java -jar ~/RemotePC/RemotePCServer.jar

I made it executable and when I click on the file, if it is in the same folder as the jar file and other files the server uses, it runs fine. If i create a launcher, or move the file to another location (like the desktop) it runs the server, but when I try to do remote desktop it gives me this error:

IOException (SnimkovaniObrazovkyVlakno): Can't read input file!
Exception in thread "Thread-4" java.lang.NullPointerException

Usually on my tablet I will be able to see and navigate the desktop. When I get this error, i can still control the mouse, but I don't see the desktop. Is there something I am missing that I need to do in order to run a server from a luancher or file that is not located in the same folder as the server files?

I am using linux mint 12 gnome3.

If you need any more info please let me know.
Level 1
Level 1
Posts: 32
Joined: Sat Mar 06, 2010 4:54 pm

Linux Mint is funded by ads and donations.

Re: Server error when opened from shell script

Postby Oscar799 on Mon Apr 09, 2012 3:46 am

Moved here by moderator
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789
User avatar
Level 19
Level 19
Posts: 9298
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 6 guests