Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Multiple user (classroom) installs(How to create a standard configuration for classroom use (for noobs).)
Multiple user (classroom) installs [message #1740900] Fri, 19 August 2016 15:55 Go to next message
Erich Hammer is currently offline Erich HammerFriend
Messages: 5
Registered: August 2016
Junior Member
Disclaimer: I am not an Eclipse user, nor have any developer/IDE experience.

I am trying to set up a (Win7x64) classroom for students and create a consistent Eclipse experience for all users (who are NOT administrators), and I am having a devil of a time figuring out how.

At first, I couldn't even get Eclipse to start for non-admin (or maybe even admins other than the setup account) users. I eventually tried a random bit of info I found somewhere and added:

osgi.configuration.area=@user.home/AppData/Roaming/Eclipse/configuration
osgi.sharedConfiguration.area=INSTALL_DIR/configuration
osgi.configuration.cascaded=true

to the config.ini file. That seems to have made it possible for all users to start Eclipse. The problem is I need them to all have a pre-installed plugin (Pydev.org).

If I install the plugin through the Eclipse GUI, it is only in the installing user's profile and no other users get it. [edit] Also, non-admin users don't appear to be able to install plugins thought the GUI -- clicking next in the "Install" window makes it blink, but doesn't advance. [/edit]

If I drop the plug-in files into the eclipse\dropins folder, I have problems getting it to be available in Eclipse. I have found that if I use the -initialize switch and run as administrator (elevate), it will be available, but I can't find any way for non-admins to utilize the plugin. I don't understand why Eclipse won't recognize the plugin without running elevated. All the file/folders have read/execute rights for all users. The only change I can find in the Eclipse install folder that occurs when the -initialize switch is run elevated is a date change on the "eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry" folder. (Just a folder date change, no file changes -- weird.)

I have a fair amount of experience deploying software and tweaking systems so software will work for non-admins, but I'm not sure how to get this working. I can't give all users write access to the eclipse install in case they modify things that will affect other users. Most of the information I can find appears to provide instructions for sharing things among multiple Eclipse "profiles" (for lack of a better word) to allow the same user to have the ability to run different configurations with some things shared among the profiles. I need things shared like you share the road, not shared like you share a bath. Smile

Based on this , I thought scenario #3 was exactly what I wanted and it would all just work, but that has been anything but the case. I'm guessing that the information is very generic, and I need to do some Windows-specific thing to get this working.

Is there anyone here who can offer, *simple* instructions for configuring a standard/baseline, multi-user Eclipse on Windows?

Thank you.

[Updated on: Fri, 19 August 2016 19:31]

Report message to a moderator

Re: Multiple user (classroom) installs [message #1740939 is a reply to message #1740900] Sat, 20 August 2016 09:44 Go to previous messageGo to next message
L. D. James is currently offline L. D. JamesFriend
Messages: 50
Registered: March 2011
Member
Have a profile (a default profile) for the install that that will perform all the installs and and plugin updates. This profile user will call Eclipse without a configuration parameter and will install all the plugins in the default eclipse folder space.

For the other users have them call Eclipse with a parameter. You can do this by creating a batch file for calling eclipse.

Example Eclipse batch file for per user operation:

@echo off

set ECLIPSEDIR="%HOMEPATH%\eclipse"

if not exist %ECLIPSEDIR% goto createdir
goto runeclipse

:createdir
echo "Creating eclipse directory"
mkdir %ECLIPSEDIR%

:runeclipse
eclipse -configuration %ECLIPSEDIR%
goto end


:end
exit


Now this instance of Eclipse will use all the plugins from the default installation without trying to make any changes to the default installation. Also, this install can inevitably be able to install plugins. However, those plugins will only be visible to this use. The one running eclipse without the configuration argument will install system wide plugins.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames

[Updated on: Sat, 20 August 2016 09:45]

Report message to a moderator

Re: Multiple user (classroom) installs [message #1740963 is a reply to message #1740939] Sun, 21 August 2016 18:05 Go to previous messageGo to next message
Erich Hammer is currently offline Erich HammerFriend
Messages: 5
Registered: August 2016
Junior Member
@L. James: Thank you very much for the reply.

Your suggestion does work, however, seeing as users are unpredictable and may start eclipse any number of ways (very possibly NOT via whatever .bat file is created for them), I was hoping to turn your redirection back on the setup/master user. IOW, I would like to make eclipse default to the osgi.configuration.area you suggested, and have the setup/master user explicitly specify their configuration via the -configuration switch or a .bat file as they are more likely to understand and follow a "special procedure".

Are you willing to assist with that?

I first had the setup user drop in the plugins and run eclipse as admin for the first time (technically they ran it with the -initialize switch).

Then, I put:
osgi.configuration.area.default=$appdata$/eclipse

in the config.ini file. The intent was to have the setup/master account start eclipse with:
eclipse.exe -configuration %EclipseInstallDir%\configuration

but I can't even get the unprivileged users started. They keep getting an immediate pop-up window:
An error has occurred. See the log file null.

Assuming the log file is the newly created on in the \eclipse\configuration directory, it has an error about access denied reading the configuration ".fileTableLock".

Do you know how to make this work?

Thanks!
Re: Multiple user (classroom) installs [message #1741218 is a reply to message #1740963] Tue, 23 August 2016 19:05 Go to previous messageGo to next message
L. D. James is currently offline L. D. JamesFriend
Messages: 50
Registered: March 2011
Member
I'm glad to help. You don't have to be concerned with how the users start the application. Businesses give their clients the icon to use, which happens to be a batch file or some other special configuration call to any variety of applications, which includes Accounting programs, databases, etc.

If a person tries to work outside the provided environment, i just wouldn't work.

For my recommendation to work you would have to have the administration account use Eclipse at it's default. This way when an different user (such as unprivileged user) calls the program via the batch file, they will automatically have all the default settings from the administration's session. They won't be able to make any changes to the administration configuration. Their environment would be saved in their user space. All the installed packages from the administrator will be usable by them.

If you use the -configuration option to place the files somewhere else for the administrator, the other users won't have access unless then used the same -configuration path. If they used the same -configuration path, they won't be able to save their sessions and they would get various errors.

I might be missing something, but I don't understand the problem that you are describing with multiple-user configuration described above.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
Re: Multiple user (classroom) installs [message #1741402 is a reply to message #1741218] Wed, 24 August 2016 18:53 Go to previous messageGo to next message
Erich Hammer is currently offline Erich HammerFriend
Messages: 5
Registered: August 2016
Junior Member
@L.James: I appreciate your comments. We can live with the bat file.

I have a fair amount of experience with multi-user setups, and we tried a similar, bat-file-solution with a program (POV-Ray). What we found was users didn't usually start the program themselves, it was called by other software. When the program was started though non-BATfile means, it was broken and required some fiddling to fix it.

I didn't want the same thing to happen with Eclipse.

What I was attempting to do was have the Admin environment in exactly the same place it normally would be (a default location), but only because the admin would use the -configuration switch pointing at that "normal" default location. Unprivileged users ("students") would end up with the same functionality as with your suggested setup because the -configuration location would be defined in the osgi.configuration.area.default setting. (Thus they wouldn't need the bat file.) As I understand it the osgi.configuration.area.default setting is overridden by the -configuration switch (which is itself equivalent to the osgi.configuration.area setting).

With your suggested setup, when unprivileged users (let's call them students) start Eclipse, does it read the environment left by the admin account _every time_ and then layer their own environment on top, or only on their very first start? IOW, if the admin user comes back and updates or adds a new plugin, will students pick that up the next time the start Eclipse, even if they have run Eclipse on that machine previously?

Out of curiosity because I couldn't find it anywhere in the documentation, what is the priority of settings between the cmdline switches, settings in eclipse.ini and settings in config.ini? Which one "wins" if they conflict?

Thanks again.
Re: Multiple user (classroom) installs [message #1780905 is a reply to message #1740939] Mon, 29 January 2018 20:30 Go to previous messageGo to next message
O Nelson is currently offline O NelsonFriend
Messages: 2
Registered: January 2018
Junior Member

Can someone help me with the issue I having below with users being able to access eclipse from a VM with what is suppose to be a shared eclipse env..

PS C:\Users\....> cd .\eclipse\
PS C:\Users\....\eclipse> dir
PS C:\Users\....\eclipse> cd
PS C:\Users\....\eclipse> set ECLIPSEDIR="%HOMEPATH%\eclipse"
PS C:\Users\....\eclipse> eclipse -configuration %ECLIPSEDIR%
eclipse : The term 'eclipse' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ eclipse -configuration %ECLIPSEDIR%
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (eclipse:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\....\eclipse>
Re: Multiple user (classroom) installs [message #1780907 is a reply to message #1780905] Mon, 29 January 2018 20:36 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3159
Registered: July 2009
Senior Member

If this is inside of PowerShell, I'd first suggest not using PowerShell and using the traditional Command Prompt (cmd.exe).

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Multiple user (classroom) installs [message #1780915 is a reply to message #1780907] Mon, 29 January 2018 22:50 Go to previous message
O Nelson is currently offline O NelsonFriend
Messages: 2
Registered: January 2018
Junior Member
Since adding the following lines to the config.ini file, users are now able to access Eclipse via the desktop shortcut. However, none of the configurations are being shared with I look at the Project Explorer and Task Explorer. Can someone recommend what additional changes are needed to accomplish a fully functional shared Eclipse environment?

osgi.configuration.area=@user.home/AppData/Roaming/Eclipse/configuration
osgi.sharedConfiguration.area=C:/JavaWork/Eclipse Neon 3/configuration
osgi.sharedConfiguration.area.readOnly=true
osgi.configuration.cascaded=true

[Updated on: Wed, 31 January 2018 01:47]

Report message to a moderator

Previous Topic:Deploy a Webapplication using jetty/maven/
Next Topic:keep the parameter value selected
Goto Forum:
  


Current Time: Sat May 26 04:36:35 GMT 2018

Powered by FUDForum. Page generated in 0.04067 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top