facebook

How to set ${user} variable

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #258992 Reply

    Richly
    Participant

    In Window > Preferences… > Java > Editor > Templates, the template named @author is defined to use the variable ${user}. On my system, this shows up as __USER__. I know that I could change the template to have my name instead of referencing the variable, but I’m sure that the “proper” way to do this is to define the variable appropriately. I know that I’ve done this successfully before on some IDE, but I cannot figure out how to do this for Eclipse.

    Where is this variable defined, and how can I change it?

    Thanks,
    – Richard

    #259024 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    You may just be missing a USER environment variable, try setting USER to something, o Windows:

    
    set USER="richly"
    echo %USER%
    

    Unix/Mac:

    
    export USER="richly"
    echo $USER
    
    #259139 Reply

    Richly
    Participant

    Thanks for the suggestion, but setting USER doesn’t help, nor does setting USERNAME or USER.NAME. For NetBeans, the USER is set within the IDE — Tools > Options > Advanced Options > Java Sources > Strings Table. I can’t figure out a similar setting within MyEclipse. Is there one?

    Thanks,
    – Richard

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to set ${user} variable

You must be logged in to post in the forum log in