• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to load Java file into Netbeans so I can work with it?  RSS feed

 
Jason Hart
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a couple .java examples I want to mess with but don't know how to get them into Netbeans so I can work with them. What is the process in loading a .java into Netbeans so I can work with the code and run it in Netbeans?
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File -> Open File...
 
Jason Hart
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:File -> Open File...


Yeah done that, you can't run it as there is no project, just a .java file. I guess I should ask how to make the .java file a project?
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ha, I knew it wouldn't be that easy. It looks like you can add a folder but not a file.

Right click on your Project
->Select Properties
->Click on sources
->Click on add folder
 
Jason Hart
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:Ha, I knew it wouldn't be that easy. It looks like you can add a folder but not a file.

Right click on your Project
->Select Properties
->Click on sources
->Click on add folder


I don't have a folder, just a .java file which I want to load into Netbeans and work with (like you do with Projects). If I just open the file .java in Netbeans you can see the code but you can't run it because it isn't a project. How do I make the .java a project?
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try creating a new Project in NetBeans and then adding the folder your file is in.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!