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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:33:31+00:00 2026-06-02T22:33:31+00:00

My school projects are all done on the Linux Server, which is all done

  • 0

My school projects are all done on the Linux Server, which is all done with command lines and no GUI. One of my java projects requires me to create a java GUI and to be able to build and run the project on the GL server.

I’m confused since the GL server is all command line, but my professor says that it can be done.

To connect to the school’s GL Server, I use Putty. I don’t know if it matters or not. And I’m using swing for Java GUI. I use ant to compile and run, and so will my professor when he grades it.

I built the program with success, but when I run it this comes up:

Buildfile: build.xml

run:
     [java] Exception in thread "main" java.awt.HeadlessException:
     [java] No X11 DISPLAY variable was set, but this program performed an operation which requires it.
     [java]     at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
     [java]     at java.awt.Window.<init>(Window.java:406)
     [java]     at java.awt.Frame.<init>(Frame.java:402)
     [java]     at javax.swing.JFrame.<init>(JFrame.java:207)
     [java]     at gui.PushCounter.main(PushCounter.java:18)
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 0 seconds

Is there a different class or method of creating a GUI in Java when you are working with command line? Is there another terminal I can log into other than Putty that would better suit using Java GUI? Is there some extra thing I have to add in my code or in the Linux Server?

  • 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-02T22:33:32+00:00Added an answer on June 2, 2026 at 10:33 pm

    Swing is probably a good choice for creating a GUI; I see no reason why you should change it.

    I would suggest taking a look at X forwarding. With X forwarding, you SSH into the server as normal. The server runs all your code and handles the creation of your GUI. It then sends the window display information back to your machine.

    I found a quick guide to configuring X forwarding in PuTTy. It should serve your needs well.

    Caveats

    For X forwarding to work, your SSH configuration must have it enabled. You can surely talk to your professor about this- it’s a simple change to the sshd config file. The speed of X forwarding shouldn’t be a concern if you and the server are both on campus, but note that this can be a drawback with other networking setups.

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

Sidebar

Related Questions

Im about to turn in to my school library a project which was done
For my school projects, I was used to have one big repo with several
I'm working on a school project which is to create an GPS for an
I currently use Visual Studio 2005 for all my personal projects, which means I'm
I have been learning C++ in school to create small command-line programs. However, I
In school web projects that I have done until now I have build my
In our school, it is common to build games as class projects in implementing
I have a school project in which I have to implement a chat application,
For a school project I need to create a program and it'd be nice
For my school project, I would like to build a gui that someone else

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.