<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - Java</title>
		<link>http://www.daniweb.com/forums</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Fri, 25 Jul 2008 08:05:08 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/forums/myimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - Java</title>
			<link>http://www.daniweb.com/forums</link>
		</image>
		<item>
			<title>Running program as a domain user</title>
			<link>http://www.daniweb.com/forums/thread136638.html</link>
			<pubDate>Fri, 25 Jul 2008 05:53:38 GMT</pubDate>
			<description><![CDATA[Hi

I am making a program, and this program is supposed to overwrite a file on a network drive. But I get a FileNotFoundException "filename" (Access Denied), even though I have the authority to do anything on this network drive. Can I provide my program with my password and username and make it...]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I am making a program, and this program is supposed to overwrite a file on a network drive. But I get a FileNotFoundException &quot;filename&quot; (Access Denied), even though I have the authority to do anything on this network drive. Can I provide my program with my password and username and make it &quot;pretend&quot; it's me? <br />
<br />
Btw: I don't know if this is relevant information, but I am not prompted for a password or username when accessing the network drive in windows..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>kjellih</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136638.html</guid>
		</item>
		<item>
			<title>How do you save a JPanel as a GIF file?</title>
			<link>http://www.daniweb.com/forums/thread136630.html</link>
			<pubDate>Fri, 25 Jul 2008 05:04:36 GMT</pubDate>
			<description><![CDATA[I've made a small program that draws black rectangles on a JPanel at random places.  I would like to give the user the option to save this JPanel as a .gif file, but I'm not sure where to start.  The function I need to write is SaveJPanelAsGIF below on line 36.  Can anyone point me in the right...]]></description>
			<content:encoded><![CDATA[<div>I've made a small program that draws black rectangles on a JPanel at random places.  I would like to give the user the option to save this JPanel as a .gif file, but I'm not sure where to start.  The function I need to write is SaveJPanelAsGIF below on line 36.  Can anyone point me in the right direction please?  Thanks.<br />
<br />
<pre style="margin:20px; line-height:13px">// SaveAsGIF.java<br />
<br />
import java.awt.*;<br />
import java.awt.event.*;<br />
import java.io.*;<br />
import javax.swing.*;<br />
&nbsp;<br />
public class SaveAsGIF extends JFrame<br />
{<br />
&nbsp; &nbsp; ButtonPanel buttonPanel;<br />
&nbsp; &nbsp; CanvasPanel canvasPanel;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public static void main(String&#91;&#93; args) <br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; SaveAsGIF sag = new SaveAsGIF();<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public SaveAsGIF()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setTitle(&quot;Save JPanel As GIF&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setVisible(true);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setSize(600, 600);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setLayout(new BorderLayout());<br />
&nbsp; &nbsp; &nbsp; &nbsp; canvasPanel = new CanvasPanel(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp; buttonPanel = new ButtonPanel(this, canvasPanel);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.add(buttonPanel, BorderLayout.NORTH);<br />
&nbsp; &nbsp; &nbsp; &nbsp; buttonPanel.setPreferredSize(new Dimension(600, 100));&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.add(buttonPanel, BorderLayout.NORTH);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.add(canvasPanel, BorderLayout.SOUTH);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.pack();<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setDefaultCloseOperation(EXIT_ON_CLOSE);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public void SaveJPanelAsGIF (JPanel jp)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; // not sure what to do here.<br />
&nbsp; &nbsp; }<br />
}</pre>
<br />
<pre style="margin:20px; line-height:13px">// ButtonPanel.java<br />
<br />
import java.awt.*;<br />
import java.awt.event.*;<br />
import java.io.*;<br />
import javax.swing.*;<br />
<br />
<br />
public class ButtonPanel extends JPanel implements ActionListener<br />
{<br />
&nbsp; &nbsp;  JButton drawButton;<br />
&nbsp; &nbsp;  JButton saveButton;<br />
&nbsp; &nbsp;  CanvasPanel cp;<br />
&nbsp; &nbsp;  SaveAsGIF savegif;<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp;  public ButtonPanel(SaveAsGIF se, CanvasPanel canPanel)<br />
&nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  savegif = se;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cp = canPanel;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  this.setBackground(Color.RED);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  this.setPreferredSize(new Dimension(600, 100));<br />
&nbsp; &nbsp; &nbsp; &nbsp;  LayoutManager lm = new GridLayout(1, 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  drawButton = new JButton (&quot;Draw New Rectangle&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  saveButton = new JButton (&quot;Save Canvas Panel as GIF&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  drawButton.addActionListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  saveButton.addActionListener(this);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  this.setLayout(lm);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  this.add(drawButton);<br />
&nbsp; &nbsp; &nbsp; &nbsp;  this.add(saveButton);<br />
&nbsp; &nbsp;  } <br />
<br />
&nbsp; &nbsp;  public void actionPerformed(ActionEvent e) <br />
&nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Object obj = e.getSource();<br />
&nbsp; &nbsp; &nbsp; &nbsp;  if (obj == drawButton)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cp.NewDrawing();<br />
&nbsp; &nbsp; &nbsp; &nbsp;  else if (obj == saveButton)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  savegif.SaveJPanelAsGIF(cp);<br />
&nbsp; &nbsp;  }<br />
}</pre>
<br />
<pre style="margin:20px; line-height:13px">// CanvasPanel.java<br />
<br />
import java.awt.*;<br />
import java.awt.event.*;<br />
import java.io.*;<br />
import javax.swing.*;<br />
import java.util.*;<br />
<br />
<br />
class CanvasPanel extends JPanel<br />
{<br />
&nbsp; &nbsp; int x;<br />
&nbsp; &nbsp; int y;<br />
&nbsp; &nbsp; int length;<br />
&nbsp; &nbsp; int width;<br />
&nbsp; &nbsp; Random random;<br />
&nbsp; &nbsp; SaveAsGIF savegif;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public CanvasPanel(SaveAsGIF se)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; savegif = se;<br />
&nbsp; &nbsp; &nbsp; &nbsp; x = 100;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y = 100;<br />
&nbsp; &nbsp; &nbsp; &nbsp; length = 200;<br />
&nbsp; &nbsp; &nbsp; &nbsp; width = 100;<br />
&nbsp; &nbsp; &nbsp; &nbsp; random = new Random();<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setBackground(Color.GREEN);<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.setPreferredSize(new Dimension(600, 500));<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; public void paintComponent(Graphics g)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; super.paintComponent(g);<br />
&nbsp; &nbsp; &nbsp; &nbsp; g.setColor(Color.BLACK);<br />
&nbsp; &nbsp; &nbsp; &nbsp; g.fillRect(x, y, width, length);<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; public void NewDrawing()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; x = random.nextInt(100) + 50;<br />
&nbsp; &nbsp; &nbsp; &nbsp; y = random.nextInt(100) + 50;<br />
&nbsp; &nbsp; &nbsp; &nbsp; width = random.nextInt(100) + 50;<br />
&nbsp; &nbsp; &nbsp; &nbsp; length = random.nextInt(100) + 150;<br />
&nbsp; &nbsp; &nbsp; &nbsp; repaint();<br />
&nbsp; &nbsp; }&nbsp;  <br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>VernonDozier</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136630.html</guid>
		</item>
		<item>
			<title>JComboBox problems</title>
			<link>http://www.daniweb.com/forums/thread136603.html</link>
			<pubDate>Fri, 25 Jul 2008 01:56:23 GMT</pubDate>
			<description>Hi all.  I have this assignment to show a panel to allow users to dynamically alter FlowLayout manager parameters.  It doesnt look that pretty, but functionally it is working for the most part.  I have most of it up and running, but I simply cannot get the JComboBox working.  I have to use this to...</description>
			<content:encoded><![CDATA[<div>Hi all.  I have this assignment to show a panel to allow users to dynamically alter FlowLayout manager parameters.  It doesnt look that pretty, but functionally it is working for the most part.  I have most of it up and running, but I simply cannot get the JComboBox working.  I have to use this to set the alignment parameter: left, right, or center.  How do I go about detecting the selection and then having that alter my settings?  Thanks in advance for any help/advice/tips.  My code thus far is:<br />
<br />
<pre style="margin:20px; line-height:13px">// Exercise28_1: Demonstrate FlowLayout properties<br />
import java.awt.*;<br />
import java.awt.event.*;<br />
import java.applet.*;<br />
import javax.swing.*;<br />
import javax.swing.border.*;<br />
<br />
public class Exercise28_1 extends JApplet {<br />
&nbsp; boolean isStandalone = false;<br />
&nbsp; JPanel jpComponents = new JPanel();<br />
&nbsp; JPanel jPanel2 = new JPanel();<br />
&nbsp; JPanel jpAlignment = new JPanel();<br />
&nbsp; FlowLayout flowLayout1 = new FlowLayout();<br />
&nbsp; JLabel jLabel1 = new JLabel();<br />
&nbsp; JPanel jPanel3 = new JPanel();<br />
&nbsp; FlowLayout flowLayout2 = new FlowLayout();<br />
&nbsp; JPanel jPanel4 = new JPanel();<br />
&nbsp; BorderLayout borderLayout1 = new BorderLayout();<br />
&nbsp; JComboBox jtfAlignment = new JComboBox(new Object&#91;&#93;<br />
&nbsp; {&quot;Left&quot;, &quot;Center&quot;, &quot;Right&quot;});<br />
&nbsp; FlowLayout flowLayout3 = new FlowLayout();<br />
&nbsp; JLabel jLabel3 = new JLabel();<br />
&nbsp; JLabel jLabel4 = new JLabel();<br />
&nbsp; JPanel jpGaps = new JPanel();<br />
&nbsp; BorderLayout borderLayout2 = new BorderLayout();<br />
&nbsp; JTextField jtfHGap = new JTextField();<br />
&nbsp; JTextField jtfVGap = new JTextField();<br />
&nbsp; FlowLayout flowLayout4 = new FlowLayout();<br />
&nbsp; FlowLayout flowLayout5 = new FlowLayout();<br />
&nbsp; JPanel jPanel5 = new JPanel();<br />
&nbsp; JPanel jPanel6 = new JPanel();<br />
&nbsp; FlowLayout flowLayout = new FlowLayout();<br />
&nbsp; TitledBorder titledBorder1;<br />
&nbsp; TitledBorder titledBorder2;<br />
<br />
&nbsp; //Construct the applet<br />
&nbsp; public Exercise28_1() {<br />
&nbsp; &nbsp; titledBorder1 = new TitledBorder(&quot;&quot;);<br />
&nbsp; &nbsp; titledBorder2 = new TitledBorder(&quot;&quot;);<br />
&nbsp; &nbsp; this.setSize(new Dimension(400,300));<br />
&nbsp; &nbsp; jPanel2.setLayout(flowLayout1);<br />
&nbsp; &nbsp; jLabel1.setText(&quot;Alignment&quot;);<br />
&nbsp; &nbsp; jPanel3.setLayout(flowLayout2);<br />
&nbsp; &nbsp; jpAlignment.setLayout(borderLayout1);<br />
&nbsp; &nbsp; jPanel4.setLayout(flowLayout3);<br />
&nbsp; &nbsp; jLabel3.setText(&quot;HGap&quot;);<br />
&nbsp; &nbsp; jLabel4.setText(&quot;VGap&quot;);<br />
&nbsp; &nbsp; jpGaps.setLayout(borderLayout2);<br />
&nbsp; &nbsp; jPanel5.setLayout(flowLayout4);<br />
&nbsp; &nbsp; jPanel6.setLayout(flowLayout5);<br />
&nbsp; &nbsp; jpComponents.setLayout(flowLayout);<br />
<br />
&nbsp; &nbsp; jtfHGap.addActionListener(new java.awt.event.ActionListener() {<br />
&nbsp; &nbsp; &nbsp; public void actionPerformed(ActionEvent e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; jtfHGap_actionPerformed(e);<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; });<br />
&nbsp; &nbsp; jtfVGap.addActionListener(new java.awt.event.ActionListener() {<br />
&nbsp; &nbsp; &nbsp; public void actionPerformed(ActionEvent e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; jtfVGap_actionPerformed(e);<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; });<br />
&nbsp; &nbsp; jpComponents.setBorder(titledBorder1);<br />
&nbsp; &nbsp; jPanel2.setBorder(titledBorder2);<br />
&nbsp; &nbsp; titledBorder1.setTitle(&quot;Container of FlowLayout&quot;);<br />
&nbsp; &nbsp; titledBorder2.setTitle(&quot;FlowLayout Properties&quot;);<br />
&nbsp; &nbsp; this.getContentPane().add(jpComponents, BorderLayout.CENTER);<br />
&nbsp; &nbsp; this.getContentPane().add(jPanel2, BorderLayout.SOUTH);<br />
&nbsp; &nbsp; jPanel2.add(jpAlignment, null);<br />
&nbsp; &nbsp; jpAlignment.add(jPanel3, BorderLayout.WEST);<br />
&nbsp; &nbsp; jPanel3.add(jLabel1, null);<br />
&nbsp; &nbsp; jpAlignment.add(jPanel4, BorderLayout.CENTER);<br />
&nbsp; &nbsp; jPanel4.add(jtfAlignment, null);<br />
&nbsp; &nbsp; jPanel2.add(jpGaps, null);<br />
&nbsp; &nbsp; jpGaps.add(jPanel5, BorderLayout.WEST);<br />
&nbsp; &nbsp; jPanel5.add(jLabel3, null);<br />
&nbsp; &nbsp; jPanel5.add(jLabel4, null);<br />
&nbsp; &nbsp; jpGaps.add(jPanel6, BorderLayout.CENTER);<br />
&nbsp; &nbsp; jPanel6.add(jtfHGap, null);<br />
&nbsp; &nbsp; jPanel6.add(jtfVGap, null);<br />
<br />
&nbsp; &nbsp; // Add 15 buttons to jpComponents<br />
&nbsp; &nbsp; for (int i = 0; i &lt; 15; i++)<br />
&nbsp; &nbsp; &nbsp; jpComponents.add(new JButton(&quot;Component &quot; + i));<br />
&nbsp; }<br />
<br />
&nbsp; void jtfHGap_actionPerformed(ActionEvent e) {<br />
&nbsp; &nbsp; int hgap = new Integer(jtfHGap.getText()).intValue();<br />
&nbsp; &nbsp; flowLayout.setHgap(hgap);<br />
&nbsp; &nbsp; jpComponents.revalidate();<br />
&nbsp; }<br />
<br />
&nbsp; void jtfVGap_actionPerformed(ActionEvent e) {<br />
&nbsp; &nbsp; int vgap = new Integer(jtfVGap.getText()).intValue();<br />
&nbsp; &nbsp; flowLayout.setVgap(vgap);<br />
&nbsp; &nbsp; jpComponents.revalidate();<br />
&nbsp; }<br />
<br />
&nbsp; public static void main(String&#91;&#93; args) {<br />
&nbsp; &nbsp; Exercise28_1 applet = new Exercise28_1();<br />
&nbsp; &nbsp; applet.isStandalone = true;<br />
&nbsp; &nbsp; JFrame frame = new JFrame();<br />
&nbsp; &nbsp; //EXIT_ON_CLOSE == 3<br />
&nbsp; &nbsp; frame.setDefaultCloseOperation(3);<br />
&nbsp; &nbsp; frame.setTitle(&quot;Exercise28_1&quot;);<br />
&nbsp; &nbsp; frame.getContentPane().add(applet, BorderLayout.CENTER);<br />
&nbsp; &nbsp; applet.init();<br />
&nbsp; &nbsp; applet.start();<br />
&nbsp; &nbsp; frame.setSize(400,320);<br />
&nbsp; &nbsp; Dimension d = Toolkit.getDefaultToolkit().getScreenSize();<br />
&nbsp; &nbsp; frame.setLocation((d.width - frame.getSize().width) / 2,<br />
&nbsp; &nbsp; &nbsp; (d.height - frame.getSize().height) / 2);<br />
&nbsp; &nbsp; frame.setVisible(true);<br />
&nbsp; }<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>jimbobjoe</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136603.html</guid>
		</item>
		<item>
			<title>need help reading cmyk jpgs</title>
			<link>http://www.daniweb.com/forums/thread136541.html</link>
			<pubDate>Thu, 24 Jul 2008 18:03:04 GMT</pubDate>
			<description>ImageIO.read does not work for jpgs in cmyk

trying to find a method to read it been searching on google but found lot of different results. Maybe one of you know a easy method to do this.</description>
			<content:encoded><![CDATA[<div>ImageIO.read does not work for jpgs in cmyk<br />
<br />
trying to find a method to read it been searching on google but found lot of different results. Maybe one of you know a easy method to do this.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>TheBuzzer</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136541.html</guid>
		</item>
		<item>
			<title>multi dimensional arrays</title>
			<link>http://www.daniweb.com/forums/thread136510.html</link>
			<pubDate>Thu, 24 Jul 2008 15:37:08 GMT</pubDate>
			<description>i am new to java and i was trying to solve a program, 
a) i wanted to print marks scored by 3 students in 3 subjects.
b) i wanted to get the total marks scored by each student and find out the highest total marks scored.
c)I also want to find the highest mark in each subject and by whom.
i have...</description>
			<content:encoded><![CDATA[<div>i am new to java and i was trying to solve a program, <br />
a) i wanted to print marks scored by 3 students in 3 subjects.<br />
b) i wanted to get the total marks scored by each student and find out the highest total marks scored.<br />
c)I also want to find the highest mark in each subject and by whom.<br />
i have done a coding i was  able to get a) done and b) partly done,can anyone help me with the coding so i can complete the problem.<br />
<br />
<b>class Exam1<br />
{<br />
  public static void main(String args[])<br />
  {<br />
   int [][]subject= {{1,50,66,55},{2,40,42,48},{3,70,90,68}};<br />
<br />
  // display subject array//<br />
   for(int i=0;i&lt;3;i++)<br />
    {<br />
     for(int j=0;j&lt;4;j++)<br />
      {<br />
       <br />
       System.out.print(subject[i][j] +&quot;\t&quot;);<br />
      }<br />
       System.out.println( &quot;  &quot;);<br />
       <br />
       }<br />
    //to print total marks//<br />
     for(int i=0;i&lt;3;i++)<br />
       {<br />
         int sum=0;<br />
<br />
        for(int j=1;j&lt;4;j++)<br />
        { <br />
         sum= sum+ subject[i][j];<br />
           <br />
       }<br />
       System.out.println(&quot;total marks of candidate &quot;+ subject[i][0]	 + &quot;=&quot; +  sum);<br />
     }<br />
    <br />
  }<br />
 }</b></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>newtechie</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136510.html</guid>
		</item>
		<item>
			<title>how to create a simple chatting program in java</title>
			<link>http://www.daniweb.com/forums/thread136444.html</link>
			<pubDate>Thu, 24 Jul 2008 08:35:32 GMT</pubDate>
			<description><![CDATA[i am a final year student. My supervisor had asked me for creating one chat program using java. i don't have any idea on how to started it. he asked me for doing a standalone system. please help me solve this problem?]]></description>
			<content:encoded><![CDATA[<div>i am a final year student. My supervisor had asked me for creating one chat program using java. i don't have any idea on how to started it. he asked me for doing a standalone system. please help me solve this problem?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>g_yan</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136444.html</guid>
		</item>
		<item>
			<title>help with e-voting using java</title>
			<link>http://www.daniweb.com/forums/thread136376.html</link>
			<pubDate>Thu, 24 Jul 2008 01:24:59 GMT</pubDate>
			<description>Hi all,

I am no-voice programmer, who has done Programming in Java as subject based only. I am doing project which consist of extensive java programming. I need to built prototype model of working electronic voting system using Java with security, usability and privacy issues in concern. I need...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I am no-voice programmer, who has done Programming in Java as subject based only. I am doing project which consist of extensive java programming. I need to built prototype model of working electronic voting system using Java with security, usability and privacy issues in concern. I need help to develop prototype(simulation). <br />
bomber</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>bomber4368</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136376.html</guid>
		</item>
		<item>
			<title>jdbc connection w/ config file</title>
			<link>http://www.daniweb.com/forums/thread136373.html</link>
			<pubDate>Thu, 24 Jul 2008 00:39:22 GMT</pubDate>
			<description><![CDATA[hello,

Attempting to connect HSQL db by calling a config file from a java command line. However, receiving the following error message:

Failed to retrieve connection info for database 'personal': Please set up authentication file 'C:\Documents and Settings\user\sqltool.rc'

Here's a sample of the...]]></description>
			<content:encoded><![CDATA[<div>hello,<br />
<br />
Attempting to connect HSQL db by calling a config file from a java command line. However, receiving the following error message:<br />
<br />
Failed to retrieve connection info for database 'personal': Please set up authentication file 'C:\Documents and Settings\user\sqltool.rc'<br />
<br />
Here's a sample of the command:<br />
<pre style="margin:20px; line-height:13px">java -jar \pathto\hsqldb.jar personal /pathto/Export_Data.sql 2&gt;err.txt</pre>
<br />
The config file, sqltool.rc is setup as follows:<br />
<pre style="margin:20px; line-height:13px">urlid personal<br />
url jdbc:hsqldb:file:pathto/MyDB1;shutdown=true<br />
username sa<br />
password</pre>
<br />
<br />
any help is appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>wrappingduke</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136373.html</guid>
		</item>
		<item>
			<title>Please Help Compiling Error</title>
			<link>http://www.daniweb.com/forums/thread136297.html</link>
			<pubDate>Wed, 23 Jul 2008 16:28:53 GMT</pubDate>
			<description>init:
deps-jar:
Compiling 1 source file to C:\NetBeansProjects\SCHOOL1\JavaApplication31\build\classes
C:\NetBeansProjects\SCHOOL1\JavaApplication31\src\javaapplication31\Inventory3a.java:185: cannot find symbol
symbol  : constructor Product(java.lang.String,double,double,double)
location: class...</description>
			<content:encoded><![CDATA[<div>init:<br />
deps-jar:<br />
Compiling 1 source file to C:\NetBeansProjects\SCHOOL1\JavaApplication31\build\classes<br />
C:\NetBeansProjects\SCHOOL1\JavaApplication31\src\javaapplication31\Inventory3a.java:185: cannot find symbol<br />
symbol  : constructor Product(java.lang.String,double,double,double)<br />
location: class javaapplication31.Product<br />
super( dvdTitle, dvdItemNumber, dvdStock, dvdPrice);<br />
1 error<br />
BUILD FAILED (total time: 0 seconds)<br />
<pre style="margin:20px; line-height:13px">package javaapplication31;<br />
<br />
<br />
<br />
import java.util.Arrays;<br />
<br />
<br />
<br />
<br />
<br />
public class Inventory3a{<br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; Inventory3a() {&nbsp; &nbsp; // constructor&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Product[] dvd =&nbsp; new Product[4];&nbsp; <br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dvd[0] = new Product(685.0,&quot;How to Loose a Guy in 10 days&quot;,2003, 4, 19.99 );&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dvd[1] = new Product(565.0,&quot;Coyote Ugly Ugly&quot;,2000, 8, 19.98 );&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dvd[2] = new Product(785.0,&quot;Legally Blonde&quot;,2001, 13, 19.99);&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvd[3] = new Product(578.0,&quot;Sweet Home Alabama&quot;,2002, 8,18.56); <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  double totalInStock = 0.0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  double totalValue = 0.0; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i = 0; i &lt; 4; i++) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;Item number:&nbsp; &quot; + dvd[i].getdvdItemNumber());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;Title: &quot; + dvd[i].getdvdTitle());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;Made in: &quot;+ dvd[i].getdvdYear());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;In Stock: &quot; + dvd[i].getdvdStock());&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;The price of each DVD is $&quot; + dvd[i].getdvdPrice());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;The value of the inventory is $&quot; + dvd[i].Calvalue());&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  totalInStock += dvd[i].getdvdStock();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  totalValue += dvd[i].Calvalue();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(&quot;Total In Stock:&quot; + totalInStock + <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot; Total Value:&nbsp; $&quot; +&nbsp; &nbsp; &nbsp; totalValue);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Restock Fee: &quot; + (dvd[i].getdvdStock() * dvd[i].getdvdPrice()) * 0.05);}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(); <br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp;  public static void main(String args []) {&nbsp; <br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  //Sorting strings<br />
&nbsp; &nbsp; &nbsp; String[ ] titles = {&quot;How to Loose a Guy in 10 days&quot;, &quot;Coyote Ugly&quot;, &quot;Legally Blonde&quot;, &quot;Sweet Home Alabama&quot;};<br />
&nbsp; &nbsp; &nbsp; Arrays.sort(titles);&nbsp; &nbsp; //use the built-in sorting routine<br />
&nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; 4; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  System.out.println(titles[ i ]);<br />
&nbsp;  <br />
&nbsp;  double ReStockFee = 0.05; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  new Inventory3a();&nbsp; <br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp;  } //end method main&nbsp; <br />
&nbsp; &nbsp; <br />
}<br />
&nbsp; &nbsp; &nbsp; &nbsp; class Product<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double dvdItemNumber; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public String dvdTitle;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double dvdYear;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double dvdStock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double dvdPrice;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double totalInStock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double totalValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double ReStockFee;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // five-argument constructor<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Product(double item,String title,double year, double stock, double price ) <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdItemNumber&nbsp; = item;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdTitle = title; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdYear = year;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdStock = stock;&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdPrice = price;&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } //end five-argument constructor<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // set dvd item number<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void setdvdItemNumber (double item)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdPrice= item;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method setdvdItemNumber<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // return dvd item number<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double getdvdItemNumber()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdItemNumber;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method getdvdItemNumber<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // set dvd title<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void setdvdTitle (String title)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdTitle= title;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method setdvdTitle<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // return dvd title<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public String getdvdTitle()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdTitle;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method getdvdTitle<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // set dvd year<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // set dvd stock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void setdvdYear(double year)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdYear= year;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// return dvd year<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double getdvdYear()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdYear;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method getdvdYear<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // set dvd stock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void setdvdStock(double stock)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdStock= stock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } // end method getdvdStock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // return dvd stock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double getdvdStock()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdStock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method getdvdStock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // set dvd price<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void setdvdPrice (double price)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  dvdPrice= price;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method setdvdPrice<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // return dvd price<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double getdvdPrice()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdPrice;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method getdvdPrice<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // set total in stock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public void settotalInStock (double total)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  totalInStock= total;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method settotalInStock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // return total in stock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double gettotalInStock()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return totalInStock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }// end method gettotalInStock<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  // caluclate Inventory<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double Calvalue() {&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdPrice * dvdStock;&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } //end method value&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // calculates Total Value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  public double totalValue(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return dvdPrice * totalInStock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } // end method value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // returns smaller, bigger or equals according to dvdTitle<br />
&nbsp; &nbsp; &nbsp; public int compareTo(Object o){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Product other = (Product) o;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return dvdTitle.compareTo(other.dvdTitle);<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; class Movie extends Product<br />
{<br />
private double reStockingFee;<br />
<br />
public Movie(String dvdTitle, double dvdItemNumber, double dvdStock, double dvdPrice, double reStockingFee)<br />
{<br />
super( dvdTitle, dvdItemNumber, dvdStock, dvdPrice);<br />
this.reStockingFee = reStockingFee;<br />
}<br />
&nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
public double getdvdPrice() //returns the value of the inventory, plus the restocking fee<br />
{<br />
return super.getdvdPrice() + reStockingFee;<br />
}<br />
&nbsp; &nbsp; &nbsp; &nbsp; @Override<br />
public String toString()<br />
{<br />
return new StringBuffer().append(&quot;Price: &quot; + super.getdvdPrice()).append(&quot; With RestockingFee: &quot; + getdvdPrice()).toString();<br />
}<br />
<br />
} // end class Movie<br />
<br />
&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; <br />
&nbsp;  } //end class Product</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>twgood</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136297.html</guid>
		</item>
		<item>
			<title>xml to object and vice versa</title>
			<link>http://www.daniweb.com/forums/thread136234.html</link>
			<pubDate>Wed, 23 Jul 2008 10:56:17 GMT</pubDate>
			<description>Hi,

I have an xml file, corresponding to an xsd. If there some tool, which would take this xml and xsd and give me an object. And also take the object and xsd and give me xml.

I read about couple of tools like JAXB, xstrem and xmlBeans.
The issue i have with them, is they make their own classes,...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have an xml file, corresponding to an xsd. If there some tool, which would take this xml and xsd and give me an object. And also take the object and xsd and give me xml.<br />
<br />
I read about couple of tools like JAXB, xstrem and xmlBeans.<br />
The issue i have with them, is they make their own classes, i want to use classes which i have already defined by my object. And it's not similar to the ones they create.<br />
<br />
Is there any other tool, which also takes classes and use that for object?<br />
<br />
Regards,<br />
Jyoti</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>JyotiC</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136234.html</guid>
		</item>
		<item>
			<title>java.lang.NoClassDefFoundError:   ???</title>
			<link>http://www.daniweb.com/forums/thread136087.html</link>
			<pubDate>Tue, 22 Jul 2008 20:36:21 GMT</pubDate>
			<description>Hi All

I was reading through the swing tutorial at http://java.sun.com/docs/books/tutorial/uiswing/start/compile.html
and i copied and pasted the provided source code for the HelloWorldSwing.java program.
It compiled fine but when i went to run it the following error message was...</description>
			<content:encoded><![CDATA[<div>Hi All<br />
<br />
I was reading through the swing tutorial at <a rel="nofollow" class="t" href="http://java.sun.com/docs/books/tutorial/uiswing/start/compile.html" target="_blank">http://java.sun.com/docs/books/tutor...t/compile.html</a><br />
and i copied and pasted the provided source code for the HelloWorldSwing.java program.<br />
It compiled fine but when i went to run it the following error message was returned<br />
<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  java HelloWorldSwing<br />
Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: HelloWorldSwing (wrong name: start/HelloWorldSwing)<br />
        at java.lang.ClassLoader.defineClass1(Native Method)<br />
        at java.lang.ClassLoader.defineClass(Unknown Source)<br />
        at java.security.SecureClassLoader.defineClass(Unknown Source)<br />
        at java.net.URLClassLoader.defineClass(Unknown Source)<br />
        at java.net.URLClassLoader.access$000(Unknown Source)<br />
        at java.net.URLClassLoader$1.run(Unknown Source)<br />
        at java.security.AccessController.doPrivileged(Native Method)<br />
        at java.net.URLClassLoader.findClass(Unknown Source)<br />
        at java.lang.ClassLoader.loadClass(Unknown Source)<br />
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)<br />
        at java.lang.ClassLoader.loadClass(Unknown Source)<br />
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)  <hr /> </td> </tr> </table> </div>
<br />
I have no idea what the error means, like i said i copied the source code from the sun site so i thought it would run ok so most likely there is something wrong with my pc.<br />
<br />
Does anyone know whats wrong please?<br />
<br />
Many thanks<br />
<br />
HLA91</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>HLA91</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136087.html</guid>
		</item>
		<item>
			<title>calculate squares and cube</title>
			<link>http://www.daniweb.com/forums/thread136040.html</link>
			<pubDate>Tue, 22 Jul 2008 15:54:59 GMT</pubDate>
			<description>how to write application that calculate squares and cube of the number from 0 to 10 and output in table. the program does not require any input from user?</description>
			<content:encoded><![CDATA[<div>how to write application that calculate squares and cube of the number from 0 to 10 and output in table. the program does not require any input from user?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>ricss_madara</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136040.html</guid>
		</item>
		<item>
			<title>username@password</title>
			<link>http://www.daniweb.com/forums/thread136014.html</link>
			<pubDate>Tue, 22 Jul 2008 13:29:48 GMT</pubDate>
			<description>hello everyone
I still need code snippet help with authentication of username and password on both java and web application..</description>
			<content:encoded><![CDATA[<div>hello everyone<br />
I still need code snippet help with authentication of username and password on both java and web application..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>tactfulsaint</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread136014.html</guid>
		</item>
		<item>
			<title>begginer</title>
			<link>http://www.daniweb.com/forums/thread135908.html</link>
			<pubDate>Tue, 22 Jul 2008 06:56:49 GMT</pubDate>
			<description><![CDATA[I Used to be a c++ programmer and now i'm starting  to learn java all by my self so i need a help in how to get starting begging with compiler and IDE tools and the basic diffrants between c++ and java
Thanks]]></description>
			<content:encoded><![CDATA[<div>I Used to be a c++ programmer and now i'm starting  to learn java all by my self so i need a help in how to get starting begging with compiler and IDE tools and the basic diffrants between c++ and java<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>nouryn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread135908.html</guid>
		</item>
		<item>
			<title>java homework help!!</title>
			<link>http://www.daniweb.com/forums/thread135831.html</link>
			<pubDate>Mon, 21 Jul 2008 22:31:57 GMT</pubDate>
			<description><![CDATA[heres my code:



import java.util.Scanner;
import java.lang.Integer;  
public class hmwrk4
{

public static void main(String [] args)]]></description>
			<content:encoded><![CDATA[<div>heres my code:<br />
<pre style="margin:20px; line-height:13px"><br />
<br />
import java.util.Scanner;<br />
import java.lang.Integer;&nbsp; <br />
public class hmwrk4<br />
{<br />
<br />
public static void main(String &#91;&#93; args)<br />
{Scanner kbInput = new Scanner(System.in);<br />
System.out.print(&quot;number of the element to delete: &quot;);<br />
int numEle = kbInput.nextInt();<br />
Node n8 = new Node(new Integer(8), null);<br />
Node n7 = new Node(new Integer(7), n8);<br />
Node n6 = new Node(new Integer(6), n7);<br />
Node n5 = new Node(new Integer(5), n6);<br />
Node n4 = new Node(new Integer(4), n5);<br />
Node n3 = new Node(new Integer(3), n4);<br />
Node n2 = new Node(new Integer(2), n3);<br />
Node n1 = new Node(new Integer(1), n2);<br />
<br />
Node n0 = new Node(new Integer(0), n1);<br />
Node head = new Node(new Integer(0), n0);<br />
Node prev = new Node(null);<br />
Node curr = new Node(new Integer(0),n0);<br />
<br />
if(numEle &gt; 8 || numEle &lt; 0)<br />
{System.out.println(&quot;error: out of bounds&quot;);<br />
&nbsp;System.exit(0);<br />
}<br />
else if(numEle == 0)<br />
{head = head.getNext();<br />
}<br />
else<br />
{<br />
&nbsp;<br />
while(curr != null &amp;&amp; numEle &gt; curr.getItem())<br />
{prev = curr;&nbsp;  <br />
curr = curr.getNext();<br />
}<br />
<br />
if(curr.getNext() == null)<br />
prev.setNext(null); <br />
else<br />
prev.setNext(curr.getNext());// = curr.getNext();<br />
}<br />
System.out.println(&quot;result: &quot;);<br />
curr = head.getNext();<br />
System.out.print(curr.getItem() + &quot; &quot;);<br />
<br />
while(curr.getNext() != null)<br />
{curr = curr.getNext();<br />
&nbsp;System.out.print(curr.getItem() + &quot; &quot;);<br />
}<br />
<br />
} // end of main<br />
//end of class <br />
<br />
}<br />
<br />
class Node{<br />
private Object item;<br />
private Node next;<br />
<br />
public Node(Object newItem){<br />
item = newItem;<br />
next = null;<br />
}<br />
<br />
public Node(Object newItem, Node nextNode){<br />
item = newItem;<br />
next = null;<br />
}<br />
<br />
public void setItem(Object newItem){<br />
item = newItem;<br />
}<br />
<br />
public Object getItem(){<br />
return item;<br />
}<br />
<br />
public void setNext(Node nextNode){<br />
next = nextNode;<br />
}<br />
&nbsp;<br />
public Node getNext(){<br />
return next;<br />
}<br />
<br />
&nbsp;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }//end of class<br />
<br />
&nbsp;<br />
</pre>
<br />
The assignment: to delete a user input number of a linked list and printing the result.<br />
My problem: <br />
Error<br />
hmwrk4.java:34: operator &gt; cannot be applied to int,java.lang.Object<br />
while(curr != null &amp;&amp; numEle &gt; curr.getItem())</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum9.html">Java</category>
			<dc:creator>d4n0wnz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread135831.html</guid>
		</item>
	</channel>
</rss>
