Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 12 of 12

Thread: Problem with Eclipse

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with Eclipse

    Hi all,

    I'm very new to everything, and I apologise if I am posting in the incorrect sub-forum.

    I'm running Eclipse on Windows 7 - 64 bit and on Windows 8 - 64 bit. On my Windows 8 machine everything works perfectly fine. But on Windows 7 whenever I try to run anything this box pops up (attached as a thumbnail).

    Thanks
    Attached Images Attached Images


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    Moved.

    I suspect your Java install between the two machines is not consistent. Maybe it's 32-bit on one, 64-bit on another. On the machine that's having trouble, try running eclipse from the command line and post the errors.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with Eclipse

    Quote Originally Posted by GregBrannon View Post
    try running eclipse from the command line and post the errors.
    Hi,
    I'm not quite sure how to do this. I looked around online and I still don't really understand. Is there anyway you could provide me with a link or quick explanation?

    Thanks

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    I see you already said you had 64-bit on both.

    I don't use Windows much, so forgive my rustiness. To get to a command line on the Win 7 computer, select the Win menu/Start button, search cmd, and select cmd when it appears. You'll then see a command window with a prompt at the current directory location. try typing 'eclipse' followed by a return and see what happens. Post the results here (copy/paste from command window). How you copy/paste may be different, but in my command window, I can right click in the window, choose 'select all', then right click on the top bar of the window, select 'Edit', then 'Copy'. Yours may be different.

  5. #5
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with Eclipse

    When I navigate to the folder with eclipse in it, and then type eclipse following by a return. The program opens up and runs fine. There are not errors.

    But when I try to 'run' the program I wrote by pressing 'Run (last class)' or 'Run (select class)' and selecting the one I want to run, it opens a new window that I attached to my first post.

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    Ahh. I thought the problem was with running Eclipse.

    I don't see anything useful in that graphic you posted, but I could be missing the fine print. Is there something readable in that graphic? What's the frame's title? It looks like something is there, but I can't read it.

    Does right clicking on the program you'd like to run in the project explorer, selecting 'run', then "As an application," have the same results?

    Does any program in any project on the Win 7 computer run correctly? How about a brand new one in either the existing project or a new project, like a simple "HelloWorld.java" program?

    Is the workspace on the Win 7 machine a new one for that machine, or did you export it from the other? Either way, these type of ambiguous, nonspecific errors are sometimes cleared by closing/reopening the existing workspace or creating a new workspace and moving/copying existing code into that new workspace, etc.

  7. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with Eclipse

    The text in the top is just the name of the file. The toolbar only shows a 'File' button, when pressed provides a menu that says either Print or Exit.

    -Yes running the program by selecting run has the same results.

    -All the other programs I have tried to run have yielded the same results.

    -The workspace was created on this machine, I copied the Eclipse folder from the other PC, but eclipse asked me to create a new workspace.

    -I have tried closing/reopening the work space, and creating a new work space but to no avail.

    Thank you for all of your help so far

  8. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    Close this workspace, create a new one, create a project in that workspace, create a HelloWorld.java console program in the default package, run it, and let us know if you get the same results.

  9. #9
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with Eclipse

    I've done all that. When i run it, it opens up the console within eclipse and it works. However it does provide me with a warning that "Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment"

    I tried running my other java program again and it still opens up a java window that is blank.

  10. #10
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    That's a hint that your environment, either Eclipse or OS, is not set up right. We can't know for sure if fixing it will fix your errors in the other workspace, but it's a place to investigate and correct.

    Why isn't there a 1.6 or better JRE installed or designated as a build resource in the new workspace? I don't have Eclipse on this machine so can't talk you through the settings, but get to the overall Eclipse settings and see what Java resources have been specified, pointed to, and then verify that they exist on the computer. Fix any of those if they are incorrect and/or install the appropriate resources on your computer.

    Once you get this workspace fixed, you may gain the insight and experience to fix the other one, but I can't be sure.

  11. #11
    Junior Member
    Join Date
    Jan 2014
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with Eclipse

    Hi there, sorry about the delay I've been messing around and trying some stuff.

    I had java (jre7) installed on the computer which eclipse wasn't working, but jre1.6.0 installed on the one that was working. So I figured out how to install 1.6 and manually add that to eclipse and it worked.

    Thanks for all of your help

  12. #12
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Problem with Eclipse

    Glad you figured it out.

Similar Threads

  1. eclipse configuration problem
    By sighb0rg in forum Other Programming Languages
    Replies: 2
    Last Post: August 11th, 2013, 05:57 PM
  2. problem..with eclipse 3.1
    By mint17 in forum Java IDEs
    Replies: 4
    Last Post: August 31st, 2012, 07:55 AM
  3. Replies: 3
    Last Post: January 5th, 2012, 01:44 AM
  4. Eclipse Problem
    By The_Mexican in forum Java IDEs
    Replies: 2
    Last Post: December 8th, 2010, 09:02 PM
  5. Problem in import com. in eclipse
    By java_cs in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 11th, 2009, 07:26 AM