Re: classpath resetting in setSFProperties

ViK <[email protected]> Tue, 20 Mar 2007 09:21:14 +0530
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
--===============0701076558==
Content-Type: multipart/alternative; boundary="=-vkfgKpb9NA1hoCRO+v5X"


--=-vkfgKpb9NA1hoCRO+v5X
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2007-03-16 at 14:04 +0000, Steve Loughran wrote:

> ViK wrote:
> > hello,
> > 
> > Is there any specific reason behind resetting CLASSPATH= in setSFProperties
> > file? Because when load/deploy MyFooComponent, though I set myfoo.jar in
> > classpath on the command prompt, it throws exception "class not found".
> > After I copy myfoo.jar in ~dist/lib or edit setSFProperties to include foo.jar
> > in classpath it worked.
> > 
> > Is any specific reason behind resetting CLASSPATH to null (CLASSPATH=) in
> > setSFProperties file? or there are better approaches to handle this.
> 
> It probably does this because the CLASSPATH env variable is generally 
> perceived as a bad idea. It contaminates your Java package space, and 
> even if you start off without one, installing iTunes on windows is 
> enough for Apple to force a quicktime zip file onto your CP whether you 
> want it or not.
> 
> what we could do is steal some of the Ant launcher code to handle a -lib 
> prompt to add every JAR in a lib directory, and/or have a 
> ~/.smartfrog/.lib dir for which things get auto added.

Adding every jar files to lib directory manually would be painful. Auto
adding is a better option.

Thanks steve.

--ViK



> 
> -steve
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Smartfrog-developer mailing list
> Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/smartfrog-developer

--=-vkfgKpb9NA1hoCRO+v5X
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
On Fri, 2007-03-16 at 14:04 +0000, Steve Loughran wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">ViK wrote:</FONT>
<FONT COLOR="#000000">&gt; hello,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Is there any specific reason behind resetting CLASSPATH= in setSFProperties</FONT>
<FONT COLOR="#000000">&gt; file? Because when load/deploy MyFooComponent, though I set myfoo.jar in</FONT>
<FONT COLOR="#000000">&gt; classpath on the command prompt, it throws exception &quot;class not found&quot;.</FONT>
<FONT COLOR="#000000">&gt; After I copy myfoo.jar in ~dist/lib or edit setSFProperties to include foo.jar</FONT>
<FONT COLOR="#000000">&gt; in classpath it worked.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Is any specific reason behind resetting CLASSPATH to null (CLASSPATH=) in</FONT>
<FONT COLOR="#000000">&gt; setSFProperties file? or there are better approaches to handle this.</FONT>

<FONT COLOR="#000000">It probably does this because the CLASSPATH env variable is generally </FONT>
<FONT COLOR="#000000">perceived as a bad idea. It contaminates your Java package space, and </FONT>
<FONT COLOR="#000000">even if you start off without one, installing iTunes on windows is </FONT>
<FONT COLOR="#000000">enough for Apple to force a quicktime zip file onto your CP whether you </FONT>
<FONT COLOR="#000000">want it or not.</FONT>

<FONT COLOR="#000000">what we could do is steal some of the Ant launcher code to handle a -lib </FONT>
<FONT COLOR="#000000">prompt to add every JAR in a lib directory, and/or have a </FONT>
<FONT COLOR="#000000">~/.smartfrog/.lib dir for which things get auto added.</FONT>
</PRE>
</BLOCKQUOTE>
Adding every jar files to lib directory manually would be painful. Auto adding is a better option.<BR>
<BR>
Thanks steve.<BR>
<BR>
--ViK<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>

<FONT COLOR="#000000">-steve</FONT>

<FONT COLOR="#000000">-------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000">Take Surveys. Earn Cash. Influence the Future of IT</FONT>
<FONT COLOR="#000000">Join SourceForge.net's Techsay panel and you'll get the chance to share your</FONT>
<FONT COLOR="#000000">opinions on IT &amp; business topics through brief surveys-and earn cash</FONT>
<FONT COLOR="#000000"><A HREF="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&amp;p=sourceforge&amp;CID=DEVDEV</A></FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Smartfrog-developer mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</A></FONT>
<FONT COLOR="#000000"><A HREF="https://lists.sourceforge.net/lists/listinfo/smartfrog-developer">https://lists.sourceforge.net/lists/listinfo/smartfrog-developer</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-vkfgKpb9NA1hoCRO+v5X--


--===============0701076558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--===============0701076558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Smartfrog-developer mailing list
Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-developer

--===============0701076558==--