How to locate environment path in codename one - codenameone

For the following commands to work, make sure you have "ant", "mvn", and "git" in your environment PATH.
pls I need to add the following to the environment part.
$ git clone https://github.com/shannah/cn1-iap-demo-server
$ cd cn1-iap-demo-server
$ ant install-deps.
I dont know how to locate environment path on my system. pls help

That's Unix/Linux and unrelated to Codename One. One would setup an environment path as such:
export PATH=/path/to/ant/binary:$PATH

Related

Where does GO look for google-cloud-sdk ? What should GOPATH be?

I'm having trouble setting up Go App engine on osX. Should the google-cloud-sdk path be in GOROOT or GOPATH?
I put the google-cloud-sdk in /usr/local
It looks like there is source code in: goroot/
/usr/local/google-cloud-sdk/platform/google_appengine/goroot/
go env
GOPATH="/usr/local/google-cloud-sdk/platform/google_appengine/goroot"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
$ go get
package google.golang.org/appengine: cannot download, /usr/local/google-cloud-sdk/platform/google_appengine/goroot is a GOROOT, not a GOPATH. For more details see: 'go help gopath'
package google.golang.org/appengine/datastore: cannot download, /usr/local/google-cloud-sdk/platform/google_appengine/goroot is a GOROOT, not a GOPATH. For more details see: 'go help gopath'
When I attempted to change the PATH to include /src:
GOPATH="/usr/local/google-cloud-sdk/platform/google_appengine/goroot/src"
$ go get
package google.golang.org/appengine: mkdir /usr/local/google-cloud-sdk/platform/google_appengine/goroot/src/src: permission denied
package google.golang.org/appengine/datastore: cannot find package "google.golang.org/appengine/datastore" in any of:
/usr/local/go/src/google.golang.org/appengine/datastore (from $GOROOT)
/usr/local/google-cloud-sdk/platform/google_appengine/goroot/src/src/google.golang.org/appengine/datastore (from $GOPATH)
I appended the path to google-cloud-sdk to GOROOT:
export GOROOT="/usr/local/go/:/usr/local/google-cloud-sdk/platform/google_appengine/goroot"
GO doesn't seem to like multiple paths in GOROOT:
$ go get
go: cannot find GOROOT directory: /usr/local/go/:/usr/local/google-cloud-sdk/platform/google_appengine/goroot
I did run the ./install.sh script after I copied the source to /usr/local
The additional PATH's added did not fix the errors I was having.
I saw this answer: Test cases for go and appengine
But it's from 5 years ago and it seems clunky/hacky. It would seem in 5 years there would be a more elegant solution that copying individual directories and creating symlinks.
EDIT **********************
mv /usr/local/google-cloud-sdk/ ~/go/ then deleted GOPATH and GOROOT from .bash_profile
I then ran ./install.sh
I attempted to run 'go get':
$ go get
go install: no install location for directory /Users/Bryan/work/gocode/skincarereview outside GOPATH
Since that failed, I added the path to the working directory of code AND appended the path to google-cloud-sdk to PATH:
export GOPATH = "/Users/Bryan/work/gocode/skincarereview"
export PATH=$HOME/google-cloud-sdk:$PATH
go get get failed with the same message:
$ go get
go install: no install location for directory /Users/Bryan/work/gocode/skincarereview outside GOPATH
For more details see: 'go help gopath'
It goes in neither $GOROOT or $GOPATH. Just unpack it to your $HOME directory and run the installer. If necessary, add it to your $PATH by adding this line to your .bash_profile.
export PATH=$HOME/google-cloud-sdk:$PATH
Make sure you grab the golang SDK as well with gcloud components install app-engine-go https://cloud.google.com/appengine/docs/standard/go/download
DO NOT change your path to include the src dir in google-cloud-sdk/platform/google_appengine/goroot/src. That will break things. You leave your $GOPATH to be your normal installation. Using the App Engine SDK for Go automatically uses the sources in that dir without any manipulation.
Also, you should NEVER MANUALLY change $GOROOT unless you plan on compiling a new Go version from source (as in a new version of the language). It will automatically set the proper $GOROOT for you. https://dave.cheney.net/2013/06/14/you-dont-need-to-set-goroot-really
If your install is messed up beyond reason (happened to me once), just remove the cloud SDK and any references to it in your $PATH. Also completely uninstall the regular Go installation. Then start from scratch. Install Go, unpack google-cloud-sdk, run installer (add to $PATH if needed), gcloud components install app-engine-go. Voila.
When developing for App Engine, your go sources go into your REGULAR $GOPATH. They DO NOT go in google-cloud-sdk/... anywhere. To run the dev_appserver locally, run dev_appserver.py [path-to-source] where the given path contains your code and the app.yaml. I usually cd in to my project path (e.g. cd $HOME/go/src/myproject) and run with dev_appserver.py ./. https://cloud.google.com/appengine/docs/standard/go/tools/using-local-server
Deployment is covered here. https://cloud.google.com/appengine/docs/standard/go/tools/uploadinganapp
EDIT: Folder structure.
$GOPATH = $HOME/go
Location for google-cloud-sdk folder

How to use CHE_EXTRA_VOLUME_MOUNT?

