Too, if you don't want to JAR it you can point NB to a directory for a class path in libraries in the project properties.
For instance, say you have a folder my with child/sub folder somepackage and in somepackage is MathFP.class, so package my.somepackage and fully qualified class name my.somepackage.MathFP. You would put folder my in another folder called classes or something similar under your project folder unless you already have a similar library folder some where you can link to. Then you point the library to the classes folder. Then any simple .class files can be put there as long as you have the correct package structure. That is the important part...package structure and making sure you have the right parent directory selected. This also affects JARs, so you have to know the issues with classpaths and packages etc.
Wade
==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org
----- Original Message ----
Sent: Monday, January 5, 2009 5:29:48 AM
Subject: RE: [nbusers] How to include a .class file in my project
Stick the MathFP.class file in a jar, then add a reference to that jar in
your project (My guess is that you extracted this from a jar in the first
place, in which case, refer to that jar).
Regards
Nick
-----Original Message-----
Sent: 05 January 2009 02:20
Subject: [nbusers] How to include a .class file in my project
I searched for ages but couldn't find an answer to what I thought would be a
common issue.
I have a pre-compiled MathFP.class file that I want to include in my
project. How do I do that? I tried simply copying it into my src directory
but Netbeans didn't recognise it when I tried to add an import command in my
code.
I only have the .class file, nothing else.
Thanks in advance for any assistance.