Questions tagged [path-variables]

PATH is an environment variable on various operating systems which specifies a list of directories where executable programs are located.

On POSIX and Unix-like operating systems, the PATH variable is specified as a list of one or more directory names separated by colon : characters.

On DOS, OS/2, and Windows operating systems, the PATH variable is specified as a list of one or more directory names separated by semicolon ; characters.

273 questions
2781
votes
26 answers

Is there an equivalent of 'which' on the Windows command line?

As I sometimes have path problems, where one of my own cmd scripts is hidden (shadowed) by another program (earlier on the path), I would like to be able to find the full path to a program on the Windows command line, given just its name. Is there…
namin
  • 37,139
  • 8
  • 58
  • 74
288
votes
25 answers

How to set JAVA_HOME in Linux for all users

I am new to Linux system and there seem to be too many Java folders. java -version gives me: java version "1.7.0_55" OpenJDK Runtime Environment (rhel-2.4.7.1.el6_5-x86_64 u55-b13) OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode) When I am…
Bosco
  • 3,835
  • 6
  • 25
  • 33
99
votes
10 answers

How to remove entry from $PATH on mac

I was trying to install Sencha Touch SDK tools 2.0.0 but could not run it properly. It created an entry in the $PATH variable. Later I deleted the sencha sdk tools folder but didn't realize that the path variable is still there. When i did echo…
Tushar Koul
  • 2,830
  • 3
  • 31
  • 62
82
votes
5 answers

Passing an Array or List to @Pathvariable - Spring/Java

I am doing a simple 'get' in JBoss/Spring. I want the client to pass me an array of integers in the url. How do I set that up on the server? And show should the client send the message? This is what I have right now.…
Djokovic
  • 971
  • 2
  • 8
  • 13
43
votes
4 answers

'NODE_OPTIONS' is not recognized as an internal or external command

I'm on a windows 10 machine trying to run a build script from the git bash terminal. On my terminal node is recognized just fine, for example I get the version when I run node --version. But running the build script fails with the following…
user967451
42
votes
7 answers

Spring MVC: how to indicate whether a path variable is required or not?

I am doing a Spring web. For a controller method, I am able to use RequestParam to indicate whether a parameter it is required or not. For example: @RequestMapping({"customer"}) public String surveys(HttpServletRequest request,…
curious1
  • 14,155
  • 37
  • 130
  • 231
38
votes
4 answers

Spring mvc 3 : How to get path variable in an interceptor?

In Spring MVC controller, I can get path variable using @PathVariable to get the value of a variable defined in @RequestMapping. How can I get the value of the variable in an interceptor? Thank you very much!
Leon
  • 699
  • 2
  • 7
  • 10
35
votes
6 answers

Can @PathVariable return null if it's not found?

Is it possible to make the @PathVariable to return null if the path variable is not in the url? Otherwise I need to make two handlers. One for /simple and another for /simple/{game}, but both do the same just if there is no game defined i pick first…
Rihards
  • 10,241
  • 14
  • 58
  • 78
35
votes
11 answers

Error in setting JAVA_HOME

I have recently downloaded Maven and followed the instructions given on this this page. I already have ant installed on my machine. Now, if I want to verify that Maven is installed perfectly or not it is giving me error that JAVA_HOME is not set…
paul
  • 4,333
  • 16
  • 71
  • 144
33
votes
3 answers

Bind Path variables to a custom model object in spring

I have a class that models my request, something like class Venue { private String city; private String place; // Respective getters and setters. } And I want to support a RESTful URL to get information about a venue. So I have…
Senthil Babu
  • 1,243
  • 2
  • 11
  • 20
32
votes
12 answers

How do I manipulate $PATH elements in shell scripts?

Is there a idiomatic way of removing elements from PATH-like shell variables? That is I want to take PATH=/home/joe/bin:/usr/local/bin:/usr/bin:/bin:/path/to/app/bin:. and remove or replace the /path/to/app/bin without clobbering the rest of the…
dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
30
votes
11 answers

Why is Tensorflow not recognizing my GPU after conda install?

I am new to deep learning and I have been trying to install tensorflow-gpu version in my pc in vain for the last 2 days. I avoided installing CUDA and cuDNN drivers since several forums online don't recommend it due to numerous compatibility issues.…
Sarosij Bose
  • 403
  • 1
  • 5
  • 6
30
votes
1 answer

Multiple @PathVariable in Spring MVC

Couldn't find an answer to this unfortunately so hoping someone can help. In Spring MVC 3.1.0 here is my method: @RequestMapping(value = "/{app}/conf/{fnm}", method=RequestMethod.GET) public ResponseEntity getConf(@PathVariable String app,…
user1389920
  • 403
  • 1
  • 6
  • 12
28
votes
1 answer

Can Spring MVC's REST framework accept query strings rather than PathVariables?

In all the tutorials and articles I have read regarding Spring 3's RESTful additions to Spring MVC, I have only ever seen one way for the use to pass in query data, via a @PathVariable, like so: @RequestMapping(value="/shops/{name}",…
Ken Bellows
  • 6,711
  • 13
  • 50
  • 78
27
votes
4 answers

@PathVariable in SpringBoot with slashes in URL

I have to get params from URL using @PathValiable in SpringBoot application. These params often have slashes. I don't have a control about what a user would enter in URL so I would like to get what he has entered and then I can handle with it. I…
Kirill Ch
  • 5,496
  • 4
  • 44
  • 65
1
2 3
18 19