Use Case
The code that I wish to edit in che is downloaded from a private SVN repository and uses a private nexus repository for maven dependencies. Due to this I need to use my custom settings.xml from "C:\Users\.m2".
It would be good to use the local maven repository too, hence the approach of creating a custom dockerfile that adds settings.xml was not used.
Setup
I created a user environment variable "CHE_EXTRA_VOLUME_MOUNT" with the value "~/.m2:/home/user/.m2".
I can see the env variable from "Docker Quickstart Terminal".
Environment
OS: Windows 7
Docker version: 1.12.6, build 78d1802
Docker image: eclipse/che-server:5.0.0
Problem
Can't see the mount path "/home/user/.m2" in any workspace.
Can someone please help me with this use case?
I see a couple issues. First, in the che.env file, you should be modifying CHE_WORKSPACE_VOLUME. The CHE_EXTRA_VOLUME_MOUNT is an older name that applied to the 4.x releases.
Second, the mount path you are using. The value that you provided on the mount path is likely not going to work well if it's on Windows 7. This is because you are using Boot2Docker on that system, and so VirtualBox limits files that can be mounted to those that exist as a subfolder of %userprofile%.
So:
1. First make sure that c:\Users\.m2 is part of this subfolder, and then:
2. Use the absolute path to your .m2 folder in the mount in the che.env:
CHE_WORKSPACE_VOLUME=/C/Users/<user_name>/.m2:/home/user/.m2
This funky path naming for volume mounts is a limitation in how the Docker client can understand volume mounts if you are using it on the batch shell.
A matching answer is posted on Che's support site - https://github.com/eclipse/che/issues/3888
Looks like it is a bug in eclipse che. You can create an issue at https://github.com/eclipse/che/issues

Port: command not found, even though /.bash_profile is 'correct'

I've recently installed Macports, to eventually, install the INTL extension on my MAMP. I'm currently trying to update the Macports -
sudo port -v selfupdate
which returns the error -
sudo: port: command not found
I've read that it could be the paths in the .bash_profile. These are my paths:
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
From here, I'm not really sure on how to diagnose further. If you require any further files, please let me know.
If you haven't started a new shell or otherwise sourced your .bash_profile, the change to PATH isn't present in the value of PATH used by the current shell.
You don't use the .bash_profile file. Use the .profile file was created from macport. This will work.
Cheers,
Marco

vim cannot connect to cscope database

I have opensuse 11.4 installed. Vim is version 7. Now I normally use it to browse the linux kernel source. So I generated the cscope database inside a directory within my home folder i.e. /home/aijazbaig1/cscope_DB/ and I got 3 files viz. cscope.out, cscope.po.out and cscope.in.out besides the cscope.files file which contains a list of all the relevant files which I want to search.
Additionally I have added the following to my .bashrc:
CSCOPE_DB=/home/aijazbaig1/cscope_DB/cscope.out
export CSCOPE_DB
But when I do a :cscope show from within vim it says there are no connections. Can anyone please let me know what is going wrong.
Keen to hear from you,
This is mentioned in the comments above, but I want to make sure it's preserved in an answer.
The issue that came up for me was that vim didn't know where to look for the cscope database. When I added
cs add $CSCOPE_DB
to my .vimrc. Everything came out fine.
I figure since I've made the visit, I would try responding.
I was getting this error when searching using ctrl-space s (or any search for that matter):
E567: no cscope connections
I finally found the full solution at http://cscope.sourceforge.net/cscope_vim_tutorial.html, Step 11.
The idea is that you create a list of source files to be included in the view of cscope, generate the cscope.out in the same location, and update the export path accordingly:
find /my/project/dir -name '*.c' -o -name '*.h' > /foo/cscope.files
cscope -R -b (this may take a while depending on the size of your source)
export CSCOPE_DB=/foo/cscope.out (put this in your .bashrc/.zshrc/other-starting-script if you don't want to repeat this every time you log into the terminal)
You need to add a "cscope connection", like this in vim:
:cscope add $PATH_TO_CSCOPE.out
See :help cs for more examples.
Here's how I explore linux kernel source using cscope:
I use vim as my editor.
While standing inside the kernel source root directory, run cscope in interactive mode while recursively going through subdirectories during search for source files:
cscope -R
When run for the first time, it will generate the database file with the name: cscope.out inside the current directory. Any subsequent runs will use the already generated database.
Search for anything or any file and open it.
Set cscope tags in vim to make the :tag and CTRL-] commands search through cscope first and then ctags' tags:
:set cscopetag
Set cscope database inside current VIM session:
:cs add cscope.out
Now you can use CTRL-] and CTRL-t as you would do in ctags to navigate around! :)
I have the same issue on my PC. For now, to solve the issue:
On terminal execute: which is cscope
Open .vimrc file to edit: set csprg=/usr/bin/cscope
I ran into a similar problem with no cscope connections on ubuntu 18.04, then I discovered my .vimrc file does not load the CSCOPE_DB variable. Looked a little around and found a solution.
You can just copy this directly in to your .vimrc file.
Part of the code loads your cscope file from your directory. The keybinds are just a nice bonus.
Hope this helps.

how to change CATALINA_BASE in /var/lib/tomcat6 in ubuntu 10.4

i install tomcat6 on ubuntu 10.4 but i want to save my projects in different directory than this CATALINA_BASE in /var/lib/tomcat6 any one can help me in this
maybe this can help you:
http://www.udel.edu/CIS/474/pconrad/06S/topics/tomcat/generalInstallAdvice/sharedInstall.txt
try to change the env variables like
setenv CATALINA_BASE /home/path/to/dir
I didn't try this myself, so tell me if it doesn't work
I have a different version of Tomcat, but I was able to fix this given a tip found in catalina.sh:
Do not set the variables in this script. Instead put them into a script setenv.sh in $CATALINA_BASE/bin to keep your customizations separate.

Resources