SV: [mythtv-users] OT? : Java < projectx < mythburn

Marius Schrecker marius at schrecker.org
Wed Sep 21 08:55:03 UTC 2005


> Thanks Neil!
>
>  For the rest please see bottom posting.
>
>> I don't know much about ProjectX, but I do know about java.  When
>> you're in the directory that has build.sh, what's the output of
>>
>> echo $JAVA_HOME
>> echo $CLASSPATH
>> echo $PATH
>> which java
>> which javac
>> java -version
>> javac -version
>> ls -la lib
>>
>> -n
>>
>> On 9/20/05, Marius Schrecker <marius at schrecker.org> wrote:
>>>
>>> >Marius Schrecker wrote:
>>> >
>>> >> No, I haven't got that far. Still trying to build.
>>> >>
>>> >>I fixed the problem with build.sh not finding jar and javac
>>> executables by >>exporting the PATH, JDK_HOME and JAVA_HOME variables,
>>> and am now getting a >different error with build.sh not finding class
>>> definitions (as expected as >>I have no idea what to set as the
>>> CLASSPATH).
>>> >>
>>> >>
>>> >You don't need to set the CLASSPATH if you're using "java -jar" to
>>> >execute the "executable JAR file."  The JAR is the CLASSPATH.  What
>>> >command line are you using to start ProjectX?  What's the exact error
>>> >message you're getting?
>>>
>>> I'm trying to build ProjectX, so there is still no ProjectX.jar file.
>>> The error comes when I either run the build.sh script in the top level
>>> ProjectX0.9.0 source directory, or the line (from build.sh):
>>>
>>> # javac -encoding "ISO-8859-1" -O -g:none -classpath
>>> lib/commons-net-1.3.0.jar:lib/jakarta-oro-2.0.8.jar -d build
>>> @sources.lst
>>>
>>> the local -classpath is correct and points to where
>>> commons-net-1.3.0.jar and jakarta-oro-2.0.8.jar are in the ProjectX
>>> sources.
>>>
>>> This gives the error:
>>>
>>> Error occurred during initialization of VM
>>> java/lang/NoClassDefFoundError: java/lang/Object
>>>
>>> I've tested java with other commands, and these give the same error, so
>>> it's a problem with my java setup and not with ProjectX specifically.
>>>
>>> Thanks
>>>
>>> Marius
>
> In reply to Neil:
>
> # echo $JAVA_HOME
> /usr/java/jdk1.5.0_05/
>
> # echo $CLASSPATH
>
> (nothing)
>
> # echo $PATH
> /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/usr/share/qt3/bin:/emul/ia32-linux/bin:/usr/java/jdk1.5.0_05/bin
>
> This is as expected as I haven't set a CLASSPATH.
>
> # which java
> /usr/java/jdk1.5.0_05/bin/java
>
> # which javac
> /usr/java/jdk1.5.0_05/bin/javac
>
>
> # java -version
> Error occurred during initialization of VM
> java/lang/NoClassDefFoundError: java/lang/Object
>
> # javac -version
> Error occurred during initialization of VM
> java/lang/NoClassDefFoundError: java/lang/Object
>
>
> Where do you want me to run ls -la lib from?
> ls -la lib (from the ProjectX top level build directory gives)
>
> # ls -la lib
> total 357
> drwxr-sr-x  3 root src    312 Sep 20 13:06 .
> drwxr-sr-x  7 root src    504 Sep 20 13:07 ..
> -rw-r--r--  1 root src  11560 Sep 20 13:06 LICENSE.txt
> -rw-r--r--  1 root src    103 Sep 20 13:06 NOTICE.txt
> -rw-r--r--  1 root src    801 Sep 20 13:06 ReadMe.txt
> drwxr-sr-x  4 root src     96 Sep 20 13:06 c_src
> -rw-r--r--  1 root src 156601 Sep 20 13:06 commons-net-1.3.0.jar
> -rw-r--r--  1 root src  53248 Sep 20 13:06 idctref.dll
> -rw-r--r--  1 root src  45056 Sep 20 13:06 idctsse.dll
> -rw-r--r--  1 root src  85382 Sep 20 13:06 jakarta-oro-2.0.8.jar
>
> but I don't think that is what you mean.
>
> Now. In partial answer to my own question:
>
> I installed jdk from rpm via alien, as I prefer as miuch as possible to go
> through dpkg/apt-get, and there is no  rt.jar anywhere on the installed
> system, BUT:::
> I also had a look at the jre tarball, and that DOES contain the rt.jar
> class file. So the answer may be to download the jdk tarball and replace
> the main java tree to see if that fixes it. Perhaps the rpm is broken.
>
> What do you think?
>
> Marius


Just to answer my own post, that fixed it. Didn't need to set the
Classpath once the java tree was good.

Thanks for all the useful pointers.

Cheers

Marius


More information about the mythtv-users mailing list