Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to set system environment variable eclipse configuration file?(How to set system environment variable eclipse configuration file?)
How to set system environment variable eclipse configuration file? [message #1739899] Fri, 05 August 2016 14:08 Go to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Hi,

How to set system environment variable eclipse configuration file?

Can anyone help me?
Re: How to set system environment variable eclipse configuration file? [message #1739900 is a reply to message #1739899] Fri, 05 August 2016 14:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
what do you mean by eclipse configuration file?


eclipse.ini?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740017 is a reply to message #1739900] Mon, 08 August 2016 08:38 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Hi Christian,

I am working on linux so whenever I click on eclipse.exe I want set system variable to function my code properly. So can I set system variable using eclipse.ini or any other way?
Re: How to set system environment variable eclipse configuration file? [message #1740022 is a reply to message #1740017] Mon, 08 August 2016 10:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
-Dprop=value under vmargs not working?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740032 is a reply to message #1740022] Mon, 08 August 2016 12:43 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Yes, but not working
Re: How to set system environment variable eclipse configuration file? [message #1740033 is a reply to message #1740032] Mon, 08 August 2016 12:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
please give all what you do on ini an java side

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740034 is a reply to message #1740032] Mon, 08 August 2016 12:48 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
I am using

String _SMBASE = System.getenv("BASE");

but output is nothing
Re: How to set system environment variable eclipse configuration file? [message #1740035 is a reply to message #1740034] Mon, 08 August 2016 12:48 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.dsl.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-DBASE=C:\Prolifics\PantherJCO5.50.16
-Xms40m
-Xmx512m
Re: How to set system environment variable eclipse configuration file? [message #1740036 is a reply to message #1740035] Mon, 08 August 2016 12:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
did you try System.getProperty() instead

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740038 is a reply to message #1740036] Mon, 08 August 2016 13:16 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Yes I tried but still no luck. It was showing null
Re: How to set system environment variable eclipse configuration file? [message #1740040 is a reply to message #1740038] Mon, 08 August 2016 13:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
sry i have no idea. why not setting the env with default operating system means?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740042 is a reply to message #1740017] Mon, 08 August 2016 09:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Sachin Samaram <forums-noreply@xxxxxxxx> wrote:
> Hi Christian,
>
> I am working on linux so whenever I click on eclipse.exe I want set
> system variable to function my code properly. So can I set system
> variable using eclipse.ini or any other way?
>

The vmargs in the Ini should allow

-Dprop=value


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740043 is a reply to message #1740042] Mon, 08 August 2016 10:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Test

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740044 is a reply to message #1740022] Mon, 08 August 2016 11:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Test

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740045 is a reply to message #1740038] Mon, 08 August 2016 13:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Sachin Samaram <forums-noreply@xxxxxxxx> wrote:
> Yes I tried but still no luck. It was showing null
>

Sry then I have no idea. What about setting the env var with operating
system means


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740050 is a reply to message #1740040] Mon, 08 August 2016 14:16 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
But for linux we can use eclipse through bash by setting path on terminal every time it works but it is not reading system variables.
Re: How to set system environment variable eclipse configuration file? [message #1740051 is a reply to message #1740050] Mon, 08 August 2016 14:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Setting via export or via /etc/environment

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740052 is a reply to message #1740051] Mon, 08 August 2016 14:29 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
I tried, It is giving null.
Re: How to set system environment variable eclipse configuration file? [message #1740053 is a reply to message #1740052] Mon, 08 August 2016 14:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Both variants?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740055 is a reply to message #1740053] Mon, 08 August 2016 14:55 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
No I didn't try /etc/environment. But I did with export but if I close the terminal and open eclipse using new terminal I am getting nothing
Re: How to set system environment variable eclipse configuration file? [message #1740056 is a reply to message #1740053] Mon, 08 August 2016 15:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
btw

(1) example code

String message = System.getenv("myprop");
		getLog().log(new Status(IStatus.ERROR, "demx", message ));
	


(a) terminal
cd .... // eclipse folder
export myprop=42
./eclipse

works

(b) etc/environment

myprop=23

restart

start eclipse cia terminal or double click
=> works


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740057 is a reply to message #1740056] Mon, 08 August 2016 15:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
for export:

did you add the export to .bash_profile or .bashrc or at one of the 100 other places linux distos expect export statements


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: How to set system environment variable eclipse configuration file? [message #1740118 is a reply to message #1740057] Tue, 09 August 2016 12:32 Go to previous message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Hi Christian,

Thanks for your time. I added export to .bash_profile it is working
Previous Topic:Override XtextBuilder
Next Topic:rootPath, alternative folder layouts and maven build
Goto Forum:
  


Current Time: Sat Nov 09 01:36:52 GMT 2024

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

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

Back to the top