java.lang.NoClassDefFoundError: Could not initialize class sun.nio.ch.FileChannelImpl
问题 I am working on an application that executes a Jython 2.5.3 script from JAVA 1.6.027 . The script just open a file using codecs library and it looks like this: try: from codecs import open as codecs_open except ImportError: print 'ERROR', 'Could not import.' CODECS_LIST = ['latin-1', 'utf-8', 'utf-16', '1250', '1252'] def open_file(filename, mode): ''' DOC ''' for encoding in CODECS_LIST: try: f = codecs_open(filename, mode, encoding) f.read() f.close() print 'INFO', "File %s supports