Is it possible, to execute a class in a specified directory?
I mean, a.class is in directory abc and i want it to be executed as if it were in directory xyz.
In the Working directory section, click on the "Other" radio button. Click the "Workspace..." button and navigate to the desired working directory, typically the "bin" directory. Click "OK". Click "Apply" to save the changes and then proceed below to the next step to create the .
Locating files, directories, and projects The Properties view can be used to find out where the files, directories, and projects that are in Eclipse, are located on your hard disk. With the Properties view visible, select a file, directory, or project in the Project Explorer or Package Explorer view.
A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.
Absolutely.
Go into the Debug/Run dialog (drop down button next to the bug/"go" buttons), and in the Arguments tab, set the Working Directory by selecting "Other" and then putting in the relevant directory name. Note that the directory can use "variables" like $workspace_loc
. You can even make it prompt the user using $folder_prompt
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With