Jump to content

NetBeans: How generate a class file within the IDE

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...