• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to open tutorial code in ecclipse

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have some sample code from a tutorial I am doing. Is there a simple way to open it all? I can not import it as a project since Eclipse says there is no project to be found.
The folders I have are:


Each of the folders in the src folder contain 3 classes all of which i can open but i can not run the main. I tried to make the example above look like a directory tree it is not actually code
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can be tricky with eclipse. Here is what I usually do:

1) Create an empty java project in eclipse.
2) adjust the paths in the .project and .classpath files and .settings folder to match the ones of your tutorial
3) Copy the .project and .classpath files and .setiings folder into the root folder of your tutorial. Note: if you can't see those files, open the package explorer menu, click on customize view and unselect the .* ressouces filter
4) Import your tutorial, eclipse should now recognize it as a java project.

You may also import your tutorial as a general project and then copy the .project and .classpath files and .settings folder from the empty project into the tutorial project then, edit the paths in the various file to fit your tutorial layout. That works too.

There might be more straight forward ways to do this but none that I am not aware of.

Good luck!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic