cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
avdhesh
Level 5

How to get license from environment variable (LM_LICENSE_FILE) in Basic client.java and also CapabilityRequest.java

Hi,

Is there is any way to get the "LM_LICENSE_FILE"  from the environment variable from the 'CapabilyRequest.java' or we must write a code for geting environment variable in java.

Thanks

0 Kudos
(5) Replies
ejohnson1
Flexera Alumni

Hi @avdhesh,

 

LM_LICENSE_FILE is an environment variable for the FlexNet Publisher (formerly FlexLM) licensing technology whilst basic_client.java and capabilityrequest.java are  primer examples for the FlexNet Embedded licensing technology. 

Are you looking to implement both technologies?  Both technologies can co-exist in the same implementation / application, yet each technology operates autonomously from the other.

0 Kudos

yes, we are looking for both technology server based and file based , In 'CapabilityRequest.java' we pass the below argument:
args = new String[]{"-server", "http://localhost:8080/request"};

So i just want to know is there any way to get Environment variable using flexlm API.
0 Kudos

Hi @avdhesh,

Thank you for the follow-up information. 

As it's a system environment variable, it will need to be retrieved programmatically -  e.g. 

System.getenv("LM_LICENSE_FILE");
0 Kudos

Yes , I know the same but i was looking into your api for my convenience .
If there is no such a way then i have to do at my side.
0 Kudos

Hi @avdhesh , no native Flex/Flx/Flc/ API for retrieving any of the FlexLM / FNP environment variables, so must be accomplished programmatically using the IDE built-in API framework.

0 Kudos