Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8950451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:27:30+00:00 2026-06-15T13:27:30+00:00

File file = null; String directory = /Users/Chris/Documents/Sites/gmustudent/WebContent/images/test/; file = new File(directory + imageName);

  • 0
File file = null;
String directory = "/Users/Chris/Documents/Sites/gmustudent/WebContent/images/test/";
file = new File(directory + imageName);
file.createNewFile();

The code above does effectively create a new file in the directory I want with the name I want. And after I run it I can go to that path on my computer and the images will be there. But the images will not be visible in eclipse. After I run this code the directory looks like this

enter image description here

So I can view the images in the directory in my computer but eclipse does not see them yet. So then I right click my project and click refresh…

enter image description here

And then my directory is refreshed…

enter image description here

So when I try to access the images I just uploaded in my web app I can’t see them until I refresh my entire web app.

UPDATE

This is an issue b/c I need to access these files through their path online. like htttp://localhost:8086/gmustudent/images/test/image.png. I can’t do this until I refresh the web app which is the problem. So when I try and access the images after upload I can’t see them until I refresh the eclipse project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:27:31+00:00Added an answer on June 15, 2026 at 1:27 pm

    In newer versions of Eclipse, there’s a Workspace preference called “Refresh using native hooks or polling.”

    enter image description here

    This has potential to slow Eclipse and/or your system down if it needs to read a slow (say, non-SSD) disk and/or many directories/files. This help doc hints that the native hooks only work on Windows versions of Eclipse, implying that Linux & Mac versions will use polling, which will likely be less efficient.

    Give it a shot; YMMV.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file in Java FileInputStream in = null; try{ in = new
I am reading a xml file with: $reader = new XMLReader(); $reader->xml($myXml, NULL, LIBXML_NOWARNIG
I have a text file containing unwanted null characters (ASCII NUL, \0 ). When
I have a class that occasionally gets passed null for File objects. During normal
Unix 'file' command has a -0 option to output a null character after a
my JavaCompiler returns a null pointer when called from a jar file. Everything works
In code ConfigurationManager.AppSettings(IsFill) showing null but when i open exe.config file manually that key
I import data from a TSV file with SQL Server 2008. null is replaced
I'm developing a service in which users can upload images and save them in
I've created a JFileChooser which I use to locate a directory for a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.