• 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

Help with Eclipse. How did I manage to not install the JRE correctly?

 
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been learning java but have been using my work laptop with the blessings of my team lead and manager. Problem is now I'm in Java EE and my class is using MySQL and my work doesn't use it. I would prefer to use what my class is using.

So installed the same version of Eclipse and nearly the same version of Java on my personal laptop. I copied my workspace from my work computer and moved it to my personal computer and there are compile issues (red xs in my code where previously there were none) . I tried running project clean , closed out and came back in and that didn't fix the issues. I verified the build path was correct as well.

All of the compile issues point to pretty much the same thing. That there is an issue with my JRE?? I

For example I have this compile issue
Implicit super constructor Enum(String, int) is undefined for default constructor. Must define an explicit constructor

and

Multiple markers at this line
- The import java.util.Enumeration cannot be
resolved
- The import java.io.PrintWriter cannot be
resolved
- The import java.io.IOException cannot be
resolved



I'm not sure how I managed to muddle this all up.

Work is using jdk1.8.0_71_64 and my laptop has jdk1.8.0_71

I've compared everything I could think of that is related to java. I'm not using Maven yet for school for example so I didn't bother with that. Anything else I can check here or maybe on my computer? I'm running Windows 10 and tried to access the user environment but only seem to have system .


Window > Preference > Java
> Build Path
>> classpath variable (same)
>> User Libraries ( nothing in both )

> Debug ( same )
> Insalled JREs ( the jdk mentioned )
> jUnit (same)

JavaEE ( same stuff in all menus )
Java Persistence ( same in all menus )
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are assuming that the problem is because the JRE is not installed correctly. But whenever I've had that problem with Eclipse it's because Eclipse is configured incorrectly and it isn't pointing to an installed JDK (not JRE, we're talking about compiler errors).

So go into a project's build path and you should find one of the entries, probably the one at the bottom, says "JRE System Library [something]". If you click that entry it enables the "Edit..." button. Click that button and you'll get a box where hopefully you can poke around and see what doesn't look kosher.
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:You are assuming that the problem is because the JRE is not installed correctly. But whenever I've had that problem with Eclipse it's because Eclipse is configured incorrectly and it isn't pointing to an installed JDK (not JRE, we're talking about compiler errors).

So go into a project's build path and you should find one of the entries, probably the one at the bottom, says "JRE System Library [something]". If you click that entry it enables the "Edit..." button. Click that button and you'll get a box where hopefully you can poke around and see what doesn't look kosher.




I did that for two projects, did the project clean, closed out and came back into Eclipse and still there are issues. Any other area to look? I appreciate your suggestion anyways.

Here is a screen shot of my work computer



And here is a screen shot of my home computer.



I'm really thinking of just copying the Eclipse folder from work and putting it on my home .. I wonder if that would work.
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Last night I copied the java and the eclipse over from my work computer to my home computer. Didn't help.

I noticed today that even though I copied the entire workspace folder over to my home laptop. The Eclipse on my home laptop is missing the JAX-WS Web Services, Deployment Descriptor: and Java Resources folder is missing from each project.

Here is a screen shot of my Work Computer showing these folders.
Missing.png
[Thumbnail for Missing.png]
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a picture of my home computer with the folders missing. But if I create a new Dynamic web project folder the missing JAX-WS Web Services etc are there.
Capture.JPG
[Thumbnail for Capture.JPG]
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never mind I just figured out that it was the perspective I was in which hid the mentioned folders ( JAX-WS Web Services, Deployment Descriptor: and Java Resources folder ). I'm really not sure what I can do at this point.
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay I figured everything out I think. Thank You for the help. I hope this all works for now on lol.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not positive this will fix the problem, but this is what I would do.

* Uninstall all Javas
* Download the 64-bit version of Java here.
* Do a normal Java install
* In Eclipse, remove all the entries in Installed JREs
* Add the new JRE in Eclipse. Be sure it's the JDK JRE.
* Check that the Project points to the new Java JRE
* Refresh (F5)

Hope that helps.
 
Lisa Austin
Ranch Hand
Posts: 333
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:I'm not positive this will fix the problem, but this is what I would do.

* Uninstall all Javas
* Download the 64-bit version of Java here.
* Do a normal Java install
* In Eclipse, remove all the entries in Installed JREs
* Add the new JRE in Eclipse. Be sure it's the JDK JRE.
* Check that the Project points to the new Java JRE
* Refresh (F5)

Hope that helps.



Thanks Snortum. I finally got it to work. Hopefully I won't run into more issues.
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What did you do? "So that all generations can benefit from your struggle." ;)
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i copied the jdr folder to it
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic