<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[JavaRanch: "Java in General"]]></title>
		<link>http://www.coderanch.com/forums/forums/f-1/Java-General</link>
		<description><![CDATA[The newest discussed topics in the forum "Java in General"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Source cod java activation framework</title>
				<description><![CDATA[Is the jaf source code available as download ? Where is it?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488102/2193933</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488102/2193933</link>
				<pubDate><![CDATA[Sat, Mar 20 2010 12:44:56 MDT]]></pubDate>
				<author><![CDATA[Rodrigo Bossini]]></author>
			</item>
			<item>
				<title>backslash n is being escaped against my will</title>
				<description><![CDATA[I have an input string being read from an xml file.  The string has a literal \n in it so that when it is written (in an email in this case) it will force a new line.<br /> <br /> When I read the xml file (using apache's xerces), and assign the input to a String, the resulting String contains \\n (i.e. it is being escaped for me).<br /> <br /> Here's the actual line of code:<br /> <br /> <pre>String textContent = content.getFirstChild().getTextContent()</pre><br /> <br /> So if my xml contains &lt;content&gt;blah blah blah<b>\n</b>blah blah blah&lt;/content&gt;, the assignment to my String object is "blah blah blah<b>\\n</b>blah blah blah.<br /> <br /> Because the \ is being escaped, the resulting email gets "un-escaped" and shows \n in it instead of recognizing the \n as an escape for "new line"<br /> <br /> How do I keep an assignment into a String object from escaping the backslash or do I need to un-escape it manually using a REGEX?<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488093/2193886</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488093/2193886</link>
				<pubDate><![CDATA[Sat, Mar 20 2010 10:43:51 MDT]]></pubDate>
				<author><![CDATA[Greg Diffor]]></author>
			</item>
			<item>
				<title>Help - Saving a Jpanel as a JPEG</title>
				<description><![CDATA[Hi Guys<br /> <br /> I m currently writing an application which is my own version of MS Paint<br /> <br /> My main functionality is there: drawing rectangles, lines, text etc...<br /> <br /> The problem i have is that when attempting to save the file as a JPEG, the file outputted only displays the background from my <a href="http://java.sun.com/javase/6/docs/api/javax/swing/JPanel.html" class="api" title="Java API" target="_new" rel="nofollow">JPanel</a>, not anything i draw ontop of it<br /> <br /> The code i am using is as follows;<br /> <br /> drawing my rect onto my <a href="http://java.sun.com/javase/6/docs/api/javax/swing/JPanel.html" class="api" title="Java API" target="_new" rel="nofollow">JPanel</a><br /> <br /> <pre>  g2.drawRect(drawX,drawY,OrWidth,OrHeight);  </pre><br /> <br /> Saving the <a href="http://java.sun.com/javase/6/docs/api/javax/swing/JPanel.html" class="api" title="Java API" target="_new" rel="nofollow">JPanel</a> as image<br /> <br /> <pre>   

int w = drawPanel.getWidth(), h = drawPanel.getHeight();
        BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = image.createGraphics();
        drawPanel.paint(g);

        g.drawImage(image, h, h, drawPanel);

        //g.drawi

        g.dispose();
        try{
        ImageIO.write(image, &quot;jpeg&quot;, new File(&quot;X.jpeg&quot;));
        }catch(IOException e){

        }

</pre><br /> <br /> As i mentioned, the file saves OK, and if i change the background colour, the file will just have the background colour, with none of the pictures draw on top of it, any help will be appricated greatly<br /> <br /> Thanks Nick Austin<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488079/2193788</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488079/2193788</link>
				<pubDate><![CDATA[Sat, Mar 20 2010 07:40:49 MDT]]></pubDate>
				<author><![CDATA[Nick Austin]]></author>
			</item>
			<item>
				<title>Error in Eclipse and Netbeans</title>
				<description><![CDATA[Hello to everyone,<br /> <br /> I write <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">Java</a> codes, but I face syntax & runtime errors both in Eclipse and NetBeans. <br /> <br /> The source codes are from Sun.com. I copy-paste, but see the errors. I am careful class name.<br /> <br /> <u>Eclipse Message</u> = Prints the ASM code to generate the given class.<br /> Usage: ASMifierClassVisitor [-debug] &lt;fully qualified class name or class file name&gt;<br /> <br /> <u>NetBeans Message</u> = no Main class found<br /> <br /> How can I solve my problem?  :shock: <br /> <br /> Thank you  ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488055/2193682</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488055/2193682</link>
				<pubDate><![CDATA[Sat, Mar 20 2010 01:57:37 MDT]]></pubDate>
				<author><![CDATA[Serap Elbeyoglu]]></author>
			</item>
			<item>
				<title>jar conflict in POI</title>
				<description><![CDATA[Dear All,<br /> <br /> I'm using POI jar file (POI Final version)in my web application in the same way some other file using POI beta version so there is an conflict between both the jar files if i remove beta version mine application will run so that other application uses beta version will throw exception.how to over come the conflict]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488047/2193646</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488047/2193646</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 23:16:17 MDT]]></pubDate>
				<author><![CDATA[santhosh.R gowda]]></author>
			</item>
			<item>
				<title>EnumSet bit vector values</title>
				<description><![CDATA[I am on <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">Java</a> 1.5 and the API <a class="snap_shots" href="http://java.sun.com/javase/7/docs/api/java/util/EnumSet.html" target="_new" rel="nofollow">http://java.sun.com/javase/7/docs/api/java/util/EnumSet.html</a> mentions that "Enum sets are represented internally as bit vectors.". Is it possible to get that bit value?<br /> <br /> The following pseudo code fragment shows what I'm trying to achieve as well as my question.<br /> <pre>
public class ExampleClass {
public Enum ServiceCapability 
{
   CAPABILITY0, // 1 &lt;&lt; 0
   CAPABILITY2, // 1 &lt;&lt; 1
   CAPABILITY4, // 1 &lt;&lt; 2
   CAPABILITY8; // 1 &lt;&lt; 3
}

public static void main(String[] args) 
{
  Set&lt;ServiceCapability&gt; serCap = EnumSet.allOf(ServiceCapability.class);
  /* Apparently the EnumSet is recommended to be used instead of bit fields
      however, I am not sure how to use the EnumSet to get the internal bit vector
      representations.
      I can modify the Enum that I have created to have a 'short' value that
      represents the corresponding bit values and that would work just fine.
      I am hoping that the JavaRanch community will have an answer for me.
  */
} 
} 
 </pre><br /> Thanks!]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/488011/2193451</guid>
				<link>http://www.coderanch.com/forums/posts/preList/488011/2193451</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 12:39:20 MDT]]></pubDate>
				<author><![CDATA[R Pervasive]]></author>
			</item>
			<item>
				<title>To protect folder</title>
				<description><![CDATA[Hi<br /> <br /> Iam working in small archive project I do not want to save the scanned picture in DB I want to save it in folder and I did this<br /> <br /> The problem I face is how can I protect the folder (not delete not open except from the program) is there any code can do that <br /> <br /> I try other way to save it in zip file but the problem is still is how to protect it (not delete not open except from the program)<br /> <br /> I saw in other archiving system it create virtual directory and save the pic into it, please help me with this problem<br /> <br /> best regard]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487984/2193297</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487984/2193297</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 09:21:47 MDT]]></pubDate>
				<author><![CDATA[Umar Hady]]></author>
			</item>
			<item>
				<title>ExceptionWrapping</title>
				<description><![CDATA[How and why do we use exception wrapping in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a>?  Any sample program would be really helpful.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487969/2193202</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487969/2193202</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 07:22:54 MDT]]></pubDate>
				<author><![CDATA[jose chiramal]]></author>
			</item>
			<item>
				<title>Java Wrapper get file list using wrapper service.</title>
				<description><![CDATA[Hai to all,<br />   I am using windows XP SP2.my question i call method rule engine it is recurrenece. it get a value for path in db.in network mapping the floder path correct.<br /> <br /> In run a wrapper but i not get listfile.in the program run normal service fine.it print a null pointer exception how to slove problem.<br /> <br /> Please any one help me.<br /> <br /> i search a internet the sloution not work.please tell detail description.<br /> <br /> 1) Start your application that runs as a windows service.<br /> 2) Go to Start -&gt; Setting -&gt; Control Panel -&gt; Administrative Tools -&gt; Services.<br /> 3) Search for your application service in that list. It would be listed by default as "Local System".<br /> 4) Now open properties for that service and goto "Log On" tab.<br /> 5) Change selection to "This Account" and browse the user account that you want to support for your service. In my case i selected Administrator.<br /> 6) Enter the appropriate password and apply the changes.<br /> 7) You may require to restart your Service to get the changes applied.<br />  :rolling: <br /> The Exception is,<br /> <br /> List File&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;null<br /> INFO   | jvm 1    | 2010/03/19 18:06:00 | Testingn**********null<br /> INFO   | jvm 1    | 2010/03/19 18:06:00 | <a href="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html" class="api" title="Java API" target="_new" rel="nofollow">java.lang.NullPointerException</a><br /> INFO   | jvm 1    | 2010/03/19 18:06:00 | 	at com.en.firstis.nat.ScheduleConfig.ScheuleConfigTimer.copyfileSchedule(ScheuleConfigTimer.java:192)<br /> INFO   | jvm 1    | 2010/03/19 18:06:00 | 	at com.en.firstis.nat.ScheduleConfig.copyScheduleConfig.run(copyScheduleConfig.java:24)<br /> INFO   | jvm 1    | 2010/03/19 18:06:00 | 	at java.lang.Thread.run(Thread.java:595).]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487962/2193178</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487962/2193178</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 06:51:12 MDT]]></pubDate>
				<author><![CDATA[manoj.r kumar]]></author>
			</item>
			<item>
				<title>Http Client post method data incomplete</title>
				<description><![CDATA[HI All,<br /> Im using apache http api for send data by post method.Actually im reading a text file and sending those values by post.if i send a single row of data im getting all the values correctly.but if its more than one im getting incomplete values for some fields <br /> <br /> <pre>  package com.sa.lsc.sys;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;

import com.sa.lsc.db.DBException;

public class IISLog {

	public static void main(String args[]) throws DBException {
		String ClientHost = null;
		String username = null;
		String LogTime = null;
		String service = null;
		String machine = null;
		String serverip = null;
		String processingtime = null;
		String bytesrecvd = null;
		String bytessent = null;
		String servicestatus = null;
		String win32status = null;
		String operation = null;
		String target = null;
		String parameters = null;
		String port = null;
		String servicesubstatus = null;
		String cookie = null;
		String serviceversion = null;
		String host = null;
		String useragent = null;
		String referer = null;
		HttpClient httpclient = null;
		PostMethod post = null;
		DataInputStream dis = null;
		String iisRecord = null;

		httpclient = new HttpClient();
		post = new PostMethod(
				&quot;http://vid-00biyut/MIS/Post/ScreeningPostData.aspx&quot;);
		try {
			FileInputStream fis = new FileInputStream(&quot;C:\\temp\\templog.txt&quot;);
			dis = new DataInputStream(fis);
			Pattern datePattern = Pattern
					.compile(&quot;(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2}) (\\w)&quot;);

			Matcher dateFinder = null;
			while ((iisRecord = dis.readLine()) != null) {
				dateFinder = datePattern.matcher(iisRecord);
				if (dateFinder.find()) {
					StringTokenizer st = new StringTokenizer(iisRecord, &quot; &quot;);
					while (st.hasMoreTokens()) {
						LogTime = st.nextToken() + &quot; &quot; + st.nextToken();
						service = st.nextToken();
						machine = st.nextToken();
						serverip = st.nextToken();
						operation = st.nextToken();
						target = st.nextToken();
						parameters = st.nextToken();
						port = st.nextToken();
						username = st.nextToken();
						ClientHost = st.nextToken();
						serviceversion = st.nextToken();
						useragent = st.nextToken();
						cookie = st.nextToken();
						referer = st.nextToken();
						host = st.nextToken();
						servicestatus = st.nextToken();
						servicesubstatus = st.nextToken();
						win32status = st.nextToken();
						bytessent = st.nextToken();
						bytesrecvd = st.nextToken();
						processingtime = st.nextToken();

						if (LogTime != null && service != null
								&& machine != null && serverip != null
								&& operation != null && target != null
								&& parameters != null && port != null
								&& username != null && ClientHost != null
								&& serviceversion != null && useragent != null
								&& cookie != null && referer != null
								&& host != null && servicestatus != null
								&& servicesubstatus != null
								&& win32status != null && bytessent != null
								&& bytesrecvd != null && processingtime != null) {
							NameValuePair[] data = {
									new NameValuePair(&quot;modulename&quot;, &quot;iislog&quot;),
									new NameValuePair(&quot;ClientHost&quot;, ClientHost.trim()),
									new NameValuePair(&quot;username&quot;, username.trim()),
									new NameValuePair(&quot;LogTime&quot;, LogTime.trim()),
									new NameValuePair(&quot;service&quot;, service.trim()),
									new NameValuePair(&quot;machine&quot;, machine.trim()),
									new NameValuePair(&quot;serverip&quot;, serverip.trim()),
									new NameValuePair(&quot;processingtime&quot;,
											processingtime.trim()),
									new NameValuePair(&quot;bytesrecvd&quot;, bytesrecvd.trim()),
									new NameValuePair(&quot;bytessent&quot;, bytessent.trim()),
									new NameValuePair(&quot;servicestatus&quot;,
											servicestatus.trim()),
									new NameValuePair(&quot;win32status&quot;,
											win32status.trim()),
									new NameValuePair(&quot;operation&quot;, operation.trim()),
									new NameValuePair(&quot;target&quot;, target.trim()),
									new NameValuePair(&quot;parameters&quot;, parameters.trim()),
									new NameValuePair(&quot;port&quot;, port.trim()),
									new NameValuePair(&quot;servicesubstatus&quot;,
											servicesubstatus.trim()),
									new NameValuePair(&quot;cookie&quot;, cookie.trim()),
									new NameValuePair(&quot;serviceversion&quot;,
											serviceversion.trim()),
									new NameValuePair(&quot;host&quot;, host.trim()),
									new NameValuePair(&quot;useragent&quot;, useragent.trim()),
									new NameValuePair(&quot;referer&quot;, referer.trim()),

							};
							
							post.setRequestBody(data);						

						try {
							httpclient.executeMethod(post);
							post.releaseConnection();
							System.out.println(&quot;ClientHost = &quot; + ClientHost);
							System.out.println(&quot;username = &quot; + username);
							System.out.println(&quot;LogTime) = &quot; + LogTime);
							System.out.println(&quot;service = &quot; + service);
							System.out.println(&quot;machine = &quot; + machine);
							System.out.println(&quot;serverip) = &quot; + serverip);
							System.out.println(&quot;processingtime = &quot;
									+ processingtime);
							System.out.println(&quot;bytesrecvd = &quot; + bytesrecvd);
							System.out.println(&quot;bytessent = &quot; + bytessent);
							System.out.println(&quot;servicestatus = &quot;
									+ servicestatus);
							System.out
									.println(&quot;win32status   = &quot; + win32status);
							System.out.println(&quot;operation   = &quot; + operation);
							System.out.println(&quot;target   = &quot; + target);
							System.out.println(&quot;parameters   = &quot; + parameters);
							System.out.println(&quot;port  = &quot; + port);
							System.out.println(&quot;servicesubstatus  = &quot;
									+ servicesubstatus);
							System.out.println(&quot;cookie  = &quot; + cookie);
							System.out.println(&quot;serviceversion  = &quot;
									+ serviceversion);
							System.out.println(&quot;host  = &quot; + host);
							System.out.println(&quot;useragent  = &quot; + useragent);
							System.out.println(&quot;referer  = &quot; + referer);
						} catch (HttpException e) {
						} catch (IOException e) {
							e.printStackTrace();
						}
					  }
					}
				}
			}
		}

		catch (IOException e) {

		} finally {

			if (dis != null) {
				try {
					dis.close();
				} catch (IOException ioe) {

				}

			}
		}
	}
}
  </pre><br /> <br /> Im getting all the values completely here in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> in S.O.P.but in .net request parameters the user agent and referer values are incomplete<br /> <br /> please let me know whats wrong in my code<br /> <br /> Thanks<br /> Rajesh]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487941/2193085</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487941/2193085</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 05:01:12 MDT]]></pubDate>
				<author><![CDATA[rajeshkannan sella]]></author>
			</item>
			<item>
				<title>Best reference book for project development in java.</title>
				<description><![CDATA[Hi Ranchers,<br /> <br />     Anybody can give me the  reference book for project development in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a>.<br /> <br /> Thanks.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487934/2193035</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487934/2193035</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 04:07:16 MDT]]></pubDate>
				<author><![CDATA[N Pateel]]></author>
			</item>
			<item>
				<title>Apache Velocity --How to access data from ArrayList </title>
				<description><![CDATA[Hi <br /> <br /> I am having  a query in displaying data from the <a href="http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html" class="api" title="Java API" target="_new" rel="nofollow">ArrayList</a> using Apache Velocity Framework.<br /> <br /> Here is a sample code :<br /> <br /> I am setting data inside the <a href="http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html" class="api" title="Java API" target="_new" rel="nofollow">ArrayList</a> as shown .<br /> <br /> <pre>ArrayList list = new ArrayList();
        list.add(&quot;TXNID001&quot;);
        list.add(&quot;89891898989889899&quot;);
        list.add(&quot;TXNID002&quot;);
        list.add(2,&quot;89891898989889800&quot;);
        list.add(&quot;TXNID003&quot;);
        list.add(2,&quot;89891898989889899&quot;);
context.put(&quot;list&quot;,list)</pre><br /> Now my requiremnt is that i  need to display the TXNID  and its related data as shown :<br /> <br /> <b>TXNID001                89891898989889899<br /> TXNID002                89891898989889800<br /> TXNID003                89891898989889899</b><br /> <br /> I started this way , but please help me to complete the whole thing <br /> <br /> <pre>
#foreach( $name in $list )
   
// Need Logic Here .

#end</pre><br /> <br /> Please share your views .<br /> <br /> Thanks in advance . <br /> <br /> <br /> <br /> <br /> <br />   ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487925/2193018</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487925/2193018</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 03:14:21 MDT]]></pubDate>
				<author><![CDATA[Ravi Kiran V]]></author>
			</item>
			<item>
				<title>JRE 1.6 and JRE 1.4 compatibility</title>
				<description><![CDATA[HI all,<br /> <br /> I have an application that uses JDK 1.4 and JRE 1.4 and it has swing components in it.<br /> <br /> Now users are upgrading their desktops to JRE 1.6.whether all the swing components work fine with JRE 1.6?<br /> <br /> Also is there any way so that JRE 1.6 behaves like JRE 1.4.Is there any command to set so that JRE 1.6 can run swing components assuming that as JRE 1.4.<br /> <br /> Please help me.Also is it necessary to upgrade our JDK to JDK 1.6 in this scenario(Users are just upgrading to JRE 1.6 on their desktops).Actually our application code resides on a unix server with JDK 1.4 and JRE 1.4 and users are sending requests to this server.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487910/2192959</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487910/2192959</link>
				<pubDate><![CDATA[Fri, Mar 19 2010 01:11:32 MDT]]></pubDate>
				<author><![CDATA[suresh nuzella]]></author>
			</item>
			<item>
				<title>What are ear,war and jar files ?</title>
				<description><![CDATA[EAR is enterprise archive file<br /> <br /> WAR is webarchive file<br /> <br /> JAR is javaarchive file.   I would like to know the difference between WAR and JAR.  Can i say WAR is nothing but JAR in zip format ?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487877/2192815</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487877/2192815</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 20:58:00 MDT]]></pubDate>
				<author><![CDATA[jose chiramal]]></author>
			</item>
			<item>
				<title>how to access and print the dwg files in java </title>
				<description><![CDATA[There is any <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> api available for accessing and printing dwg file in our application.<br /> <br /> Thanks in advance]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487871/2192764</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487871/2192764</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 18:31:14 MDT]]></pubDate>
				<author><![CDATA[v mag]]></author>
			</item>
			<item>
				<title>how do make a java application update itself</title>
				<description><![CDATA[I have a <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> application that is distributed to the public.  When the user starts the application it checks my web site for the latest version and if there is a newer version then the app downloads the JARfiles and places them in the appropriate locations.  BTW: this is a cross-platform app that runs on Windows, Mac OSX and Linux.  All this works so my question is this.  Once the download of the new JARs is complete, how to I tell my application to stop itself and then relaunch automatically.  <br /> <br /> Thanks in advance for any ideas and assistance.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487842/2192633</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487842/2192633</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 12:21:34 MDT]]></pubDate>
				<author><![CDATA[Harry Harding]]></author>
			</item>
			<item>
				<title>java -jar XXX does nothing</title>
				<description><![CDATA[Hi Guys : I exported a Jar from eclipse, and then, by issuing the command <br /> <br /> <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> -jar package.MyMainClass <br /> <br /> I expected to see some output, however, nothing happened.  <br /> <br /> What does this mean ?  Does this mean  that <br /> <br /> 1) The jar command is failing due to bad syntax --- I assume this is NOT the case ? <br /> <br /> or <br /> <br /> 2) The jar command syntax valid, but for some reason, it does not call the main method in my class.<br /> <br /> Thanks for any feedback.  <br /> <br /> PS I have tried exporting the jar with and without a defined executable run class... <br /> <br /> here is the jar creation script description below <br /> <br /> <pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
&lt;project default=&quot;create_run_jar&quot; name=&quot;Create Runnable Jar for Project Venn3&quot;&gt;
    &lt;!--this file was created by Eclipse Runnable JAR Export Wizard--&gt;
    &lt;!--ANT 1.7 is required                                        --&gt;
    &lt;target name=&quot;create_run_jar&quot;&gt;
        &lt;jar destfile=&quot;/Users/jax/Documents/workspace_venn/Venn3/venn3_core.jar&quot; filesetmanifest=&quot;mergewithoutmain&quot;&gt;
            &lt;manifest&gt;
                &lt;attribute name=&quot;Built-By&quot; value=&quot;${user.name}&quot;/&gt;
                &lt;attribute name=&quot;Main-Class&quot; value=&quot;jmolwrap.JayMolScript&quot;/&gt;
                &lt;attribute name=&quot;Class-Path&quot; value=&quot;.&quot;/&gt;
            &lt;/manifest&gt;
            &lt;fileset dir=&quot;/Users/jax/Documents/workspace_venn/Venn3/target/classes&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/Documents/workspace_venn/Venn3/biojava-1.7.1.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/commons-beanutils/commons-beanutils/1.8.2/commons-beanutils-1.8.2.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/uk/ac/ebi/uniprot/kraken/uniprotjapi/15.14/uniprotjapi-15.14.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-beans/2.0.5/spring-beans-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-core/2.0.5/spring-core-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-remoting/2.0.5/spring-remoting-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-aop/2.0.5/spring-aop-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-context/2.0.5/spring-context-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/org/springframework/spring-web/2.0.5/spring-web-2.0.5.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/log4j/log4j/1.2.8/log4j-1.2.8.jar&quot;/&gt;
            &lt;zipfileset excludes=&quot;META-INF/*.SF&quot; src=&quot;/Users/jax/.m2/repository/commons-lang/commons-lang/2.5/commons-lang-2.5.jar&quot;/&gt;
        &lt;/jar&gt;
    &lt;/target&gt;
&lt;/project&gt;

</pre>]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487827/2192558</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487827/2192558</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 10:41:28 MDT]]></pubDate>
				<author><![CDATA[jay vas]]></author>
			</item>
			<item>
				<title>Where can i download Ekahau SDK ?</title>
				<description><![CDATA[Where can i download Ekahau SDK ?<br /> Even i google but cannot find any link .<br /> Please help me ...... i know i may post wrong place .....]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487824/2192525</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487824/2192525</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 10:05:45 MDT]]></pubDate>
				<author><![CDATA[motress zlting]]></author>
			</item>
			<item>
				<title>Anonymous inner class and Exception Handling</title>
				<description><![CDATA[Hi all.<br /> <br /> I'm studying inner class and i don't understand why it isn't possible throw an anonymous inner class like following exemple:<br /> <pre>throw new AnonymousInnerClass() {
    //class body
};</pre><br /> <br /> Regards<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487815/2192474</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487815/2192474</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 09:13:54 MDT]]></pubDate>
				<author><![CDATA[Marco Pacini]]></author>
			</item>
			<item>
				<title>Reassigning class variable</title>
				<description><![CDATA[<pre>   class Test3
{
   int i = 3;
   public static void main (String [] args)
   {
      Test3 obj1 = new Test3 ();
      System.out.println (&quot;obj1.i = &quot; + obj1.i);
      obj1.printHello ();
      Test3 obj2 = new Test3 ();
      obj1.i = 5;  // can we reassign ?  I know its compiles perfectly, but was wondering how we could reassign the variable i ? Doesnt the compiler compain ?
      System.out.println (&quot;obj1.i = &quot; + obj1.i);
      obj1.printHello ();
      System.out.println (&quot;obj2.i = &quot; + obj2.i);
      obj2.printHello ();
   }
   void printHello ()
   {
      System.out.println (&quot;Hello! i = &quot; + i + &quot;\n&quot;);
   }
}
 </pre>Here i is a class variable, are we allowed to change value assigned to class varaible ?<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487785/2192294</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487785/2192294</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 06:20:48 MDT]]></pubDate>
				<author><![CDATA[jose chiramal]]></author>
			</item>
			<item>
				<title>Loop for players</title>
				<description><![CDATA[Hi guys,<br /> <br /> Currently programming a game in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> in which i want to have the below:-<br /> 1.  user can play with computer.<br /> 2. user can choose to select from 2 to 4 players.<br /> <br /> So far i can only make 2 players work using the following method.<br /> <br /> public void changePlayer () {<br /> <br /> 	// loop for currentPlayer<br /> <br />         if (currentPlayer == player1) {<br />                 currentPlayer = player2;<br />         } else if (currentPlayer == player2) {<br />                 currentPlayer = player1;<br />         }<br /> <br /> 1. How can make the computer be the player? <br /> 2. How can i add up to 4 players in this loop?<br />     (tried to make more than 2 player in the above but the token is not moving.<br /> 3. Thought of using a loop like but bit confused how to make it.<br />    	for (int i = 0; i&lt;4; i++)<br /> <br /> Thanks in advance.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487783/2192280</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487783/2192280</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 06:06:51 MDT]]></pubDate>
				<author><![CDATA[Dheesan Dabycharun]]></author>
			</item>
			<item>
				<title>Sorted Collection that allows duplicates?</title>
				<description><![CDATA[Hi,<br /> <br /> After a short troubleshooting session where I couldn't understand why my in-my-eyes sorted <a href="http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html" class="api" title="Java API" target="_new" rel="nofollow">PriorityQueue</a> spat out it's elements in an unsorted manner I read the javadoc and realized that the iterator of the <a href="http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html" class="api" title="Java API" target="_new" rel="nofollow">PriorityQueue</a> is free to return elements in any order it likes basically. In other words, a <a href="http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html" class="api" title="Java API" target="_new" rel="nofollow">PriorityQueue</a> can't be regarded as a sorted Collection. The reason a <a href="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html" class="api" title="Java API" target="_new" rel="nofollow">TreeSet</a> is not an option is that i need the collection to allow duplicates. And I want it to always be sorted, without using Collections.sort().<br /> <br /> I'm not gonna ask about the reasons for this behavior of the <a href="http://java.sun.com/javase/6/docs/api/java/util/PriorityQueue.html" class="api" title="Java API" target="_new" rel="nofollow">PriorityQueue</a>, since the discussion <a class="snap_shots" href="http://forums.sun.com/thread.jspa?threadID=5318502" target="_new" rel="nofollow">here</a> covers that quite nicely. What I do want to ask, however, is if there are any alternatives out there that I don't know of?<br /> <br /> So, to summarize, what I need is a Collection that:<br /> <br /> <li>allows duplicates</li><li>is always sorted (by natural order or a Comparator)</li><li>the Iterator gives me the elements in sorted order</li><br /> <br /> Is there such a Collection in the <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">Java</a> API? Or are my requirements too far-fetched? Any suggestions on the best and cleanest way to solve this? And performance is not a concern for me, since in total the collection will never contain more then say a few hundred elements.<br /> <br /> Regards<br /> /Jimi]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487775/2192243</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487775/2192243</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 05:13:39 MDT]]></pubDate>
				<author><![CDATA[Jimi Svedenholm]]></author>
			</item>
			<item>
				<title>regarding javadoc</title>
				<description><![CDATA[Hi All, <br />           As part of my project i was asked to generate javadoc for the code.<br />           I have done it using javadoc ant target.<br />           But for most of the classes the javadoc is missing both class level and method level.<br />           I was asked to list out for which classes and methods the javadoc comments are missing.<br />           Easy there any simple way to generate such report or do i need manually go to every class and check it.<br /> <br /> <br /> Thanks in advance,<br /> Bala.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487770/2192224</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487770/2192224</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 04:33:33 MDT]]></pubDate>
				<author><![CDATA[Bala Gangadhar]]></author>
			</item>
			<item>
				<title>Working on a project.</title>
				<description><![CDATA[Hi Ranchers,<br />                          I am trying to work on a sample <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> project. Please let me know what points to consider first.<br />                          database design or screen design. If the steps are given then it will be very good.<br /> Thanks.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487769/2192221</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487769/2192221</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 04:26:42 MDT]]></pubDate>
				<author><![CDATA[N Pateel]]></author>
			</item>
			<item>
				<title>how to reload classes without restaring tomcat</title>
				<description><![CDATA[ hi,<br /> <br /> Is there any Way to load only one folder with out restarting tomcat <br /> <br /> In my application i am writing a <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> class and compiling it dynamically using compiler api whose .class got creates in some folder of tomcats application directory,<br /> <br /> Here i need to restart the tomcat automatically  whenever a new .class got generated in that folder .<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487763/2192183</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487763/2192183</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 03:34:29 MDT]]></pubDate>
				<author><![CDATA[satya saha]]></author>
			</item>
			<item>
				<title>maximum number of element a HashMap can hold</title>
				<description><![CDATA[Hi there,<br /> <br /> Just looking for the confirmation from experts here. I went through many threads regarding hashmap max capacity. Some people says it depends on memory as hashmap can grow <br /> dynamically. I have one double, if I am not wrong hashmap internally uses array to hold it's elements and array size is in int, and maximum size of int in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> is 2^31-1. So the max capacity of hash map is also 2^31-1 isn't it ??!!<br /> <br /> Please clear the double ?<br /> <br /> Thanks,<br /> Bharat]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487761/2192164</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487761/2192164</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 03:13:24 MDT]]></pubDate>
				<author><![CDATA[Bharat Makwana]]></author>
			</item>
			<item>
				<title>Graphics Help</title>
				<description><![CDATA[How do we read a jpeg image in <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> and retrieve geometric shapes present in the image.e.g if we read an image from some tomb then how will we be able to recognize/identify the pattern or retrieve the geometric shapes present in the image???]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487755/2192120</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487755/2192120</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 02:41:42 MDT]]></pubDate>
				<author><![CDATA[AliKuli Khan]]></author>
			</item>
			<item>
				<title>Colletion class to to find unique elements </title>
				<description><![CDATA[Hi All,<br /> <br /> I need some solution for the below scenario,<br /> <br /> I have an array Temp[], this stores data as a name value pair eg: {name=name value=A; name=city value=B; name=state value=C} - Temp[0]<br />                                                                   {name=name value=X; name=city value=Y; name=state value=Z} - Temp[1]<br /> 								  {name=name value=L; name=city value=M; name=state value=N} - Temp[2]<br /> <br /> <br /> I have to check the unique count of the entries in this array. How do i do it? Please let me know. If the array contains <br />  {name=name value=A; name=city value=B; name=state value=C} - Temp[3],  It should consider this as duplicate entry in that array.  Which collection class do i need to store this kind of data.<br /> <br /> Thanks,<br /> San]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487754/2192118</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487754/2192118</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 02:38:59 MDT]]></pubDate>
				<author><![CDATA[Ashuthosh san]]></author>
			</item>
			<item>
				<title>how to get only non-blank cells in excel by java Excel api</title>
				<description><![CDATA[Hi,<br />  <br />    am trying to get total no.of rows from excel sheet with this code.<br /> <pre>
 int numOfRows = s.getRows();
		   	 	    int numOfColumns = s.getColumns();          


for(int x=21;x&lt;numOfRows;x++)
	   	 	    {
	   	 	    	for(int y=0;y&lt;numOfColumns-1;y++)
	   	 	    	{
	   	 	    	       if(sheet.getCell(y,x).getContents()!=null)
                                          {
	   	 	    		   
                                                     //code to get ...
	   	 	    			   	 	    	
	   	 	                        }
	   	 	    		
	   	 	    } 
    </pre><br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487744/2192071</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487744/2192071</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 01:29:54 MDT]]></pubDate>
				<author><![CDATA[indu yeturu]]></author>
			</item>
			<item>
				<title>Creating Own Object in Method</title>
				<description><![CDATA[Hi, people,<br /> Why is it legal to create object of own class from a method?<br /> Thank You.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487732/2192029</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487732/2192029</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 00:31:14 MDT]]></pubDate>
				<author><![CDATA[Debojit Sinha]]></author>
			</item>
			<item>
				<title>Call javascript from Java</title>
				<description><![CDATA[Hai,<br /> <br />   I want to call a javascript funtion from a <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> code.<br /> Is their a way to do it?(Is their any Class to call javascript from Java).<br /> <br /> Im working in a struts1.29 application.<br /> <br /> Thank You<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487731/2192019</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487731/2192019</link>
				<pubDate><![CDATA[Thu, Mar 18 2010 00:19:05 MDT]]></pubDate>
				<author><![CDATA[sindhu sheela]]></author>
			</item>
			<item>
				<title>Threads</title>
				<description><![CDATA[Threads share the heap spaces so it is not thread-safe  and the threads have their own stack space, which is thread-safe.<br /> <br /> <br /> What does the above statement mean ?  ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487718/2191959</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487718/2191959</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 23:07:13 MDT]]></pubDate>
				<author><![CDATA[jose chiramal]]></author>
			</item>
			<item>
				<title>DailyRollingFileHandler -— Files should be rotated on a daily basis</title>
				<description><![CDATA[We have a requirment which requires to have an Handler that is extended from <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">Java</a> logging and allows to have the files rotated on daily basis.<br /> <br /> Currently Java util logging do have the support of rotation based on file size by using File Handler. It doesnt support rotation on daily basis. <a class="snap_shots" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6350749" target="_blank" rel="nofollow">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6350749</a><br /> <br /> So , what we are looking is for such an appender that allows daily rotation . We would like to write such handler and which is the appropriate handler to extend for ... <a href="http://java.sun.com/javase/6/docs/api/java/util/logging/StreamHandler.html" class="api" title="Java API" target="_new" rel="nofollow">StreamHandler</a> or <a href="http://java.sun.com/javase/6/docs/api/java/util/logging/FileHandler.html" class="api" title="Java API" target="_new" rel="nofollow">FileHandler</a> ? And other questions are , is there way we can configure 2 different files for a single handler say <a href="http://java.sun.com/javase/6/docs/api/java/util/logging/FileHandler.html" class="api" title="Java API" target="_new" rel="nofollow">FileHandler</a> say for eg , we would like some kind of messages need to be captured in one file and other messages in other file.<br /> <br /> Would appreciate for any comments.<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487711/2191927</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487711/2191927</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 22:26:08 MDT]]></pubDate>
				<author><![CDATA[Dyann Sri]]></author>
			</item>
			<item>
				<title>static methods multiple calls</title>
				<description><![CDATA[<br /> Hi -<br /> <br /> What happens when multiple instances call a class's static method? How does JVM handle multiple calls to that method? Will each instance has its own execution part or are the requests queued?<br /> <br /> Thanks,]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487694/2191813</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487694/2191813</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 18:03:28 MDT]]></pubDate>
				<author><![CDATA[Suma Rangaraj]]></author>
			</item>
			<item>
				<title>Not understanding the use of Parameterized return types</title>
				<description><![CDATA[Fairly new to Generics, and despite my best effort, I can't figure out what it is I'm missing.<br /> I've defined the following class that compiles without error (ancillary code omitted):<br /> <pre>
public class DataMap&lt;V extends ConversionElement&gt; {

    protected Collection&lt;V&gt; ConversionElements() {
        Collection&lt;V&gt; v = _mConversionNameToConversion.values();
        return v;
    }
}
</pre><br /> Why is it that in client code, I can never get past a compiler error on the variable declaration "ConversionElement e" when I try to do this with an instance of DataMap?<br /> <pre>for (ConversionElement e : dataMap.ConversionElements()) {
     .
     .
     .
}</pre><br /> The compiler error is "Incompatible Types, Required <b><font color='red'>ConversionElement</font></b>, Found Object." Why does the compiler think that ConversionElements() returns a Collection of Object instead of a Collection of ConversionElement, and forces me to do this?<br /> <pre>for (Object e : dataMap.ConversionElements()) {
     .
     .
     .
}</pre>]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487692/2191803</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487692/2191803</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 17:47:44 MDT]]></pubDate>
				<author><![CDATA[James Gary]]></author>
			</item>
			<item>
				<title>Recursive Descent Parser Question</title>
				<description><![CDATA[I have a recursive descent parser that I've built to check the syntax of a program that I am interpreting. My parser is set up as a chain of private methods that are of type void. <br /> Is it wrong for me to use a return statement to exit a void method?<br /> <br /> -Hunter]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487691/2191798</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487691/2191798</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 17:24:11 MDT]]></pubDate>
				<author><![CDATA[Hunter McMillen]]></author>
			</item>
			<item>
				<title>java and IMG </title>
				<description><![CDATA[hi all,<br /> <br /> I have a IMG( image file type dot IMG) file containing 3 images.(IMG contain 3 images). and i need to<br /> print it through <a href="http://www.javaranch.com" class="faq" title="A Friendly Place for Java Greenhorns" target="_new">java</a> 2D graphics. But have a problem of<br /> reading IMG and getting the required images (Image or bufferedImage cannot specify the required image). If anybody know how to read each image from IMG please forward.<br /> <br /> indika<br /> [removed the email address - please <a href="http://faq.javaranch.com/java/UseTheForumNotEmail" class="faq" title="JavaRanch FAQ" target="_new" rel="nofollow">UseTheForumNotEmail</a>]]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487667/2191676</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487667/2191676</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 13:01:12 MDT]]></pubDate>
				<author><![CDATA[indika lakmal]]></author>
			</item>
			<item>
				<title>Java Programming Help (conversions)</title>
				<description><![CDATA[I am currently writing a program which will perform binary to decimal, decimal to binary, hexadecimal to decimal, decimal to hexadecimal conversions, 1's compliment, 2's compliment, and show the list of boolean algebra rules. <br /> <br /> I have created the GUI however, I cannot figure out how to make the Jbuttons generate the coding needed for a binary to decimal conversion of the input in a <a href="http://java.sun.com/javase/6/docs/api/javax/swing/JTextField.html" class="api" title="Java API" target="_new" rel="nofollow">JTextField</a>. The code is below: <br /> <br /> <br /> <pre>   

package swing1;

/**
 *
 * @author James
 */
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.io.*;


public class swing {

    public static void main (String[] args) {

        JFrame frame = new JFrame(&quot;Computer Architecture Conversions&quot;);
        frame.setVisible(true);
        frame.setSize(500,500);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        JPanel panel = new JPanel ();
        frame.add(panel);

        JButton button = new JButton (&quot;Binary to Decimal&quot;) ;
        JButton button2 = new JButton (&quot;Decimal to Binary&quot;);
        JButton button3 = new JButton (&quot;Decimal to Hexadecimal&quot;);
        JButton button4 = new JButton (&quot;Hexadecimal to Decimal&quot;);
        JButton button5 = new JButton (&quot;Library of Boolean Algebra Rules&quot;);
        JButton button6 = new JButton (&quot;1's Complement&quot;);
        JButton button7 = new JButton (&quot;2's Complement&quot;);
        panel.add(button);
        panel.add(button2);
        panel.add(button3);
        panel.add(button4);
        panel.add(button5);
        panel.add(button6);
        panel.add(button7);
        button.addActionListener(new Action());
        button2.addActionListener(new Action2());
        button3.addActionListener(new Action3());
        button4.addActionListener(new Action4());
        button5.addActionListener(new Action5());
        button6.addActionListener(new Action6());
        button7.addActionListener(new Action7());
    }
        static class Action implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame2 = new JFrame (&quot;Binary to Decimal Conversion&quot;);
            frame2.setVisible(true);
            frame2.setSize(500,300);
            JLabel label = new JLabel (&quot;Binary&quot;);
            JPanel panel = new JPanel();
            JButton b2d = new JButton(&quot;Convert to Decimal Now!&quot;);
            JTextField text = new JTextField(25);
            frame2.add(panel);
            panel.add(text);
            panel.add(label);
            panel.add(b2d);
            }
        }

        static class Action2 implements ActionListener{
            
            public void actionPerformed (ActionEvent e){
            JFrame frame3 = new JFrame (&quot;Decimal to Binary Conversion&quot;);
            frame3.setVisible(true);
            frame3.setSize(500,300);
            JLabel label = new JLabel (&quot;Decimal&quot;);
            JPanel panel = new JPanel();
            JButton d2b = new JButton(&quot;Convert to Binary Now!&quot;);
            JTextField text = new JTextField(25);
            frame3.add(panel);
            panel.add(text);
            panel.add(label);
            panel.add(d2b);
                
            }
        }

         static class Action3 implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame4 = new JFrame (&quot;Decimal to Hexadecimal Conversion&quot;);
            frame4.setVisible(true);
            frame4.setSize(500,300);
            JLabel label = new JLabel (&quot;Decimal&quot;);
            JPanel panel = new JPanel();
            JButton d2h = new JButton(&quot;Convert to Hexadecimal Now!&quot;);
            JTextField text = new JTextField(25);
            frame4.add(panel);
            panel.add(text);
            panel.add(label);
            panel.add(d2h);
            }
        }
     static class Action4 implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame5 = new JFrame (&quot;Hexadecimal to Decimal Conversion&quot;);
            frame5.setVisible(true);
            frame5.setSize(500,300);
            JLabel label = new JLabel (&quot;Hexadecimal&quot;);
            JPanel panel = new JPanel();
            JButton h2d = new JButton(&quot;Convert to Decimal Now!&quot;);
            JTextField text = new JTextField(25);
            frame5.add(panel);
            panel.add(text);
            panel.add(label);
            panel.add(h2d);
            }
        }

    static class Action5 implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame6 = new JFrame (&quot;Library of Boolean Algebra Rules&quot;);
            frame6.setVisible(true);
            frame6.setSize(500,300);
            JLabel label = new JLabel (&quot;You clicked me!&quot;);
            JPanel panel = new JPanel();
            frame6.add(panel);
            panel.add(label);
            }
        }

     static class Action6 implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame7 = new JFrame (&quot;1's Complement Conversion&quot;);
            frame7.setVisible(true);
            frame7.setSize(500,300);
            JLabel label = new JLabel (&quot;You clicked me!&quot;);
            JPanel panel = new JPanel();
            frame7.add(panel);
            panel.add(label);
            }
        }

     static class Action7 implements ActionListener{

            public void actionPerformed (ActionEvent e){
            JFrame frame8 = new JFrame (&quot;2's Complement Conversion&quot;);
            frame8.setVisible(true);
            frame8.setSize(500,300);
            JLabel label = new JLabel (&quot;You clicked me!&quot;);
            JPanel panel = new JPanel();
            frame8.add(panel);
            panel.add(label);
            }
        }
    }




 </pre><br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487663/2191650</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487663/2191650</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 12:00:53 MDT]]></pubDate>
				<author><![CDATA[James Wmurphy]]></author>
			</item>
			<item>
				<title>Regarding static</title>
				<description><![CDATA[Hi<br /> <br />        I have one doubt that is in static method we can not use non static variable then how it is possible in public static void main(String args[]) can you explain<br /> <br /> <br /> <br /> <br /> <br />                                      Thanking you.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487662/2191647</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487662/2191647</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 11:57:31 MDT]]></pubDate>
				<author><![CDATA[santhosh kumar vk]]></author>
			</item>
			<item>
				<title>difference between two double variables</title>
				<description><![CDATA[<pre>  public static void main(String[] args) {
		double a = 20.01;
		double b = 10.00;
		System.out.println(a-b);
		
	}
  </pre><br /> <br /> it is giving me out put as :: 10.010000000000002 insted of 10.01<br /> <br /> May i know why it is giving me like that??<br /> <br /> Regards,<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/487608/2191314</guid>
				<link>http://www.coderanch.com/forums/posts/preList/487608/2191314</link>
				<pubDate><![CDATA[Wed, Mar 17 2010 06:27:06 MDT]]></pubDate>
				<author><![CDATA[rajanikanth bhagavan kanth]]></author>
			</item>
	</channel>
</rss>
