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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:34:34+00:00 2026-05-27T19:34:34+00:00

In cmd or Powershell, I do java -jar file.jar (javaw doesn’t return anything, but

  • 0

In cmd or Powershell, I do java -jar file.jar (javaw doesn’t return anything, but also, doesn’t run the program).

It uses swing, and when I run it:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: javax.swing.JDialog.setAutoRequestFocus(Z)V
        at file.fileView.initComponents(fileView.java:852)
        at file.fileView.<init>(fileView.java:42)
        at file.fileApp.startup(fileApp.java:50)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

It says that their is no such method of .requestFocus.

This was auto-generated with Netbeans, and it works fine in Netbeans. However, it doesn’t in the cmd/powershell.

Thanks,

Justin W.

  • 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-05-27T19:34:35+00:00Added an answer on May 27, 2026 at 7:34 pm

    I believe you are using the java 7 in netbeans and you are using an older version of java from the command line. setAutoRequestFocus is new to java 7.

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

Sidebar

Related Questions

i try to migrate a cmd Batch file to powershell, but powershell don't accept
I'm trying to run a java process via Powershell in Windows XP. Here's the
I have a slight problem with Powershell strings. There is a Java program I'm
How does one write to a valid .CMD (or .BAT) file from PowerShell? I'm
all! I'm trying to compile a program using PowerShell, but the command is being
I'm trying to use the PowerShell Add-Member cmd on all the items in an
Imagine a DOS style .cmd file which is used to launch interdependent windowed applications
How to hide cmd window while running a batch file? I use the following
I am converting an old cmd command to Powershell, and currently use: START My
What should I use to accomplish the task desribed below? CMD.exe? PowerShell? Windows Script

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.