Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Basic question about compiling Date: Fri, 10 Feb 2012 13:11:23 -0800 (PST) Organization: http://groups.google.com Lines: 103 Message-ID: <20674881.352.1328908283351.JavaMail.geo-discussion-forums@pbbmr9> References: <0fffb4b6-426a-4304-a249-63de08dd6d33@d15g2000yqg.googlegroups.com> <6230500.347.1328894981750.JavaMail.geo-discussion-forums@pbcmg9> NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1328908405 10376 127.0.0.1 (10 Feb 2012 21:13:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 10 Feb 2012 21:13:25 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11918 On Friday, February 10, 2012 11:48:13 AM UTC-8, simplicity wrote: > On Feb 10, 10:29=A0am, Lew wrote: > > Knute Johnson wrote: > > > simplicity wrote: > > > > I know this is kind of basic but somehow the solution escapes me. > > > > > > I have the applet which is supposed to hook up with the hardware > > > > attach to the computer. The hook-up interface is available in the > > > > external JAR archive called sbsdk.jar. So, I compile the applet wit= h > > > > the following command: > > > > > > javac -d %DST% ^ > > > > =A0 =A0 =A0 =A0-classpath %CLASSPATH_1%;%CLASSPATH_2% ^ > > > > =A0 =A0 =A0 =A0%SRC%\MyApplet.java>%DST%\MyApplet.log 2>%DST%\MyApp= let.err > > > > > > where > > > > %CLASSPATH_1% points to the location of the sbsdk.jar, namely "C:\U= sers > > > > \User\\Java\lib\sbsdk.jar" > > > > and > > > > %CLASSPATH_2% points to "%JRE%\lib\plugin.jar" (for JSObject to > > > > communicate with javascript in the page). > > > > > > OK, so far so good. Applet compiles with no issues. But that's wher= e > > > > So far all you've done is specify the compile-time classpath. > > > > > > it ends. When I load the HTML file containing the applet into a > > > > browser I am getting the exception > > > > > > Exception in thread "thread applet-MyApplet.class-1" > > > > java.lang.NoClassDefFoundError: com..sbsdk/SBSDKListener > > > > Because you did not provide the JAR to the runtime classpath! > > > > You need to study the Java tutorial. > > > > > > Luckily, I have the access to the sbsdk.jar source code. =A0When I = copy > > > > the folder structure containing compiled classes of sbsdk (com\ > > > blah>\sbsdk), my applet loads and everything works as expected. > > > > Your expectations are what are at fault. >=20 > I guess you are right. When I post the question on the public forum my > expectations are (1) get the answer, regardless of how trivial, basic > and obvious it might be or (2) get a gibberish like the stuff you > spent time on creating. >=20 > "Go do your research" is a typical response of a clueless buffoon > whose only characteristic is that he/she cannot keep his/her mouth > shut. So you're saying that reading the documentation is not a good idea? > > You must provide the dependencies *at run-time*. >=20 > Didn't I say that I know WHAT is causing it? I thought I did. What I > do not know is WHY and HOW to fix it. You asked specifically for help understanding the issue. Another respondent= had=20 given you a recipe for repair; I did not see any point in wasting your time= =20 repeating his good advice. However, that only answered part of your questio= n.=20 You also asked, "Can someone help me understand why this is happening?" I a= m so=20 very sorry I took your question seriously and tried to answer it more fully= . I guess I was under the assumption that you actually wanted the information= =20 that you requested. > Anyway, thanks for your time you spent typing your response. Sorry to > state it to you though that it is useless. I always DO my research and > if I decide to go public with questions it means I did not find the > answer myself. I suppose the same applies to majority of folks here > and my advise [sic] to you is: give people a bit of a slack. Your answer showed no signs of you having read or understood the very basic= =20 need in Java to have the JAR present at runtime as well as at compile time. Under the circumstances, telling you what to research and where seemed=20 appropriate. Now, untwist your knickers, please. > > > > Can someone help me understand why this is happening? I know that t= his >=20 > > We can tell you why this is happening; we cannot help you understand it= . >=20 > And also thanks for your attempt to point out to me how really stupid > I am. I am going to try to improve... With that level of response to the help you received, I doubt it. --=20 Lew