My problem was that I was invoking a very old version of java (1.4.2) when using the command line. Once I deleted that and pointed my env vars to the latest jdk release I got it to work.
You are right, LanceA. I also took the information about the needed switches from the error messages when running the project for the command line.
However, for those who have not done this yet, the path given in these error messages is not the right one. That path is for an earlier Beta release, 3.beta.0000 (the directory structure is also different).
The path given there is:
/Program Files/Alice/3.beta.0000/tools/jogl/lib/windows-i586
But, for version 3.0.0.0.55 (the one currently available), this path should be:
<drive>\Program Files\Alice3Beta\application\windows-i586
This points to the java native interface DLL file.
The path to the Java OpenGL DLLs is
<drive>\Program Files\Alice3Beta\ext\jogl\lib\windows-i586
Both of this paths have to be passed to java for executing your project.
Assuming you installed Alice3.0 in the default folder, and on the C: drive, the following command will run your
AliceProjectWizardProject.jar (The file generated when you build an Alice project in NetBeans):
Code:
java -ea -Xmx1024m -Djava.library.path="C:\Program Files\Alice3Beta\application\windows-i586;C:\Program Files\Alice3Beta\ext\jogl\lib\windows-i586" -jar "AliceProjectWizardProject.jar"
I run this command inside the folder
C:\Documents and Settings\<yourusername>\My Documents\NetBeansProjects\<yourAliceProject>\dist
This folder is created automatically by NetBeans when you build your project.
I would recommend people to make a little BAT file for running your projects from the command line. Since all built project files are named
AliceProjectWizardProject.jar, you could just copy and paste this BAT file in the
dist folder of each Alice NetBeans Project your create.
This is
a way you can create that BAT file:
1- Start
notepad.exe (On XP: START > All Programs >Accessories > Notepad)
2- Paste the following in the editing area:
Code:
java -ea -Xmx1024m -Djava.library.path="C:\Program Files\Alice3Beta\application\windows-i586;C:\Program Files\Alice3Beta\ext\jogl\lib\windows-i586" -jar "AliceProjectWizardProject.jar"
Make sure this forms a single line --widen the Notepad window and scroll sideways if necessary.
3-Save your file as
run.bat inside the dist folder of your project.
Make sure "
Save as type" option is set to "
All Files" (otherwise notepad may insists in adding .TXT after run.bat
Now, whenever you want to run your NetBeans Alice Project, navigate to the
dist folder of the project and double-click on the
run.bat file.
Cheers