[program-java] Re: access bridge problem or just doing something wrong?

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: "'program-java@xxxxxxxxxxxxx'" <program-java@xxxxxxxxxxxxx>
  • Date: Fri, 8 Oct 2010 14:39:53 -0400

Hi:

Have you tried just a simple "Hello World" application? What are you using for 
your IDE? What version of the JRE are you using?

J.


-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx 
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Florian-achtige
Sent: October 8, 2010 14:16
To: program-java
Subject: [program-java] access bridge problem or just doing something wrong?

Hey list,
Sorry if this is a repost, but after getting no answer for a week orso i am 
wondering if the message got through.
I've been trying to get into java stuff, and it goes alright. Until i start 
messing with something that slightly resembles UI use. I've tried running the 
following code:

import java.awt.*;
public class RootApplet extends javax.swing.JApplet { int number ; public void 
init() { number = 225; } public void paint(Graphics screen) { Graphics2D 
screen2D = (Graphics2D) screen;

screen2D.drawString("The square root of " + number + " is " + 
Math.sqrt(number), 5, 50); } }


I have the access bridge installed, I think. I've run it a few times.
The setup program, that is. It takes a very long time to search on disks for 
java VM's, i think five minutes if not more. The code listed above however 
gives me a blank line and thats it. Also my java command works, but javac and 
appletviewer do work. My jdk is also saved in c:\sun instead of c:\program 
files\blahblahblah. I had to ask for sighted assistance to get the jdk 
installed anyway so I dunno what exactly is going on here. Could someone please 
try to help me get these things fixed, on this list or offlist on my email or 
skype/msn?
skype: balliol1
msn: florianbeijers@xxxxxxxxxxx

Thanks in advance for all your help. To be honest it's kinda frustrating me to 
run very simple tutorial-level code and to have this happen.

Thanks,
Florian


Other related posts: