Sharing a string across many classes JAVA
<p>I would like to share a string across a couple of classes in java, however the string is not constant, so the usual method of <code>public static final</code> does not work.</p>

<p>I mean, I update the value of string, and this varies from use.</p>

<p>Currently the code I am using is:</p>

<pre><code>public String NewDestination;

 destination = "D:/Documents/NetBeansProjects/printing~subversion/fileupload/web/Uploaded/"; // main location for uploads (CHANGE THIS WHEN USING PREDATOR)
            File theFile = new File(destination + "/" + username);
            theFile.mkdirs();// will create a sub folder for each user (currently does not work, below hopefully is a solution) (DOES NOW WORK)
            System.out.println("Completed Creation of folder");
            NewDestination = destination + username + "/";
</code></pre>

<p>Above, it is created from adding together destination + username + "/", so it can not be static final as this changes on each log in, but I still need the value passed to another class, how can I do this ?</p>

<p>EDIT:</p>

<p>What I have now done is:</p>

<p>added <code>public static String NewDestination;</code> to my FileUploadController.java </p>

<p>and in my Mybean.java I added <code>System.out.println(FileUploadController.NewDestination);</code> and it still out prints null :(</p>
