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 9025979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:24:35+00:00 2026-06-16T06:24:35+00:00

I have compiled and created the jar file for my project made in Java

  • 0

I have compiled and created the jar file for my project made in Java Swing with JavaFX.
Now I want to run the project on Linux . For it I have to run my setup on Linux and it picks the directory path from the windows with System.getProperty("user.dir");
I want the equivalent command in Linux.

How to run Java Swing jar on Linux?

  • 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-16T06:24:36+00:00Added an answer on June 16, 2026 at 6:24 am

    System Properties is common for all operating systems.System.getProperties("user.dir"); return your execution directory (where you run the main class) in execution.

    Answer for you comment :

    1. Keep your executable in user directory /home/userName.
    2. If your jar has a main class and that can run without any parameters, just double on the jar to get swing UI
    3. If you need to pass parameters thru command line, create an sh file like run.sh with
      java -jar yourjarName.jar argument1 argument2 ...
    4. Open command prompt and run sh run.sh
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have compiled and created .WAR file of my java code. then i started
I have created the jar file for one of my project and exported it
How do you setup a project that can result in a jar library file
I have following ant script to generate the jar file <project name=myProject basedir=. default=jar>
I tried to create a jar file from a java project, which uses some
I have a multimodule maven setup for my project, made of 5 modules, which
I have made a project in NetBeans IDE using a custom library (a .JAR
I wrote a program with java and mysql and now i want to have
I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in
I have a new Codeblocks install with mingw32 compiler. Created new c++ console project

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.