r/learnjava • • Sep 19 '23

How do I create a java app in linux?

I'd like to write a daily expenses manager java app using vscode on linux mint.

I'm positive i can write the code and all, but how do I make it so it's a "complete" app? By complete i mean i can launch it from an icon or terminal and it will register changes.

I'd really appreciate if you could provide some tutorial or article.

1 Upvotes

6 comments sorted by

•

u/AutoModerator Sep 19 '23

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions

  • You include any and all error messages in full - best also formatted as code block

  • You ask clear questions

  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/davidg_photography Sep 19 '23

So you are looking for a GUI app with connectivity to a DB.

How far along are you in learning java?

2

u/TheLearnedGoat Sep 19 '23

I can build a basic gui with javafx, as for db i still haven't studied them; i thought i could write to a file and register changes that way.

I consider myself a beginner java programmer, i completed mooc.fi and i am going through the official java tutorial book.

3

u/davidg_photography Sep 19 '23

storing to a file would be ok if you are using JSON or XML. I would not spend too much time in it. I would focus on getting the data to a DB and creating a CRUD application for what you want to create

Simple CRUD app terminal

CRUD UI APP

you should be able to fallow those tutorials and get a crude understanding of the interaction between your java app and the DB.

as for steps:

  1. write down the features that your app will have

  2. create a simple UML diagram of the interaction between the classes and there functions

  3. Create Table Structure in DB

  4. Create some simple code to test the connection and simple queries to the DB since is your first time.

  5. Start adding the business logic to the Gui App.

  6. Develop all of the functions and features that you want for the app.

Start using GitHub if you have not and a simple ticket tracking software like Jira ( in here you will have all of the "tasks" that you have to do and it will be helpful on the development of your App.)

2

u/TheLearnedGoat Sep 19 '23

Second link seems to be exactly what i was looking for, only it uses eclipse ide so i will have to adapt the tutorial to vs code.

Thank you for the resources provided and the creation steps, I will post again once i finish the project!

1

u/rhefley Sep 20 '23

An IDE is just a tool. Wouldn't get bogged down on what the tutorial is using.