Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Accessing public vars in other threads
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
wald  
View profile  
 More options Jan 7 2002, 10:02 am
Newsgroups: borland.public.jbuilder.students
From: "wald" <arnout.standa...@nospamagr.kuleuven.ac.be>
Date: Mon, 7 Jan 2002 16:01:24 +0100
Local: Mon, Jan 7 2002 10:01 am
Subject: Accessing public vars in other threads
Hello all,

I'm a newbie to JAVA but I have to learn it in order to work with a certain
program for simulations that's available within our group. I'm having a
specific problem to which I don't see the solution.
I'm trying to access a variable that has been declared public and static in
the main class. Now, this program is multi-threaded, the main thread
executes another thread in which the simulation takes place.
I've declared a public static FileWriter in the main thread, but I'm trying
to write data to the file in question in my secondary thread. This will not
do the trick, since the FileWriter variable holds the NULL reference when
trying to write data to the file.
To all you JAVA experts: what am I doing wrong here ? How to make this
work...
I'm aware of the fact that my description may contain flaws, I've just
started working with JAVA, and the way I see things at this moment, may not
be correct. But I'm learning every day :-)...

Thanks in advance,
Wald

-------------------------------------------------------------
remove 'nospam' from e-mail adress for replies


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »