<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: YUI Compressor and Java Class Loader</title>
	<atom:link href="http://www.julienlecomte.net/blog/2008/10/80/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.julienlecomte.net/blog/2008/10/80/</link>
	<description>Web Development, Operating System Programming and Amateur Astronomy</description>
	<lastBuildDate>Sat, 10 Jul 2010 05:57:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andrey</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-4150</link>
		<dc:creator>Andrey</dc:creator>
		<pubDate>Wed, 03 Mar 2010 12:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-4150</guid>
		<description>Dean, I&#039;ve fixed the issue with jquery.blockUI.js If no charset paramis specified for YUICompressor then it use system default encoding (which is ISO-8859-1 for me) but original jquery.blockUI.js have UTF-8 encoding. So you should converte this file to the system default encoding (e.g. ISO-8859-1) or explicitly setting YUICompressor charset param to the UTF-8 for this file.</description>
		<content:encoded><![CDATA[<p>Dean, I&#8217;ve fixed the issue with jquery.blockUI.js If no charset paramis specified for YUICompressor then it use system default encoding (which is ISO-8859-1 for me) but original jquery.blockUI.js have UTF-8 encoding. So you should converte this file to the system default encoding (e.g. ISO-8859-1) or explicitly setting YUICompressor charset param to the UTF-8 for this file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich Dougherty</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3607</link>
		<dc:creator>Rich Dougherty</dc:creator>
		<pubDate>Mon, 31 Aug 2009 00:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3607</guid>
		<description>In WebSphere 6.0 Rhino is provided in the parent classloader so I found it was necessary to rename packages (as suggested by Thomas Broyer). It is possible to automate this operation. Anyone interested should check out the solution used by the Liferay project. I am not affiliated with Liferay, but I found their scripts very helpful.

http://issues.liferay.com/browse/LPS-3169?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel</description>
		<content:encoded><![CDATA[<p>In WebSphere 6.0 Rhino is provided in the parent classloader so I found it was necessary to rename packages (as suggested by Thomas Broyer). It is possible to automate this operation. Anyone interested should check out the solution used by the Liferay project. I am not affiliated with Liferay, but I found their scripts very helpful.</p>
<p><a href="http://issues.liferay.com/browse/LPS-3169?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel" rel="nofollow">http://issues.liferay.com/browse/LPS-3169?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: endium</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3559</link>
		<dc:creator>endium</dc:creator>
		<pubDate>Mon, 24 Aug 2009 22:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3559</guid>
		<description>The bootstrapping works fine when executing the jar like normal, but I&#039;m calling the compress method directly, like this:
JavaScriptCompressor compressor = new JavaScriptCompressor(in, e_reporter);
compressor.compress(out, -1, false, true, true, false);

I had to add the regular js.jar into the classpath for a new project i&#039;m working on, and now the compressor isn&#039;t working properly any more. Any ideas?</description>
		<content:encoded><![CDATA[<p>The bootstrapping works fine when executing the jar like normal, but I&#8217;m calling the compress method directly, like this:<br />
JavaScriptCompressor compressor = new JavaScriptCompressor(in, e_reporter);<br />
compressor.compress(out, -1, false, true, true, false);</p>
<p>I had to add the regular js.jar into the classpath for a new project i&#8217;m working on, and now the compressor isn&#8217;t working properly any more. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3298</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Thu, 21 May 2009 20:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3298</guid>
		<description>I narrowed my issue down to two scripts
1. jquery-however-intent.min.js
2. jquery.blockUI.js

Anyone else have this issue and figured out a way to resolve it?</description>
		<content:encoded><![CDATA[<p>I narrowed my issue down to two scripts<br />
1. jquery-however-intent.min.js<br />
2. jquery.blockUI.js</p>
<p>Anyone else have this issue and figured out a way to resolve it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3297</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Thu, 21 May 2009 20:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3297</guid>
		<description>I am having the same issues as Lowell and Eric.  I am getting the exception org.mozilla.javascript.EvaluatorException while using a jQuery plugin which works on the browsers I&#039;ve tested (IE[6,7] and FF)

Any work arounds?</description>
		<content:encoded><![CDATA[<p>I am having the same issues as Lowell and Eric.  I am getting the exception org.mozilla.javascript.EvaluatorException while using a jQuery plugin which works on the browsers I&#8217;ve tested (IE[6,7] and FF)</p>
<p>Any work arounds?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike P</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3275</link>
		<dc:creator>Mike P</dc:creator>
		<pubDate>Mon, 20 Apr 2009 15:58:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3275</guid>
		<description>Answered my own question.  I was using a ByteArrayOutputStream and accidentally calling &quot;.flush()&quot; for the stream itself rather than the stream writer before trying to convert the results to a string.  Changed one line of code and it&#039;s all working now.  

Thanks again for a great utility!</description>
		<content:encoded><![CDATA[<p>Answered my own question.  I was using a ByteArrayOutputStream and accidentally calling &#8220;.flush()&#8221; for the stream itself rather than the stream writer before trying to convert the results to a string.  Changed one line of code and it&#8217;s all working now.  </p>
<p>Thanks again for a great utility!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike P</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3269</link>
		<dc:creator>Mike P</dc:creator>
		<pubDate>Fri, 17 Apr 2009 20:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3269</guid>
		<description>First off, I love YUI, and the compressor.  Nice work!

My question: 
I&#039;m trying to automate the &quot;minification&quot; of my site&#039;s files using a Java app.  I basically took the code from YUICompressor.java and hacked it to fit my needs.  It almost works, but when my files are minified they are truncated at 8192 bytes (8k).

As an experiment I took my input stream and wrote it directly to my output stream and I get the full file contents.  It&#039;s only when I call JavaScriptCompressor&#039;s compress() method that the file gets truncated.  

Any suggestions?  It even gets truncated if I use System.out as my output stream.  I&#039;m baffled.

Thanks!</description>
		<content:encoded><![CDATA[<p>First off, I love YUI, and the compressor.  Nice work!</p>
<p>My question:<br />
I&#8217;m trying to automate the &#8220;minification&#8221; of my site&#8217;s files using a Java app.  I basically took the code from YUICompressor.java and hacked it to fit my needs.  It almost works, but when my files are minified they are truncated at 8192 bytes (8k).</p>
<p>As an experiment I took my input stream and wrote it directly to my output stream and I get the full file contents.  It&#8217;s only when I call JavaScriptCompressor&#8217;s compress() method that the file gets truncated.  </p>
<p>Any suggestions?  It even gets truncated if I use System.out as my output stream.  I&#8217;m baffled.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcelo Volmaro</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3223</link>
		<dc:creator>Marcelo Volmaro</dc:creator>
		<pubDate>Thu, 26 Feb 2009 12:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3223</guid>
		<description>Hi,

It may be possible to add another option to the compressor so ANYTHING that start with an underscore will be replaced like any scoped variable (much like Dean Edwards js compressor).

Also, it would be nice another option (if I ask, I ask a lot :) ) to force variable replacement, even when the compressor finds an eval? Of course that may be dangerous if you don&#039;t know what you are doing, but I have some specifics where I needed eval and I&#039;m sure what happens inside the eval will not break because of an invalid referenced variable (like parsing json data or handling conditional comments for explorer).

Thanks in advance,

Marcelo.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>It may be possible to add another option to the compressor so ANYTHING that start with an underscore will be replaced like any scoped variable (much like Dean Edwards js compressor).</p>
<p>Also, it would be nice another option (if I ask, I ask a lot :) ) to force variable replacement, even when the compressor finds an eval? Of course that may be dangerous if you don&#8217;t know what you are doing, but I have some specifics where I needed eval and I&#8217;m sure what happens inside the eval will not break because of an invalid referenced variable (like parsing json data or handling conditional comments for explorer).</p>
<p>Thanks in advance,</p>
<p>Marcelo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3216</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 23 Feb 2009 22:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3216</guid>
		<description>Hi,

Is there a bug tracking site for YUICompressor?  Generally, it looks like it is working fairly well, but I am seeing a JS file fail miserably even though the JS is all valid.  Is there anywhere to report this issue?

The JS file in question that YUICompressor is choking over is from the jQuery Rich Array plugin (http://vladimir-k.blogspot.com/2008/12/rich-array-jquery-plugin.html).  The source can be found at http://jquery-rich-array.googlecode.com/files/rich-array-package-0.0.1.zip.  

Is there something special about this JS that the Compressor would find faulty?

Thanks,

Eric</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Is there a bug tracking site for YUICompressor?  Generally, it looks like it is working fairly well, but I am seeing a JS file fail miserably even though the JS is all valid.  Is there anywhere to report this issue?</p>
<p>The JS file in question that YUICompressor is choking over is from the jQuery Rich Array plugin (<a href="http://vladimir-k.blogspot.com/2008/12/rich-array-jquery-plugin.html" rel="nofollow">http://vladimir-k.blogspot.com/2008/12/rich-array-jquery-plugin.html</a>).  The source can be found at <a href="http://jquery-rich-array.googlecode.com/files/rich-array-package-0.0.1.zip" rel="nofollow">http://jquery-rich-array.googlecode.com/files/rich-array-package-0.0.1.zip</a>.  </p>
<p>Is there something special about this JS that the Compressor would find faulty?</p>
<p>Thanks,</p>
<p>Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lowell Stewart</title>
		<link>http://www.julienlecomte.net/blog/2008/10/80/comment-page-1/#comment-3153</link>
		<dc:creator>Lowell Stewart</dc:creator>
		<pubDate>Mon, 24 Nov 2008 15:05:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/?p=80#comment-3153</guid>
		<description>Hello, and thanks for all your work on YUI Compressor!  Seems to be very useful and solid, and I was excited to try it on some very large scripts I&#039;ve written.

One problem I have found, though, is that Rhino (apparently) chokes on the &quot;debugger&quot; keyword in JavaScript.  I have some scripts that, under certain circumstances, execute the debugger keyword to force a breakpoint and activation of a JavaScript debugger (if present) -- i.e. as a developer, if I&#039;m testing my JavaScript while it&#039;s running in an instance of IE embedded in another application, and I need to get in and inspect the DOM or the state of my code, I set things up such that I can give the code some secret input (in my case I click a certain button with Ctrl+Shift held down), which triggers execution of the debugger keyword. This causes the embedded instance of IE to invoke my JS debugger -- it&#039;s very useful in some cases.

When YUIC encounters the debugger keyword in JavaScript, though, it reports the following syntax error:

[ERROR] xxx:yy:identifier is a reserved word
...
org.mozilla.javascript.EvaluatorException: Compilation produced syntax error.
        at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:135)
        at org.mozilla.javascript.Parser.parse(Parser.java:410)
        at org.mozilla.javascript.Parser.parse(Parser.java:355)
        at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
        at com.yahoo.platform.yui.compressor.JavaScriptCompressor.(JavaScriptCompressor.java:533)
        at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)

Seems like &quot;debugger&quot; is on a list of reserved words that Rhino is aware or, but at the same time it doesn&#039;t expect to ever find it in a script.  As I said, it executes perfectly well under Internet Explorer; it&#039;s also documented as working in Mozilla &amp; derivatives. Any chance you&#039;d consider (further) modifying Rhino to accept the debugger keyword?</description>
		<content:encoded><![CDATA[<p>Hello, and thanks for all your work on YUI Compressor!  Seems to be very useful and solid, and I was excited to try it on some very large scripts I&#8217;ve written.</p>
<p>One problem I have found, though, is that Rhino (apparently) chokes on the &#8220;debugger&#8221; keyword in JavaScript.  I have some scripts that, under certain circumstances, execute the debugger keyword to force a breakpoint and activation of a JavaScript debugger (if present) &#8212; i.e. as a developer, if I&#8217;m testing my JavaScript while it&#8217;s running in an instance of IE embedded in another application, and I need to get in and inspect the DOM or the state of my code, I set things up such that I can give the code some secret input (in my case I click a certain button with Ctrl+Shift held down), which triggers execution of the debugger keyword. This causes the embedded instance of IE to invoke my JS debugger &#8212; it&#8217;s very useful in some cases.</p>
<p>When YUIC encounters the debugger keyword in JavaScript, though, it reports the following syntax error:</p>
<p>[ERROR] xxx:yy:identifier is a reserved word<br />
&#8230;<br />
org.mozilla.javascript.EvaluatorException: Compilation produced syntax error.<br />
        at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:135)<br />
        at org.mozilla.javascript.Parser.parse(Parser.java:410)<br />
        at org.mozilla.javascript.Parser.parse(Parser.java:355)<br />
        at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)<br />
        at com.yahoo.platform.yui.compressor.JavaScriptCompressor.(JavaScriptCompressor.java:533)<br />
        at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:112)<br />
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br />
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br />
        at java.lang.reflect.Method.invoke(Unknown Source)<br />
        at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)</p>
<p>Seems like &#8220;debugger&#8221; is on a list of reserved words that Rhino is aware or, but at the same time it doesn&#8217;t expect to ever find it in a script.  As I said, it executes perfectly well under Internet Explorer; it&#8217;s also documented as working in Mozilla &amp; derivatives. Any chance you&#8217;d consider (further) modifying Rhino to accept the debugger keyword?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
