We are running automated tests using WindowsTester. When I run one of my test cases, I'm getting "java.lang.NoClassDefFoundError" error. Please, help me to resolve this.  The stacktrace is:  java.lang.NoClassDefFoundError: org/eclipse/osgi/internal/loader/ModuleClassLoader     at com.windowtester.internal.runtime.bundle.BundleResolver.bundleForClass(BundleResolver.java:21)     at com.windowtester.internal.runtime.bundle.BundleResolver.bundleNameForClass(BundleResolver.java:29)     at com.windowtester.internal.runtime.bundle.BundleClassReference.forBundleClass(BundleClassReference.java:35)     at com.windowtester.internal.runtime.ClassReference.forBundleClass(ClassReference.java:26)     at com.windowtester.runtime.WidgetLocator.&lt;init&gt;(WidgetLocator.java:88)     at com.windowtester.runtime.WidgetLocator.&lt;init&gt;(WidgetLocator.java:108)     at com.windowtester.runtime.WidgetLocator.&lt;init&gt;(WidgetLocator.java:134)     at com.windowtester.runtime.swt.locator.SWTWidgetLocator.&lt;init&gt;(SWTWidgetLocator.java:139)     at com.windowtester.runtime.swt.locator.CTabItemLocator.&lt;init&gt;(CTabItemLocator.java:127)     at com.sample.TestUtilsGUI.closeWelcomePageIfNecessary(TestUtilsGUI.java:216)     at junit.framework.TestCase.runBare(TestCase.java:139)     at com.windowtester.runtime.common.UITestCaseCommon.access$0(UITestCaseCommon.java:1)     at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:140)     at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:161)     at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:50) Caused by: java.lang.ClassNotFoundException: org.eclipse.osgi.internal.loader.ModuleClassLoader cannot be found by com.windowtester.runtime_6.1.0.201310072244     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)     at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)     ... 17 more
I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?
What are the visa (or any other crucial) requirements of Bhutan for tourists? I heard that access to Bhutan is quite restricted for all people of outside South-Asian countries?  Can I have the details on that? Inverse public-key encryption I'm in the need of an inverse public-key encryption method where you encrypt with the private key and decrypt with the public key. In other words an asymetric encryption where you can't generate the encryption key from the decryption key. Does such encryption exist? If yes which, and which would be the fastest?  If nothing like that exists I would be glad if you helped me out with my situation:    I need to authenticate users logging in from my Java application in the way that the response from the server cannot be falsified and thus giving the user full access to the application. Using public key encryption was an obvious method, I would decrypt data received from the client to confirm the credentials. This won't work because if someone manages to decompile and get the private key from the code, they would be able to generate the public key, which would make them able to crack my application again. So any ideas how I can get this secure? How to cleanly launch a GUI app via the Terminal? Some GUI apps launch cleanly via the Terminal command line, but some don't, and they cause the Terminal to wait for the app to terminate. Even then, some don't "release" the command line.  The mysterious ampersand &amp; suffix seems to cause the terminal to put the process into the background (but I'm not sure what happens there).  Is there a way to launch an app via the Terminal so that there is no "hang on" effect, just like launching something via Alt+F2?  I'd like to have the command line available again immediately, without something still in the background and printing in the terminal. Story about last 2 men on Earth. One very evil, and the other very ethical Add 1Password extensions support to the SE iOS app Please implement the URL scheme to call 1Password for password lookups on the iOS app.   a URL scheme for switching to 1Password to search item titles for a custom term, usually a service name like “twitter” or “evernote”. This speeds up the process for the user so they can copy something like their password and get back to your app  That will ease sign up speed using long, complicated or unmemorable passwords for many users of both apps. In the two years since the above blog was published there are now updated instructions for implementation and code on github: In electromagnetism, why does nature prefer the right-hand rule over the left-hand rule? At school I learnt the  to remember the resulting direction of different phenomena, such as geometrical cross products, mechanical torque, or the direction a screw will move when turning it. This directions are however decided by humans, and we could have easily defined the directions in the opposite way.  However the right hand rule also predicts phenomena which is not arbitrarily set by humans, but is intrinsic to the nature. If you have a coil in which you put some current, and the nature creates a magnetic field in a direction perpendicular to it, the direction depends on the right hand rule.  My question is, why this direction and not the opposite? Nature tends to be symmetric and not have apparent preferences for two equal options, so in a so why is one direction preferred over the other one? Why doesn't a "left hand" rule apply? I recently bought myself a pack of four YN560 IV's and a YN560-TX for my Canon camera, and apparently I got ahead of myself and didn't realise I should make sure the flashes support HSS.  I tried them out yesterday at home, and even on 1/128 and 1/250s on the camera, they were overexposing here and there. Unfortunately, I don't really have the space to move the flashes much further from my subject, so I was wondering if there is any way to trick them into HSS? I should mention that I also own a Canon 580ex II, which does support HSS. I was thinking I could perhaps use that mounted on the camera to trigger the Yongnuo's, but as far as I can tell that would render the 560-TX useless as the flashes can't be controlled wirelessly when in S1 or S2.  I guess I could buy an ND filter, but as I have lenses with differing sizes, this feels like more of a pain in the ass.  Is there any hack I can pull off here that you guys know of?  Thanks! Why does (insert favorite search engine here) get better search results than SO, SF, or SU's own search function? I've lost count of the number of times I've either asked a question or been answering a question only to have it closed as an exact duplicate. But searching for the question turns up  a list of seemly unrelated results using the sites builtin search. Then if I switch to a general web search engine and limit its scope to just SO, SF or SU I find the question within the first two or three results.  Why is this?  I'm pretty sure this isn't an exact duplicate of another question though I did find some that were at least somewhat related (using google).  Update:  I also have gotten (somewhat) better results by simply typing a question and browsing the generated list of related questions. Still a search feature that doesn't return good results isn't going to be used by most people.  Common sense would suggest (though common sense isn't always the best indicator) that a targeted solution to a specific problem domain should be superior to a generalized solution. In most cases this appears to hold true. List of Figures + Beamer? I want to have a List of Figures in my Beamer presentation.  I spent some time searching the web for a solution and only found desperate people telling others that it's not possible, i.e.  or .  I also made some experiments on my own, i.e. "abuse" tocloft to do the job. However, even \usepackage{tocloft} causes pdflatex to fail with ! LaTeX Error: \l@section undefined. (and lying to tocloft by defining the command as empty beforehand doesn't to any good either).  I can't really see why it should be that difficult to make a List of Figures in beamer, since \tableofcontents works flawlessly.   I'm not afraid of doing some coding on my own, but I'm not deep enough into TeX to really understand the magic behind the "List of Figures", "Table of Contents" and alike.  Is anyone out there having suggestions or links that might help me figure this out?  \documentclass{beamer}  % uncomment the following line % to get the error message % `! LaTeX Error: \l@section undefined.`  %\usepackage{tocloft}   % uncomment the following lines INSTEAD % to lie to tocloft % and get the next error message  %\makeatletter %\newcommand\l@section{} %\makeatother %\usepackage{tocloft}  \begin{document}  \begin{frame}{A frame} \begin{figure} \mbox{A} \caption{An 'A'} \end{figure} \end{frame}  \begin{frame}{List of Figures} \listoffigures \end{frame}  \end{document}   EDIT: Solution  Starting from Marco Daniels answer to my question, I modified his code to reflect my needs. Here is what I came up with. Please feel free to comment, improve and reuse this.  \RequirePackage{ifthen}  \makeatletter  \AtEndDocument{%   \clearpage   \beamer@tempcount=\c@page\advance\beamer@tempcount by -1%   \if@filesw   \newwrite\tf@lof   \immediate\openout\tf@lof\jobname.lof\relax   \newwrite\tf@lot   \immediate\openout\tf@lot\jobname.lot\relax   \fi }  \long\def\beamer@makecaption#1#2#3#4{%   \def\insertcaptionname{\csname#1name\endcsname}%   \def\insertcaptionnumber{\csname the#1\endcsname}%   \edef\insertframenumber{\theframenumber}%   \ifthenelse{\equal{#3}{\empty}}{%       \def\insertlistcaption{#2}%   }{%     \def\insertlistcaption{#3}%   }   \def\insertsource{#4}%   \def\insertcaption{#2}%   \ifthenelse{\equal{#1}{figure}}{%       \addtocontents{lof}{\protect\listoffigureformat{\insertcaptionnumber}{\insertlistcaption}{\insertframenumber}{\insertsource}}{}{}%   }{}   \ifthenelse{\equal{#1}{table}}{%       \addtocontents{lot}{\protect\listoftableformat{\insertcaptionnumber}{\insertlistcaption}{\insertframenumber}}{}{}%   }{}   \nobreak\vskip\abovecaptionskip\nobreak   \sbox\@tempboxa{\usebeamertemplate**{caption}}%   \ifdim \wd\@tempboxa &gt;\hsize   \usebeamertemplate**{caption}\par   \else   \global \@minipagefalse   \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%   \fi   \nobreak\vskip\belowcaptionskip\nobreak% }  \def\listoffigureformat#1#2#3#4{%   \makebox[2ex][r]{#1}%   \hspace{1ex}%   {\usebeamercolor[fg]{bibliography entry author} #2}%   \ifthenelse{\equal{#4}{\empty}}{}{ -- #4}%   \dotfill%   \makebox[2ex][r]{#3}\par% } \def\listoffigures{%   \setlength{\leftskip}{3ex}   \setlength{\parindent}{-3ex}   \@starttoc{lof}% } \def\listoftableformat#1#2#3{\makebox[2ex][r]{#1}\hspace{1ex}#2\dotfill\makebox[2ex][r]{#3}\par} \def\listoftables{%   \setlength{\leftskip}{3ex}   \setlength{\parindent}{-3ex}   \@starttoc{lot}% }  \long\def\@caption#1[#2]#3{   \par\nobreak   \begingroup     \@parboxrestore     \if@minipage       \@setminipage     \fi     \beamer@makecaption{#1}{\ignorespaces #3}{\ignorespaces #3}{\ignorespaces #2}\par\nobreak     \endgroup}  \makeatother Can a 64-bit OS run as a guest on a 64-bit VirtualBox host? Is it possible to run a 64-bit OS as a guest on a 64-bit machine with VirtualBox? I'm guessing it should be, but I'd like to make sure.  Do some virtualization technologies allow a single guest machine to use multiple cores? I guess it should be possible, but my VirtualBox open-source edition doesn't seem to do it. Apple Macbook Dual Monitor MST This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.   When would one want to use an interface and when would one want to use an abstract class? How to make a modification take affect without restarting nginx? Apache has a graceful option which can scan for modification in http.conf without restarting Apache. What about nginx? filter the file type with the file upload control After installing Telegram Desktop on Ubuntu 16.04 by these commands:  sudo add-apt-repository ppa:atareao/telegram sudo apt-get update sudo apt-get install telegram   I get this error:  $ telegram telegram: Panic - Unable to find your tty (pts/2) in /var/run/utmp How to remove "phone style" Gnome swipe to unlock I need to remove the annoying new "locking" screen that shows a giant clock: I can't remove it with just moving the mouse (as with any other desktop environment), the animation is slow, and it isn't asking me for a password!  I managed to disable it, just to discover that now I can't lock my screen on purpose, so I can't go away from the computer.  Just to clarify, I want to:   After some time the screen could go black, but if I move the mouse or press any key then I can use it directly (like a normal screensaver). If I press super-L then it is locked, and I must type the password to unlock (like a normal lock screen).   I found several "solutions", but none seems to work: In $\mathbb{Z}\left [ x \right ]$, let $I = \left \{ f\left ( x \right ) \in \mathbb{Z}\left [ x \right ]: f\left ( 0 \right ) \text{ is an even integer} \right \}$. Is $I$ a Prime ideal of $\mathbb{Z}\left [ x \right ]$?  Let $f_{1}\left ( x \right ),f_{2}\left ( x \right ) \in \mathbb{Z}\left [ x \right ].$ Let $f_{1}\left ( x \right )f_{2}\left ( x \right ) \in I$. Clearly, I is a proper ideal of $\mathbb{Z}\left [ x \right ]$ since the elements in $\mathbb{Z}\left [ x \right ]$ evaluated at 0 can produce an odd integer but this cannot be true in I. Now, $f_{1}\left ( 0 \right )f_{2}\left ( 0 \right )$ is an even integer in I. Hence, either $f_{1}\left ( 0 \right )$ has an even constant integer or $f_{2}\left ( 0 \right )$ has an even constant integer. Thus, I is a prime ideal by definition. Is this correct? I would now like to show if I is a maximal ideal. Again, clearly, I is a proper ideal by the above argument. Let B be an ideal of $\mathbb{Z}\left [ x \right ]$ and I $\subseteq B\subseteq \mathbb{Z}\left [ x \right ]$. How should B be defined so that I would conclude either $B=I$ or $B=\mathbb{Z}[x]$? What's the maximum length of the meta keywords tag? Could you please tell me that what is the maximum length for meta keywords? A toplogical space $X$ is said to be second countable   if there exists a countable basis for the topology.      $X$ is separable if there exist a countable dense subset.   Show that a second countable space always is separable.      Give an example of a space that is separable but not    second countable   The first part was easy and i managed to solve it on my own  Assume that $X$ is second countable and let $B_1, B_2, B_3...$ be a countable basis. Construct the set $A$ by taking one element $x_n$ out of every $B_n$. Then $A$ becomes dense because every open set $U$ contain a $B_n$ which in turn contain the element $x_n$ in $A$.    Again, like in the question i posted yesterday, i had trouble to come up with an example but our professor gave an example during the last lecture but i dont fully understand it:  "For an example of a separable but not second countable space let $X$ be the real line provided with the cofinite topology, i.e. where a set is open if its either empty or if its complement is finite.   Then every infinite set is dense and hence $X$ is separable.  But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  We asked him to explain it in more detail but his english is poor and nobody understood anything...:)       Def: A subset $A$ of a topological space $X$ is dense in $X$ if for any point $x$ in $X$, any neighborhood of $x$ contains at least one point from $A$.   $1.$ "Then every infinite set is dense"  Take $A$ to be one of these infinite sets. If $x \in A \subset X$ then it trivially fulfills the definition. But if we take a $x \not\in A$ why is it not possible to find a neighborhood in these finite sets that does not contain an element in $A$?  edit: its obvious if it is only open neighborhoods, open sets in the topology, but that is not specified in the definition.  $2.$ I am not fully understanding this either  "But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  Is it possible to express this in a simpler way? LWJGL Eclipse Resource Deployment I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now I'm using the src folder (src/res) for my resources, and use src/resourcename in my code. When I export it, this won't work on another location as the relative path is ofcourse incorrect. What would be the best way of deploying your game with all the resources in one file? Maybe put the files in the jar?  I would like to hear from a few people how they store and deploy their project with resources, thanks!