This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This bug was originally marked as duplicate of bug 229629, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 8.0.2 (Build 201411181905) VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03 OS: Windows 7 User Comments: GUEST: Review of simple code and formmating GUEST: when open a php file whit wrong name(ended with .class not .php) GUEST: Navigatin in searchresults. GUEST: do not load the .class file GUEST: removed some files in Git repo; didn't show in the navigator GUEST: hhhh GUEST: Enclosed logs for your info. GUEST: Create a PHP document with file extension .class rudi.minty: tried to open a ".class" file in a php project jperlman: tried to open a command line script file. GUEST: After restart application GUEST: I was openning a php class file. GUEST: Eu simplismente abri o NetBeans e ocorreu esse erro! GUEST: happens if I try to open a <file>.class file in PHP GUI Formerly these files opened in the editor (as what I wish), since 8.0.2 I get an error 'cannot open, no sources' GUEST: trying to open a file that was working before I restarted the IDE. GUEST: PHP file open failed Stacktrace: com.sun.tools.classfile.ConstantPool$InvalidEntry: unexpected tag at #1: 115 at com.sun.tools.classfile.ConstantPool.<init>(ConstantPool.java:231) at com.sun.tools.classfile.ClassFile.<init>(ClassFile.java:82) at com.sun.tools.classfile.ClassFile.read(ClassFile.java:69) at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitType(CodeGenerator.java:303) at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitType(CodeGenerator.java:270) at com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1172)
Created attachment 160288 [details] stacktrace
Reporters, could you provide some of the 'faulty' class files as attachments ?
aha, all .class files are deemed to be java compiled classes. You need to choose how the IDE interprets .class files. If you want to recognize .class extension as a PHP file, go to Tools | Options, Miscellaneous, select Files tab, then select class extension and choose an appropriate PHP mime type for it. You won't be probably able to work with java projects in this setup.