PDA

View Full Version : Cannot get the program to run in netbeans


ottar9919
06-28-2009, 04:54 PM
I can successfully import my Alice 3 project into netbeans and see all of the code, but problems arise when I try to run the program. I build it(successfully), but when I run it, a blank window pops up(where the scene should be) and many red error messages pop up at the bottom. Then, when I hit the X in the corner to close the program, it does not work and I have to manually stop in in Netbeans. I have already installed the Alice, OpenGL, and BlueJ plugins. Does anybody know why this is not working?

DrJim
06-28-2009, 10:15 PM
...and many red error messages pop up at the bottom.

What do the messages say? :confused: That should give you a pretty good idea of what the problem is.

I've had name conflict problems, which just gave errors, and also have had a total hangup like you described every time I tried to use a mouse listener (I did file a bug report on that - but only a couple of days ago).

As an aside, the bug reporting site seems to be woefully underutilized. For sure, problems won't get fixed if no one working on the project knows they're there.

Remember this is a "beta-" plugin working on a "beta" application. I have enough problems just getting Alice 3 to run at all :eek: to be surprised that I have problems importing it into NetBeans. :rolleyes:

The "good news" is that once you get a project into NetBeans, you seem to have a pretty stable platform for editing.

ottar9919
06-29-2009, 12:46 PM
This is the error message that I receive:

"Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not create windows registry node Software\JavaSoft\Prefs\org at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org\alice at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org\alice at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org\alice\apis at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org\alice\apis at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn \gallery at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn \gallery at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn \gallery at root 0x80000002.
Jun 29, 2009 1:44:41 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\org\alice\apis\moveandturn \gallery at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: javax/media/opengl/GLDrawableFactory
at edu.cmu.cs.dennisc.lookingglass.Program.getLooking GlassFactory(Program.java:33)
at edu.cmu.cs.dennisc.lookingglass.Program.preInitial ize(Program.java:61)
at edu.cmu.cs.dennisc.lookingglass.DefaultProgram.pre Initialize(DefaultProgram.java:48)
at edu.cmu.cs.dennisc.animation.Program.preInitialize (Program.java:108)
at org.alice.apis.moveandturn.Program.preInitialize(P rogram.java:61)
at edu.cmu.cs.dennisc.program.Program$1InitializeThre ad.run(Program.java:92)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLDrawableFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
... 6 more"

DrJim
06-29-2009, 03:24 PM
Boy, that really clarifies things, doesn't it? (?????) :D

It does tell me that what you were trying to work with was the factory from the Looking Glass Gallery. I've never gotten it to work right either - though I was blaming the problem on a Mouse Listener (which definitely is a problem) rather than the model itself. I'll do a simpler check and edit this post if the model is actually the problem.

Again - I'd stay with the Generic Alice Models until you've proven out your usage of the various commands. There are enough problems there - you don't need to put model problems (which any 3D program is going to have) on top of that.

Not a complaint! I really appreciated the Alice team releasing these Beta versions :) so we can get a start on figuring the problems out.

Note: I just tried a very simple program using the factory model (just started the gears turning) and it did export to NetBeans and run there OK.

There is a fairly basic practical problem with the model, however. Once you call the method to start the gears turning, they turn forever - and there is no way in either Alice 3 or NetBeans (unlike Alice 2.x) to actually edit the procedure that turns the gears. Looks like if you want to do that, you have to "roll your own" method. (I might do just that - if so will post it.)

ottar9919
06-29-2009, 06:45 PM
Thanks Dr. Jim, but unfortunately I was already using just the Generic Alice models. The program was just a penguin that move forward and back, and turned a little, so it has nothing to do with the looking glass gallery, although I do see what you were looking at in the error code.

I cannot be too worried about this, as it is a beta version, but others seem to get it working a little bit in Netbeans. I am on Vista, so that may also be causing a problem. Has anybody else got it working on Vista?

DrJim
06-29-2009, 07:10 PM
For what I thought the problem was - and as a fix to the factory problem - I did successfully complete an Alice 3 and NetBeans project. It is posted at http://www.alice.org/community/showthread.php?p=10844#post10844 .

All of this was done on Vista, by the way, since that's my newer machine and where I have the full JDK and NetBeans. On my older XP machine, the graphics chip is old enough that I can't do the default "move models with the mouse" - otherwise I do prefer running Alice x.x with XP.

ottar9919
06-29-2009, 07:42 PM
Thanks again Dr. Jim for all of your help. I downloaded the example you created, and ran the batch file, everything worked fine. I then opened it in Alice, and again everything worked fine, but when i tried to run it in Netbeans, I received the same error message as before.

Looking closer at the error message, I see the word "registry" alot, along with "trying to recreate", and "could not open". This leads me to believe that it is a problem a little deeper down, with Windows registry. I will try to play around with some things in Netbeans and see if I can get it to work, but I am not sure what to do about the registry problem.

lanceA
06-29-2009, 08:08 PM
Looking closer at the error message, I see the word "registry" alot, along with "trying to recreate", and "could not open".
This leads me to believe that it is a problem a little deeper down, with Windows registry. I will try to play around with some things in Netbeans and see if I can get it to work, but I am not sure what to do about the registry problem.

The error messages "appear" to be telling you that you do not have 'privilges' to write to the Windows Registry. Though I am not sure why you need those 'Rights' with Alice 3.0??

Sorry I can not help further..............I have no idea why Alice are any of the .dll files used need to be 'Registered'....it might be jogl/OpenGL need to register or something else.
Good luck,

DrJim
06-29-2009, 09:11 PM
... you do not have 'privilges' to write to the Windows Registry.
... I have no idea why Alice are any of the .dll files used need to be 'Registered'

They don't - I get those warnings all the time in Vista. (Vista is really picky about access privilidges :mad: - you'll learn to love it, Lance. But since it doesn't seem to affect anything, and I hate messing with the registry, I've never changed those privilidges.)

It's the ones including and after
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: javax/media/opengl/GLDrawableFactory
at edu.cmu.cs.dennisc.lookingglass ...
that (I assume) really reflect the problem. I do not get things like that unless something is really wrong. Unfortunately, in this case with a generic model, I have no idea what. :(

ottar9919
06-30-2009, 07:37 PM
I just tried going into my parents account(administrator) and none of the problems that occurred for me before happened this time, but they are still there when i go into my account and try it. How do I fix this?

DrJim
06-30-2009, 08:30 PM
How do I fix this?

Run on your parents account?? :D Buy your own machine with XP?? :D

Seriously I obviously have no idea, but I suspect this is going to be an ongoing problem with Vista, especially in classrooms with a lot of machines operating off of a single server. Maybe some of the Alice team can give some guidelines for installation and setting up access priviledges.

Though I have administrator priviledges on my Vista machine, I still get the regestry warnings. Did these go away for you - or just the error messages?

ottar9919
07-01-2009, 11:02 AM
I did not even get the registry warnings.