I get a   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Hex   when i execute my code.   I have looked through a number of examples on this exception on stack overflow but nothing seems to help. My pom.xml looks like this  &lt;dependency&gt;   &lt;groupId&gt;commons-codec&lt;/groupId&gt;   &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;   &lt;version&gt;1.10&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt;   &lt;groupId&gt;junit&lt;/groupId&gt;   &lt;artifactId&gt;junit&lt;/artifactId&gt;   &lt;version&gt;3.8.1&lt;/version&gt;   &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt;   &lt;/dependencies&gt;   &lt;build&gt;     &lt;pluginManagement&gt;       &lt;plugins&gt;         &lt;plugin&gt;           &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;           &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;           &lt;version&gt;2.4.3&lt;/version&gt;           &lt;executions&gt;             &lt;execution&gt;               &lt;phase&gt;package&lt;/phase&gt;               &lt;goals&gt;                 &lt;goal&gt;shade&lt;/goal&gt;               &lt;/goals&gt;             &lt;/execution&gt;           &lt;/executions&gt;         &lt;/plugin&gt;          &lt;plugin&gt;           &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;           &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;           &lt;version&gt;3.0&lt;/version&gt;         &lt;/plugin&gt;         &lt;plugin&gt;           &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;           &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;           &lt;version&gt;2.12.4&lt;/version&gt;         &lt;/plugin&gt;       &lt;/plugins&gt;     &lt;/pluginManagement&gt;      &lt;plugins&gt;       &lt;plugin&gt;         &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;         &lt;configuration&gt;           &lt;source&gt;1.8&lt;/source&gt;           &lt;target&gt;1.8&lt;/target&gt;         &lt;/configuration&gt;       &lt;/plugin&gt;     &lt;/plugins&gt;   &lt;/build&gt;   Code to reproduce it looks like this  package com.mypackage; import java.util.*; import java.io.*; import java.security.*; import org.apache.commons.codec.binary.Hex;  public class Test{     private byte[] m_key;   private static String resourceFolder = System.getenv("SEABED_HOME").toString() +  "/testing" + "/resources"; public static void main(String[] args) { Test t = new Test(); t.readKey(); }     public byte[] generateKey()   {     SecureRandom scr = new SecureRandom();     byte[] key = new byte[32];     scr.nextBytes(key);     return key;   }    private void readKey()   {      BufferedReader br = null;     try{       br = new BufferedReader(new FileReader(resourceFolder + "/.seabedkey"));       m_key = Hex.decodeHex(br.readLine().toCharArray());     }     catch(Exception e)     {        if(e instanceof FileNotFoundException)       {         System.out.println("Key not found, generating now");         writeKey(generateKey());         readKey();         return;       }       e.printStackTrace();     }     finally     {       if(br != null)       {         try         {           br.close();         }         catch(IOException e)         {           e.printStackTrace();         }       }     }    }    private void writeKey(byte[] key)   {     try{       FileOutputStream fos = new FileOutputStream(resourceFolder + "/.seabedkey");       fos.write(key);       fos.close();     }     catch(Exception e)     {       e.printStackTrace();     }   } }   I execute it like this  java -cp target/mypackage-1.0-SNAPSHOT.jar:~/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar com.mypackage.Test   It compiles but then at runtime it looks like the class cannot be found. I tried changing the scope of the dependency to provided but apparently that is not the right way to use it so I switched back to the default which is compile. I can find the jar in my .m2 folder so I am sure it is there.
Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?
Android: How to draw route directions google maps API V2 from current location to destination Openlayers v4.0.1 support Google Maps Javascript API? I want to know if the latest version of Openlayers (v4.0.1) supports Google Maps as a Tile Layer. I can't find any document ion about this. If Openlayers doesn't support Google Maps, could someone  tell me if there is any way to do this? I'm developing some scripts. One for the  that popped in Ubuntu 16.04 even though pcspkr is blacklisted. Another to fix a  where sound switches off from TV to the laptop.  What is the best directory to put my bash scripts in?  I've searched the Q&amp;A database but I get a bunch of different answers for a bunch of different scenarios.  /usr/local has been recommended by one person because it's in the PATH$. Is that the right thing to do?  Thank you for your advice.    Even though I accepted below answer over a year ago, I ended up using:   /usr/local/bin for scripts needing sudo powers /home/me/bin for scripts running at user level   After creating directory /home/me/bin you need to log out and in again for it to get into your PATH. I have two machines with RJ11 ports and I had a RJ11 Modular Telephone Cable lying around.I wondered if it was possible to create a network between the two machines with those RJ11 Modular Telephone Cable (back to back via RJ11 ports) much like a network we create between two computers with a single RJ45 Modular connector cable.  Is this setup possible at all ? If it is , what will be the maximum transfer speed i can achieve between these two computers ? What is the correct position of the word 'also'?     I would like to also talk about ...      I would also like to talk about ... I am trying to run a function from  in ArcMap 10.1; Sink evaluation. But before it can finish it returns an error message, that, frankly, I don't understand at all.  It goes System.runtime.interopservices.comexception (0x80004005): error hresult e_fail .  Can anyone help me solve this? I have tried all I can think of. Run the function from the toolbox instead of dropdown menus, shorten paths, restart ArcMap, reinstall AHT, open new map documents, restart my computer, wait till next day and see if it automagically have fixed itself...   After searching this forum I found a , although it's got no answers. Now I'm all out of ideas, can anyone please help me?!    I'm using ArcMap 10.1 SP1 basic license and Windows 7.    I think I have narrowed it down a bit, still not clear what's wrong though. Sink evaluation uses a series of functions in Arcmap, of which one is Zonal statistics as table. That's the one it gets stuck on. The input raster somehow does not exist, path unknown. I guess this is some intermediary raster.       After consulting the Arc Hydro team, I got the advice not to use grids stored in a gdb (which I didn't). I have also tried to change target locations, thanks to @G.Oxsen. Unfortunately neither of those solved the issue. According to the Arc Hydro team, GPL0 that I asked about earlier is an in-memory grid, so probably no problem there.   I am currently pursuing that it is related to the installation of SP1. Anyone out there using AHT with SP1 and got Sink evaluation working?    Uninstalling SP1 did not change anything, unfortunately. Still working on this, but with less intensity. Seems like I'll have to find workarounds...    By reducing the number of sinks in need of processing I managed to get Sink evaluation running. Having the files not stored in a gdb seem to help as well, as mentioned earlier, and using integer grids.  Changing the "Maximum number of unique values to render" in ArcMap Options (Customize menu), tab Raster --> Raster dataset is another tip that I got (from the Arc Hydro Team). Restarting ArcMap after running every one or two functions also helps keeping things stable. If two limits don't exist, are we sure the limit of sum doesn't exist? This is a true/false question.     If the limits $$\lim_ {x\to a}\ f(x)\quad \text{ and }\quad  \lim_ {x\to a}\ g(x)$$ don't exist, limits $$\lim_ {x\to a}\ (f(x)+g(x))\quad \text{ and }\quad \lim_ {x\to a}\ (f(x)g(x))$$ don't exist also.   My idea is, that, because $$\lim_ {x\to a}\ (f(x)+g(x))=\lim_ {x\to a}\ f(x)+\lim_ {x\to a} g(x)$$ then the limits doesn't exist, correct? Why can't the Others go around the Wall at sea? As explained in a  earlier , the Wall does not extend all the way to the sea on the East, and the castle there is essentially undefended anyway. Thus, wildlings -- and Stannis' army -- were able to go around it undetected.  We know that the Others and the wights they raise can't cross through the Wall, and I think we can assume that it's built to stand up to any attacks they make trying to bring it down. But there does not appear to be any reason they can't just go around like anyone else.  Possibly related: in the TV Show, we actually see the attempted evacuation of Hardhome, and the Night King allows Jon Snow and his human army and civilians to flee back to their boats to safety, even after raising a massive army of wights. You could interpret this as merely a psychological ploy, but it may be a hint that the dead can't cross the water either.  Has there been any indication (books or show) that the Others/White Walkers and their army of wights are blocked by open water, or are somehow tied to the land of the Frozen North, or that there's any other obstacle keeping them from just sailing/swimming around the Wall? Why are my JavaScript objects equal to Proxy {} Am wondering if somewhere there is a list of industry "minimums" for browser support. My company release two "portals" over the past 6 months and did very little to support IE8 users, who at this time, according to my G Analytics makes up about 14% of all IE visitors. Amazingly enough IE7 is 25%...  Figured support for IE7 was out the window already, but figured 14% was significant enough to warrant some support.  Any arguments to support my side of wanting to support IE8?  Any arguments to NOT support IE8? Let $H$, $K$ be subgroups of $G$. Prove that $o(HK) = \frac{o(H)o(K)}{o(H \cap K)}$.  I need this theorem to prove something. Dealing with multiple private DNS servers How much memory can a 32 bit process access on a 64 bit operating system? Can we clarify to the OP that their question is not yet closed and the duplicates are only suggestions? I keep seeing custom flags in the queue from question askers who are incredibly irritated because there is a big, prominent box at the top of their question. It's just a list of other questions which may have the answer they desire, and is only even displayed to them because the question is not closed yet.  This question may already have an answer here: [list]  But to an ordinary user, it is not at all clear that the box is only shown to them, or that it will go away on its own if their question never actually gets closed. Could the text for this notice be altered to make it more clear that:  They are just suggestions for the person to view. Potentially if they agree with one, they should vote to close their own question as a duplicate of it.  Their question is not closed yet. If they disagree with the duplicates suggested, they should clarify their question and explain why it's not a duplicate.   I was thinking of an altered wording such as:  You might be able to find an answer to your question here: [list] If those answers do not fully address your question, please [edit your question] to clarify your exact problem.  I went with a more direct wording for the bolded title. Since the notice is only displayed to the asker, it makes more sense to talk directly to them in the message rather than making it feel like it's supposed to be addressing the entire audience of the site. Emphasize that only that person is seeing it by talking to them. It would also be helpful to append a &quot;More info&quot; link at the end of the message that links them to some further documentation about duplicates, and explains how the notice works - particularly that it will go away eventually or change to a proper duplicate notice if the question does get closed. Finding what methods a Python object has Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?  Or,  if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called? What is the purpose of the thin wire at the top of power transmission lines? I know a power transmission line carries usually two sets of 3 phase conductors. But I have noticed a relatively thin wire at the center-top of the power transmission line. What is the purpose of this thin wire? If granted omniscience and we know that $\beta_1$ in a multiple linear regression model is truly 0, what does that mean in words (and math notation)?  The model is: $Y = \beta_0 + \beta_1X_1 + \beta_2X_2 + \epsilon$  Does $\beta_1 = 0$ mean:   Empirically: "If we make infinite, perfect measurements of our data, $\hat\beta_1$ approaches 0 at the limit?" [Math: ??] Formally: "In the true, finite population of our data, $X_1$ has 0 association with $Y$ and their vectors of values are perfectly linearly independent, uncorrelated, and orthogonal?" [Math: ??]   What does $\beta_1 = 0$ mean, precisely? For every $c\in [0;2]$ determine whether the sequence $\{a_n\}_{n\geq 1}$ which is defined as follows:  $a_1=c$, $a_{n+1}=1+\frac{(a_n-1)^2}{17}$ for $n\geq 1$  is monotonic for sufficiently large $n$, and determine whether its limit exits and if it exists, give its value.  I have no idea what to do with this problem. I was able to see that $a_{n+1}-a_n$ is a quadratic function and I also found ot that limit, if exists, is equal to either $1$ or $18$ (that's beacause if $a_n$ id convergent to $g$ then every subsequence is also convergent to $g$). So how to determine the limit for every $c\in [0;2]$? Can the Dispel Magic spell be Readied to counter an opponent's spell? When playing as a spellcaster, is it valid the use of the Ready action to prepare Dispel Magic to counter a spell cast by an opponent? In the same vein, when declaring said action, do I have to specify which spell slot I will use when Readying the Dispel Magic spell? If that is the case, does this tactic nullify an opponent's spell? I get the impression that this is basically turning Dispel Magic into a spell with a casting time of &quot;1 reaction&quot;. Is my reading of the rules accurate? How to make 'python' program command execute Python 3?