[SOLVED] Re: Jmol, Java and netscape.javascript
On Tue, 23 Aug 2011 14:25:16 -0400 Omair Majid oma...@redhat.com wrote: On 08/23/2011 04:44 AM, Jussi Lehtola wrote: $ ant -lib %{_datadir}/icedtea-web/plugin.jar doc main doesn't work, it still fails in the same error. There are two things that were causing problems. The spec file was setting classpath to a directory, not a jar. Also, the build.xml file was instructing ant to discard the classpath specified on the command line. The build.xml statement was indeed the culprit. Thanks for your help! -- Jussi Lehtola Fedora Project Contributor jussileht...@fedoraproject.org -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Jmol, Java and netscape.javascript
On Wed, 17 Aug 2011 13:05:21 -0400 Omair Majid oma...@redhat.com wrote: On 08/17/2011 12:22 PM, Jussi Lehtola wrote: Hi, I tried to update Jmol to the latest release, when I ran once again into error: package netscape.javascript does not exist import netscape.javascript.JSObject; The package is not standard part of Java. It is provided by plugin.jar. In Fedora = 15 plugin.jar was included with the JDK (if the java-1.6.0-openjdk-plugin package was installed). Now plugin.jar is provided by icedtea-web. My spec builds fine in Fedora 15, but fails to build in 16 and 17. http://pkgs.fedoraproject.org/gitweb/?p=jmol.git;a=blob;f=jmol.spec;hb=HEAD Does someone have a solution to this problem? I think one possible fix would be to BuildRequire icedtea-web and include /usr/share/icedtea-web/plugin.jar in the classpath. icedtea-web had already been a BuildRequire since Fedora 15 (and the package compiles fine in Fedora 15), but the jar file has been moved after that. $ ant -lib %{_datadir}/icedtea-web/plugin.jar doc main doesn't work, it still fails in the same error. -- Jussi Lehtola Fedora Project Contributor jussileht...@fedoraproject.org -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Jmol, Java and netscape.javascript
On 08/23/2011 04:44 AM, Jussi Lehtola wrote: $ ant -lib %{_datadir}/icedtea-web/plugin.jar doc main doesn't work, it still fails in the same error. There are two things that were causing problems. The spec file was setting classpath to a directory, not a jar. Also, the build.xml file was instructing ant to discard the classpath specified on the command line. I have attached two patches (made against f16, and contain some extra debugging commands). I started off a build using them: https://koji.fedoraproject.org/koji/taskinfo?taskID=3296091 The build failed, but it managed to compile at least some of the java code without the JSObject errors. Cheers, Omair diff --git a/jmol.spec b/jmol.spec index d651f23..62179b4 100644 --- a/jmol.spec +++ b/jmol.spec @@ -1,6 +1,6 @@ Name: jmol Version: 12.0.48 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An open-source Java viewer for chemical structures in 3D Group: Applications/Engineering License: LGPLv2+ @@ -15,6 +15,8 @@ Patch0: jmol-12.0.41-fedorabuild.patch Patch1:jmol-12.0.41-jarlocation.patch # Don't try to sign jars Patch2:jmol-12.0.41-dontsign.patch +# Dont ignore the system classpath +Patch3: do-not-ignore-classpath.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -67,6 +69,7 @@ The documentation for %{name}. %patch0 -p1 -b .fedorabuild %patch1 -p1 -b .jarlocation %patch2 -p1 -b .nosign +%patch3 -p0 # Remove binaries find -name '*.class' -exec rm -f '{}' \; @@ -97,9 +100,10 @@ Categories=Education;Science;Chemistry;Physics;DataVisualization; EOF %build -# Need to be able to find netscape.javascript.JSObject -export CLASSPATH=%{_datadir}/icedtea-web -ant doc main +# Need to be able to find netscape.javascript.*classes +PLUGIN_JAR=%{_datadir}/icedtea-web/plugin.jar +jar tf $PLUGIN_JAR | grep JSObject +ant --execdebug -lib $PLUGIN_JAR doc main %install rm -rf %{buildroot} --- build.xml.orig 2011-08-23 13:30:34.0 -0400 +++ build.xml 2011-08-23 13:30:43.0 -0400 @@ -14,7 +14,6 @@ !-- pull developer-specific settings from their home directory -- property file=${user.home}/.jmol.build.properties / !-- compile options -- - property name=build.sysclasspath value=ignore / property name=build.compiler value=javac1.5 / !-- for some reason, I can't get ant to use this ${java.version} property as the value of the source parameter -- -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Jmol, Java and netscape.javascript
Hi, I tried to update Jmol to the latest release, when I ran once again into error: package netscape.javascript does not exist import netscape.javascript.JSObject; My spec builds fine in Fedora 15, but fails to build in 16 and 17. http://pkgs.fedoraproject.org/gitweb/?p=jmol.git;a=blob;f=jmol.spec;hb=HEAD Does someone have a solution to this problem? -- Jussi Lehtola Fedora Project Contributor jussileht...@fedoraproject.org -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Jmol, Java and netscape.javascript
On 08/17/2011 12:22 PM, Jussi Lehtola wrote: Hi, I tried to update Jmol to the latest release, when I ran once again into error: package netscape.javascript does not exist import netscape.javascript.JSObject; The package is not standard part of Java. It is provided by plugin.jar. In Fedora = 15 plugin.jar was included with the JDK (if the java-1.6.0-openjdk-plugin package was installed). Now plugin.jar is provided by icedtea-web. My spec builds fine in Fedora 15, but fails to build in 16 and 17. http://pkgs.fedoraproject.org/gitweb/?p=jmol.git;a=blob;f=jmol.spec;hb=HEAD Does someone have a solution to this problem? I think one possible fix would be to BuildRequire icedtea-web and include /usr/share/icedtea-web/plugin.jar in the classpath. HTH, Omair -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel