For anyone interested you can set the class to a bogus directory in the linux/Unix shell and the program will still run. t...@trey-desktop:~/Desktop/myjavaprograms$ set classpath=/Desktop/ tmp/ t...@trey-desktop:~/Desktop/myjavaprograms$ set classpath=~/Desktop/ tmp/ t...@trey-desktop:~/Desktop/myjavaprograms$ java Hello Hello
I guess as long as the parent directory is included, and the .class is somewhere in the parent directory or sub-directory it will not fail unlike with Windows. I'm following . Lab-1003 Exercise 1.2 Results set shown on the Lab Document C:\myjavaprograms>set CLASSPATH=c:\tmp (Set the CLASSPATH environment variable to a bogus directory, c:\tmp) C:\myjavaprograms>java Hello (This should fail since the c:\tmp directory does not contain Hello.class file) Exception in thread "main" java.lang.NoClassDefFoundError: Hello I'm still working on completing the entire exercise. But I will post any differences between Sang's Windows results and my Linux results, for those interested. On Feb 17, 11:53 am, miga <[email protected]> wrote: > On Feb 17, 4:52 am, Cecil Haertel III <[email protected]> wrote:> Has any > done these (especially the classpath ) exercises on Linux (Ubuntu). > > If so can you explain how to get past the last exercise/lab. When you > > introduce the DummyClass object, and import the "anotherpackage" into > > StudentRecord. > > > Everything worked fine until I did this. Now I can't get past the compile > > phase because StudentRecord throws a class not found error. > > Please, as already asked before, provide the lab number. I've already > wasted half one hour searching the labs for the example. And post to > the forum I don't answer private mails. > > > > > > > Thanks, > > Trey -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
