2

I'm building an app from scratch with the knowledge I've gained so far, and I'm making a "Notes" app where You can create notes, delete, edit(update), etc.

My question is that I know I can use a database to store data from my input. I know I can use A Database to save and open the data, but Just in case, does Java have a LocalStorage, like JavaScript/JSON, where you can keep things and open them up later?

What are the my options for Local Storage for applications to save data and open it up after running again?

Charney Kaye
  • 3,667
  • 6
  • 41
  • 54
ivan l
  • 67
  • 1
  • 4
  • You can use a properties file. – shmosel Jun 12 '18 at 04:26
  • This post appears to be [off-topic](http://stackoverflow.com/help/on-topic) as per *Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.* – Rcordoval Jun 12 '18 at 05:36
  • Welcome to SO. Please take a [tour](https://stackoverflow.com/tour) and see [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask). It is important to ask questions with clear concise problem statements. Please ask one such question in a post. See [this](https://stackoverflow.com/questions/15625303/how-to-save-images-provided-by-a-user-to-a-database-using-java) – c0der Jun 12 '18 at 06:16

2 Answers2

0

As far that I know of there packages that allow you to store data as you intend, but following on your next question, you could possibly store the address/file name of the image you wants to add to the database. You could then use it to retrieve the image file and display it.

If you have any questions on image implementing images in java, reference this documentation and tutorial

If you have any more questions on working with databases, reference this documentation

I hope this helps.

0

I've been looking into java.util.prefs.Preferences to accomplish this. More complex use cases might consider Apache Derby or H2 Database Engine

Charney Kaye
  • 3,667
  • 6
  • 41
  • 54
  • 1
    Or consider [*H2 Database Engine*](https://en.wikipedia.org/wiki/H2_(database)), another pure Java SQL relational database. – Basil Bourque Aug 25 '23 at 06:50
  • 1
    I do not see that `Storage` class in the [current JavaFX 20](https://openjfx.io/javadoc/20/) API Javadoc. – Basil Bourque Aug 25 '23 at 06:53
  • Good catch @BasilBourque ([javafx.io.Storage](https://docs.oracle.com/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.io/javafx.io.Storage.html)) was a terribly legacy API and a dead end; I removed it from my answer. – Charney Kaye Aug 25 '23 at 17:40