Results 1 to 6 of 6
Thread: Eclipse Setup
- 10-29-2011, 04:24 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 64
- Rep Power
- 0
Eclipse Setup
To the forum,
I am using Eclipse (Version: Indigo Service Release 1), and I have existing .java code and associated .class files in a directory /cscie160/hw4 which maps to my package statement in each of the .java programs. My problem is when I try to create a project in Eclipse, and just to run the programs it says it cannot find "main" and tells me errors exist in my programs, which run just fine from a command line...Typically the errors are referencing the package statement.
Can someone assist with getting an existing set of code with existing package statements into Eclipse so that they will run correctly?
thanks
Steve
-
Re: Eclipse Setup
Have you imported the code into Eclipse?
- 10-29-2011, 11:28 PM #3
Senior Member
- Join Date
- Jul 2011
- Location
- Melbourne, Victoria, Australia
- Posts
- 155
- Rep Power
- 2
Re: Eclipse Setup
Is your source in a named package of your projects' source folder?
- 10-30-2011, 04:08 AM #4
Member
- Join Date
- Oct 2011
- Posts
- 8
- Rep Power
- 0
Re: Eclipse Setup
jammas615-- can you elaborate on that ? I seem to be having the same trouble -- what is a "named package" ? and what is the "source folder" ? Thanks so much!!!!!!!
--Josh
- 10-31-2011, 02:31 AM #5
Senior Member
- Join Date
- Jul 2011
- Location
- Melbourne, Victoria, Australia
- Posts
- 155
- Rep Power
- 2
Re: Eclipse Setup
I you have a look at your package explorer on the left hand side, You should see all you projects in your current workspace.
Your projects will have pluses next to them and you can expand you projects folders.
When you first click, you will likely see some folders called: 'src' and 'JRE Sytem Library'... blah blah.
'src' is your source folder and if you click on the plus you will expand it.
Once expanded, you can see you packages and source files. (Packages have a symbol that looks like a brown box)
If you dont have one, or there is '(default package)', create a new package and just drag your source files into it.
It Looks like this:
Hope that helps.Java Code:+Project name +src +(default package) ----------You dont want this!!! +package for your source - Class.java - Class1.java etc... +JRE System library[version]
- 10-31-2011, 03:19 AM #6
Member
- Join Date
- Oct 2011
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
java environment setup with eclipse
By sueperg in forum Java ServletReplies: 4Last Post: 09-14-2011, 07:41 PM -
Not able to see apache2 server in Eclipse WTP Setup
By anupindi007 in forum EclipseReplies: 1Last Post: 05-28-2011, 04:57 PM -
setup oc4j server in eclipse 3.3
By mamri in forum EclipseReplies: 0Last Post: 12-22-2008, 11:33 PM -
Eclipse Environment setup
By mudgil.gaurav in forum EclipseReplies: 1Last Post: 09-18-2008, 07:10 AM -
Setup
By Mir in forum New To JavaReplies: 9Last Post: 06-27-2008, 11:12 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks