10

Sorry for probably too novice question

I have folder on file system that contains java sources, like that: C:\project\src\com\sun\blahblah...\Main.java

Main class is in the package com.sun.blahblah... and contain public static void main method, i.e. everything is well-formed :)

I want to import entire folder C:\project\src then I want to right-click Main.java and run it as Java application.

What kind of import should I select in Eclipse (from file-system or what)?

Note I don't want to create copy of my sources. They are under SVN already. I want to edit/run existent soures.

1
  • 2
    You shouldn't actually use the com.sun package unless your code is the property of Sun Microsystems. I assume you were just using that as an example, but just in case... Commented Jun 6, 2011 at 20:27

2 Answers 2

11
  1. Create a new Java project in Eclipse
  2. Select c:\project as the root folder of the project (create a project from existing source)
Sign up to request clarification or add additional context in comments.

1 Comment

And how to run app imported this way in debug mode?
5

Create a new project in your Eclipse workspace (or use an existing project)

Rigth-click on the project

Select “Import…” / “General” / “File System

Choose the directory, select the files and IMPORT

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.