Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am a Linux Newbie and am a JAVA newbie too. I am in a java class and am learning to write code. Yesterday, after completing most of my code I went and closed out all the -- for lack of a better term -- "screens" Now when I open Eclipse I hunt for my program and open it and when i go to compile my program i get " RUN AS
Select what to run:
Ant Build.
this is not the normal compile option and I don't know what is going on or how to fix it.
I hope this is the right forum for help. PLEASE HELP.
Make things easy on yourself, leave everyhting as it is and just close Eclipse. It restores everything later on, well, it did now, but you did'nt expect this, did ya?
Somewhere on the left, you should see your project tree, expand it until you see your class(es), double-click on the one(s) you want to open and "poof"...
Thor,
I did a close all. Is that what you were saying? Now when I logged back on, I have a total blank screen and have to figure out how to open all the windows and then figure out how to get it to compile again??????????????????????????????????????
Okay, look at this image, see the left? Where it says "src" right above the folder "com.vehicles" - this is an example of how Eclipse organises stuff.
Look at your screen, see the tree at the left? Expand it until you see your source code...in this example, the file is called "car", by double-clicking on that name (in the tree) you open the file.
I do see what your saying, however I can't figure out how to get the Eclipse to open as it did the first time i ever used it. Which would let me see all the views, and the edit section and also hopefully the compile option would be correct.
I do see what your saying, however I can't figure out how to get the Eclipse to open as it did the first time i ever used it. Which would let me see all the views, and the edit section and also hopefully the compile option would be correct.
Sorry if i sound dumb!
Ok, let's take this one step at a time. Start by attaching a screenshot of how your Eclipse looks at the moment.
[EDIT]:
BTW, the very first time eclipse starts you get the 'Welcome Screen'. Is this what you want?
In this case click on Help->Welcome. At least in Galileo that is how to get to the welcome screen.
Ok, your Eclipse looks fine so far.
The problem is that your program is flawed. As the message in a previous post suggests, it is missing the main function. I also see a lot of marked errors in your screenshot. This is another reason why your program will not execute even if you supply a class with a main function. Did your program execute before? If yes, then it might be necessary that you import some missing classes into your project, i.e. copy/move them to your source folder and then refresh the project by marking it in the package explorer and then hitting F5.
I understand what you said about my program not being correct. So I opened up an older program that I know does work. But the screen message i get when i try to compile it is shown on the attachment.
I understand what you said about my program not being correct. So I opened up an older program that I know does work. But the screen message i get when i try to compile it is shown on the attachment.
AFAIK, you cannot just open a program and try to compile it in eclipse. You will have to create a project first. Then you can manually copy the existing source files into its project source folder.
Try the following:
File->New->Java Project
As project name enter: test
Click 'Finish'.
Right click on the newly created project and select:
New->Class
In field 'Name' enter: test
Click 'Finish'.
The new class window opens. Add a main function. E.g., This is how your class could look like:
Code:
public class test {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.