alienA2 Posted April 8, 2012 Share Posted April 8, 2012 I know to do this in Command Prompt. But how do you generate a class file in NetBeans? Link to comment Share on other sites More sharing options...
alienA2 Posted April 8, 2012 Author Share Posted April 8, 2012 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 More sharing options...
davej Posted April 12, 2012 Share Posted April 12, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.