Log on as a service (to run as Windows service) Start/Stop service. On the agent computer, make sure the JRE_HOME or JAVA_HOME environment variables are set (pointing to the installed JRE or JDK directory respectively). In the TeamCity Web UI. For Mac OSx, TeamCity provides the ability to load a build agent automatically when a build.
![Service Service](/uploads/1/2/5/5/125575554/670682249.png)
Once you have installed the JDK (see ), you need to set the JAVAHOME environment variable. To set the JAVAHOME environment variable on Windows. Right click on the ' My Computer' icon on your desktop and select ' Properties'. Click the ' Advanced' tab. Click the ' Environment Variables' button.
Click ' New'. In the ' Variable name' field, enter 'JAVAHOME'. In the ' Variable value' field, enter the directory (including its full path) where you installed the JDK. Restart the computer.
To set the JAVAHOME environment variable on 'nix based systems There are many ways you can do it on 'nix based systems (including Mac OS X).
![Five categories of service mix Five categories of service mix](http://www.thatjeffsmith.com/wp-content/uploads/2014/12/mac-product-conf-41.png)
MATLAB Retina Fix. Install the latest version 7 of java SDK. Find this install file, it should be located in /Library/Java/JavaVirtualMachines/jdk1.7.060.jdk/Contents/Home. In this Home folder, there will be a folder named JRE, copy it.
Now find the matlab app, it should be under applications, which is accesible through Macintosh HD Applications. Right click (Command Click), and choose show package contents. Go to the folder located in sys java jre maci64. There should be a folder labeled jre here, delete it (leave it in your trash can for now incase this does not work).
Now paste the SDK’s jre folder (the one you previously copied) to this location. Open matlab, it should have the updated java runtime, which is verifiable by typing: version -java in the command line. Fatal Error on startup: Cannot locate or initialize class com/mathworks/jmi/OpaqueJavaInterface.