Jump to content

NetBeans: How generate a class file within the IDE


alienA2
 Share

Recommended Posts

Nevermind lol...figured this one out... go to File->Project Properties->RunThen change the text inside Main Class to the actual class name in your code... My program ran after this change. (note: the java code was written in Notepadd++ then tested on Command Prompt. But I would like to do inside NetBeans IDE now).

Link to comment
Share on other sites

How do you generate a business class? That is what I am normally doing. The convention I was taught is that when you begin a project you go to the Source Packages folder and right-click and create a package and name it 'business'. Then you go to that business folder and right-click and create any classes that you need. The name of the class file must match the name of the class. This is where all classes are except the one surrounding main(). In the file with main() you add import statements at the top such as import business.Myclass; for each business class that you need to access from main.

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...