RedBox: .NoClassDefFoundError - {SOLVED}

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
orthiac
Posts: 115
Joined: 25 Jun 2008, 10:03
Location: Massachusetts, USA

RedBox: .NoClassDefFoundError - {SOLVED}

Post by orthiac »

SFS Version: 1.6.6 (fresh install Demo)
OS: Windows Vista 64bit

Steps to reproduce:
Double click red5.bat

Error:

Code: Select all

Exception in thread "main" java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Files.  Program will exit.
Press any key to continue . . .
Evaluation:
The problem seems to come from the way the QTJava.zip path is set in the Environmental variables. red5 does not handle the spaces in the classpath.

Solution:
  • Option 1: Put quotes around the QTJava path in your Systems Environment Variables. (may need to check after QT updates)
    Option 2: Remove %CLASSPATH% from red5.bat.
Obviously option 2 is the "bug" part that could be resolved in the install. I have tested (quickly) and QT does not seem to be affected by the change.
I am not using RedBox extensively (yet) so I would recommend a thorough testing of any changes that are made.

I hope this is helpful to anyone running into this issue.
- Mike
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Evaluation:
The problem seems to come from the way the QTJava.zip path is set in the Environmental variables. red5 does not handle the spaces in the classpath.
I think the problem here is local to Windows only and exclusively if you have installed QuickTime after having installed the JRE.

Reason?
As far as I can remember the QT installer has a nice feature... it highjacks your default Java classpath in the system variables causing major pains when running any Java based application.

Very very sad that this is still happening today as I recall having these problems back in 2002 or so :roll:
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply