简体   繁体   中英

Where to get the .java files of a netbeans project?

As you might notice, I'm quite new to netbeans and programming in general.

I've been working on a small project (homework) and now I need the .java files from one of the packages. When I build the project, i get a .jar archive with all the classes. When I compile the package I need, I get a .jar archive of the .class files of this package (in the "build" folder of the project). However, I need a zip archive of the .java files of this package. I'm a little embarassed to ask, but where do I get these from?

Thanks, Zhao Nan

From the Projects window (Window-->Projects) or Ctri-1

Navigate to the .java file you want, and right-click on it, and select Properties . The path to the file is shown under All Files .

To see the path to the project right-click on the name of the project (in the Projects window), select Properties , and the project folder is shown under Sources-->Project Folder

If your are on windows, usually if you let netbeans create all by it self it creates a directory called

NetbeansProjects

Under "documents"

There will be a folder list of all your projects. Under the project name that interest you, go in the "src" folder. All your java files should be there.

On Ubuntu 16.04 using NetBeans IDE 8.2, a folder called NetBeansProjects was created in my root directory, parallel to the netbeans-8.2 directory. I'm guessing that this was suggested at installation time and can be configured differently.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM