• 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

Running Eclipse on a Mac

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm writing this on behalf of a colleague who is using Eclipse for the first time and is having some problems. I sent here a war file of a JSF 2.2 application that I created with Eclipse on my computer, which uses Windows. She has a Mac, and unfortunately I am not at all familiar with Mac computers. Her message is as follows:

I am compiling with Eclipse a web application which uses JDK7 on a Mac OS 10.9 MacBookPro.
Everything works fine, but Eclipse validation fails with this strange message:

I've read on the web that I should change the Java preferences. but in Preference System/Java/ I only find onglets for General,Upgrade,Java,Security,
and Advance and not Web like on PC. So I do not know how to change the Java preferences not to complain about this type of variables.

Ignoring those errors, I can try to run my application, but I run into another problem:
"The server does not support version 3.1 of the J2EE Web module specification."

Here too I found on the web some indications how to go around this which do not work:
right click on my project name/properties/ and change the version of the Dynamic Web Module to a lower version.
Here I get an error message: "Cannot change version of project facet Dynamic Web Module to 2.5."
And it displays the same error message no matter which version I choses other than the latest 3.1 version.

So alternatively I have Run New_Configuration instead. But then here I get this error:

Exception occurred executing command line.
Cannot run program "/Users/fallard/Documents/workspace/simulator-jsf22-25/simulator-jsf22-25/.project" (in directory "/Users/fallard/Documents/workspace/simulator-jsf22-25/simulator-jsf22-25/build"): error=13, Permission denied

And it did not help to change the permissions of the directory tree.

So I am stucked. Some help?

She attached an image file containing error messages from Eclipse which just goes "String method(String), String method(String), String method(String)....." and so on for many lines. These errors seem to be produced in the xhtml file when an action is invoked with an argument, such as <h:commandButton id="continue" value="Continue" action="#{login.nextPage('option')}" /> This work perfectly correctly on my system.

Does anybody have any ideas?
 
Marshal
Posts: 4491
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you both running the same type and version of the web server?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see anything in this question that makes it JSF-related.

It sounds like the 2 systems are running 2 different versions (and perhaps brands) of web application server, but web application servers are not built into Eclipse. You have to install one and configure Eclipse to use it.

I'm moving this question to the IDE forum.
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My suggestion would be to send her the source files only, and let her import them in a new project that she creates. I also suggest that she does this in a new eclipse workspace. Finally, make sure that she's using the same server type and version as you are.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My checklist would be:


A great tool, especially if one is doing development on the Mac, is a package manager. After evaluating the ones available I chose to use HomeBrew. I use HomeBrew to install my JDK versions, tomcat, ant, etc.

Use the web links or HomeBrew to get all of this installed and configure Eclipse to globally use that JDK for your development.

On the Mac, she would go to Preferences -> Java -> Installed JREs

I have installed the following:
1.6.0_65 installed as a "MacOS X VM" with a location of /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.7.0_67 installed as a "MacOS X VM" with a location of /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
1.8.0_20 installed as a "MacOS X VM" with a location of /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home

I have 1.7 selected as my default.

Another best practice would be to use Maven for your build. That way either of you can pull down updates from the repository and the Maven pom files can adjust the Eclipse build to pull in the proper libraries and other configuration items of your application.

You mention the J2EE errors. But then talk about "Dynamic Web Module" which is way different than the J2EE error.

JSF is a technology you are using in your web application but doesn't seem relevant to the issues you are asking about.

I hope that helps get you both moving forward.
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Brian!

I cannot speak for the Mac (we've got a forum for that), but the current Eclipse general release is Luna and the one following Juno was Kepler.
 
Brian Bezanson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the correction Tim. The links I sent -- and what I meant was Luna.

Not sure how I had Juno stuck on my brain
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I cannot speak for the Mac (we've got a forum for that), but the current Eclipse general release is Luna and the one following Juno was Kepler.


I can. Eclipse Luna works just fine on a Mac. Every June (or July), I blog about my impressions of the new Eclipse. Here's the one for Luna
 
reply
    Bookmark Topic Watch Topic
  • New Topic