Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the execution directory in Eclipse?

Tags:

java

eclipse

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.

like image 593
Burkhard Avatar asked Nov 30 '08 18:11

Burkhard


People also ask

How do I change the working directory in Eclipse?

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 .

Where is the directory in Eclipse?

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.

What are the shortcut keys for debugging in Eclipse?

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.


1 Answers

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.

like image 81
Jon Skeet Avatar answered Oct 11 '22 04:10

Jon Skeet