Environment Variables

Gday,

I was just wondering whether it is a requirement to set the SGHOME variables when running the server. I have noticed that you have put the config files as Java runtime variables based on this environment variable.

I am in the process of creating a series of Eclipse plugins to enable the ease of developing, running and debugging SGS applications and would really like to be able to create multiple SGS servers and have them run “In Process”.

Regards,

Shane

Hi

I’ve run SGS from eclipse to debug my code, I also use an ant script to launch it when I’m doing my remote testing, neither have the environment variable set.

HTH

Endolf

P.S. The ant script can be seen here if you want to see what does need setting.

I tried to run the server with the SGS config and logging properties files in a location with spaces in its name and failed with a FileNotFoundException.

ie:


Exception in thread "main" java.io.FileNotFoundException: 'C:\Documents and Settings\shaneb\My Documents\Oakton\Competency Centres\J2EE\runtime-New_configuration\SGS Servers\Test Server\sgs-config.properties' (The filename, directory name, or volume label syntax is incorrect.)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:135)
	at java.io.FileInputStream.<init>(FileInputStream.java:95)
	at com.sun.sgs.impl.kernel.Kernel.getProperties(Kernel.java:533)
	at com.sun.sgs.impl.kernel.Kernel.getProperties(Kernel.java:517)
	at com.sun.sgs.impl.kernel.Kernel.main(Kernel.java:589)

Is the above a known issue?

Regards,

Shane

Nope. We tested most paths with spaces and they worked just fine. I just tested it again and its still fine

Looks to me like you incorrectly specified the path to your config file.

BTW, just to be clear.

SGSHOME (and JAVA_HOME) are only part of the shell/batch scripts.

If your launching from an IDE like eclipse they have no effect what so ever (unless you are calling the script from the IDE which would be an odd thing to do in most IDEs.)

Double checked and the path is fine. shrugs For some reason the Launcher within Eclipse has a problem with that config file path

Back to the old drawing board, maybe I will make use of an environment variable (ala JRE variable) to point to the plugin and associate it will a “server” type project.

  • Shane

odd. It wirks fine for me from eclipse and my config path has a space… all my projects do.

shrug

Worked it out… was using a ’ where I should be using an escaped "

  • Shane