<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE></TITLE>
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=730320419-06062006><FONT face=Arial
color=#0000ff size=2>I've had to also put Java in the path.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=730320419-06062006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=730320419-06062006><FONT face=Arial
color=#0000ff size=2>export PATH=$JAVA_HOME/bin:$PATH</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><?xml:namespace
prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:SmartTagType
name="City"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="place" namespaceuri="urn:schemas-microsoft-com:office:smarttags"
downloadurl="http://www.5iantlavalamp.com/"></o:SmartTagType>
<STYLE>st1\:* {
BEHAVIOR: url(#ieooui)
}
</STYLE>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.Section1 {
page: Section1
}
</STYLE>
<DIV class=Section1>
<DIV>
<P class=MsoNormal align=left><FONT color=#000000><SPAN
style="COLOR: #003369; FONT-FAMILY: Arial"><SPAN
class=730320419-06062006><STRONG></STRONG></SPAN></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>-<SPAN
class=730320419-06062006>paul</SPAN></FONT></FONT></FONT><BR></FONT></P></DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rhn-users-bounces@redhat.com
[mailto:rhn-users-bounces@redhat.com] <B>On Behalf Of </B>Peter
Kühnlein<BR><B>Sent:</B> Tuesday, June 06, 2006 11:50 AM<BR><B>To:</B>
rhn-users@redhat.com<BR><B>Subject:</B> [rhn-users] Newbie: Installing
jdk1.5.0_06 on FC3<BR></FONT><BR></DIV>
<DIV></DIV><SMALL><FONT face="Helvetica, Arial, sans-serif">Dear
Colleagues,<BR><BR>I'm a bloody java beginner and got an
installation/configuration problem. I downloaded and installed sun's jdk1.5.0_06
to my FC3 box in /usr/share/jdk1.5.0_06/. I fiddled around with the symlinks to
point to the binaries in .../bin/ and javac etc. now run. However, I get a
<BR></FONT></SMALL><FONT
face="Courier New, Courier, monospace"><SMALL><BR>java.lang.ClassCastException:
SwingUI</SMALL><BR><SMALL> at
sun.applet.AppletPanel.createApplet(AppletPanel.java:721)</SMALL><BR><SMALL>
at
sun.applet.AppletPanel.runLoader(AppletPanel.java:650)</SMALL><BR><SMALL>
at
sun.applet.AppletPanel.run(AppletPanel.java:324)</SMALL><BR><SMALL>
at java.lang.Thread.run(Thread.java:595)</SMALL></FONT><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><BR>when I try to view the class built from
the simple code at the end of this message with appletviewer (all of the code
there for completeness).</FONT></SMALL><FONT
face="Helvetica, Arial, sans-serif"><SMALL> I do think java doesn't find javax.*
- and don't know how to tell it where it is. I've set my <BR><FONT
face="Courier New, Courier, monospace"><BR>JAVA_HOME=/usr/share/jdk1.5.0_06/</FONT><BR><BR>(that's
where my installation is).<BR><BR>Any idea what is going wrong here? (I posted a
similar question to the parallel sun-list, but got no solution from
there...)<BR><BR>THX, Peter<BR><BR>Code:<BR></SMALL></FONT><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">import
java.awt.Color;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">import
java.awt.BorderLayout;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">import
java.awt.event.*;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">import
javax.swing.*;</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public class SwingUI extends
JFrame</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
implements ActionListener {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> JLabel text,
clicked;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> JButton button,
clickButton;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> JPanel
panel;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> private boolean _clickMeMode
= true;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public void init()
{</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
System.out.println("starting...");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public SwingUI(){ //Begin
Constructor</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> text = new
JLabel("I'm a Simple Program");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> button = new
JButton("Click Me");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
button.addActionListener(this);</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> panel = new
JPanel();</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
panel.setLayout(new BorderLayout());</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
panel.setBackground(Color.white);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
getContentPane().add(panel);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
panel.add(BorderLayout.CENTER, text);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
panel.add(BorderLayout.SOUTH, button);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> } //End
Constructor</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public void
actionPerformed(ActionEvent event){</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
Object source = event.getSource();</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
if (_clickMeMode) {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
text.setText("Button Clicked");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
button.setText("Click Again");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
_clickMeMode = false;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
} else {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
text.setText("I'm a Simple Program");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
button.setText("Click Me");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
_clickMeMode = true;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public static void
main(String[] args){</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> SwingUI frame =
new SwingUI();</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
frame.setTitle("Example");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
_clickMeMode = false;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
} else {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
text.setText("I'm a Simple Program");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
button.setText("Click Me");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
_clickMeMode = true;</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> public static void
main(String[] args){</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> SwingUI frame =
new SwingUI();</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
frame.setTitle("Example");</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace"> WindowListener l
= new WindowAdapter() {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
public void windowClosing(WindowEvent e) {</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
System.exit(0);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
};</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
frame.addWindowListener(l);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
frame.pack();</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
frame.setVisible(true);</FONT></FONT></SMALL><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">
}</FONT></FONT></SMALL><BR><BR><SMALL><FONT
face="Helvetica, Arial, sans-serif"><FONT
face="Courier New, Courier, monospace">}</FONT></FONT></SMALL><BR><FONT
face="Helvetica, Arial, sans-serif"><SMALL><BR></SMALL></FONT><SMALL></SMALL><PRE class=moz-signature cols="72">--
<A class=moz-txt-link-freetext href="http://www.peter-kuehnlein.net">http://www.peter-kuehnlein.net</A>
"The Way of the Samurai is in desperateness. Ten men or more cannot
kill such a man."
(Hagakure)
Upcoming event:
<A class=moz-txt-link-freetext href="http://www.constraints-in-discourse.org/cid06">http://www.constraints-in-discourse.org/cid06</A>
</PRE></BODY></HTML>