Here’s how to setup sunflow so it’s just one click away on your WindowsXP desktop. This assumes you have the jdk installed and working properly. You need the jdk (not just the jre) to make use of the ‘-server’ option and to obtain much faster renders.
Set the classpath environmental variable. If you’re using 4NT, this is the fastest way: set /u classpath=c:\sunflow\sunflow.jar;c:\sunflow\janino.jar
Otherwise, press ‘WinKey+Break,’ click on ‘Advanced,’ click on ‘Environment Variable’ and set it there. Either way, the classpath remains permanently set even after rebooting. The benefit of doing this is that you don’t have to type in the paths to the jar files from the command line.
Create a new shortcut on the desktop and enter this in the target field: javaw.exe -server SunflowGUI Note that you should use ‘javaw.exe’ not ‘java.exe’ so that an annoying dos box doesn’t open up. Optionally set the ‘start in’ field to ‘c:\sunflow\data’ and you’re done.
In addition to clicking on the icon, you can also very easily start sunflow from the command line to get access to HDR export, other features, and the help screen: java SunflowGUI -h
Just one thing: some errors don’t yet get reported in Sunflow’s console, but do instead get to the Win console. Things like exceptions and stuff. This has the effect of having you wonder what happened if you can’t check both consoles. But I agree, it is slightly irritating to have two windows for one app (as with Blender also).
When I set this up I get the following error when I try to run the command:
Error: no `server' JVM at `C:\Program Files\Java\jre1.5.0_02\bin\server\jvm.dll'
It works fine if I run the command without the ‘-server’ switch. It seems somewhere like I heard that with the ‘-server’ switch it runs faster, so I would like to get that to work. Am I missing something Java realted?
The JDK happens to be the only way to get the optimized server VM.
After the JDK is installed, you may still get complaints that it can’t find the server VM. If thats the case, check that your system path is pointing to the right version. Installing the JDK installs one copy with all the tools and both client and sever vms, and one copy that is just a plain install of the JRE. Type path at the command line to see which folder is getting used by default. If its the jre, go to the command panel like scorpius described and change the path.
Could someone post a link to download the JDK, I found a lot of different links, but wasn’t sure which one was the way to go. I have the JRE and just want the simplest version of JDK that I need to get the -server option running for Sunflow. Thanks.
I get that too. I even installed the JDK fpsunflower mentioned.[/quote]
Check your system paths. When you install the JDK you get TWO copies of the VM, one that has only the client and one that has both server and client. Repoint your PATH environment variable to point to the one with both.
Look around your program files directory, you should be able to spot the right one because it will have a client and server directories inside its bin.
You can also copy the server directory to the copy of the JRE that doesn’t have it if you don’t want to change your path.
How exactly do i set the variable? I did the set /u classpath blahblah, but it didnt work, so im guessing this is totaly wrong. If i try to set it in the advanced panel with winlogo+break i get VARIABLE NAME: VARIABLE VALUE: im not sure what to put in there.
And i have jdk and jre inside the java folder in program files. only one has any directories in bin, and its jre > client
And when i do this without the -server i get another error “Could not find the main class. Program will now exit.”
Its the PATH environment variable you are looking for, not CLASSPATH. But this is a bit confusing since it shows up in several places. Try the following:
Inside the jdk directory there should be a jre directory with a server directory in it (jdk > jre > bin > server) Try copying that to the (jre > bin) that contains the client folder. You end up with client and server side by side inside java\jre\bin.
Make sure you type the command line as shown in the readme file from where you unpacked the jar files.
Its the PATH environment variable you are looking for, not CLASSPATH. But this is a bit confusing since it shows up in several places. Try the following:
Inside the jdk directory there should be a jre directory with a server directory in it (jdk > jre > bin > server) Try copying that to the (jre > bin) that contains the client folder. You end up with client and server side by side inside java\jre\bin.
Make sure you type the command line as shown in the readme file from where you unpacked the jar files.
Let me know if this works for you.[/quote]
K, i copied the server folder ( it was in jdk>jre>bin ) and it must have worked, because now it skips to the next error. that class path one.
PATH already has “%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\GTK\2.0\bin” in it. should i replace it or add on to it somehow?