user3467039
user3467039

Reputation: 9

How to run java file when file is not created

I have a question on how to run a java file that I had downloaded from my professor. The problem occurs when I open eclipse and open the java file from where I had it saved eclipse will not let me run the java file.

Upvotes: 1

Views: 46

Answers (3)

Dushyant Gupta
Dushyant Gupta

Reputation: 515

Why not just copy and paste the contents if it is just a matter of one file.

Upvotes: 0

TheLostMind
TheLostMind

Reputation: 36304

why not use javac and java commands on cmd line?. In eclipse, you could also add the file to an existing project and run it.

Upvotes: 0

Muhannad A.Alhariri
Muhannad A.Alhariri

Reputation: 3912

Create a new project and then import the file to this new project ,finally run the project as application.

Upvotes: 2

Related Questions