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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:25:23+00:00 2026-06-11T20:25:23+00:00

I have migrated from Linux (Ubuntu) to Mac OS. I have wrote an application

  • 0

I have migrated from Linux (Ubuntu) to Mac OS. I have wrote an application in Java (swing). I have run it successfully the same code in windows and linux but in mac os I have some problems.

Here is the code and problems in comments:

public MainForm() {
    setResizable(false);
    setAutoRequestFocus(false); // This method is undefined for type MainForm
    initComponents();
}

Another:

Object[] industries = jList1.getSelectedValuesList().toArray(); //  This method is undefined...

And the last one:

setType(Type.UTILITY); // Type can't be resolved as variable

Of course I can’t compile it.

Java versions:
Ubuntu:

java version “1.7.0_07”
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)

MacOS:

java version “1.6.0_35”
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)

I can’t update java (because It seems to be the newest version for mac). I want to develop this app on mac now.

  • 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-11T20:25:24+00:00Added an answer on June 11, 2026 at 8:25 pm

    After doing some digging for the methods giving you problems, it’s clear you’re not running the same JDK on every platform. Specifically, your Windows and Linux boxes are running JDK 1.7, and your Mac OS X box is running JDK 1.6 or older. See this question for using JDK 1.7 on Mac.

    The fact remains that you don’t need to compile your application on every platform. Java is a “compile once, run everywhere” language. The bytecode produced by the compiler works for every platform, regardless of which platform compiled it, so long as you didn’t introduce any system dependencies in the code yourself.

    In other words, Java itself is platform-agnostic as long as your code is platform-agnostic. Your problem is just a JDK version error, so upgrading your Mac’s version of the JDK to 1.7 will fix this.

    Note that you can’t run binaries compiled with a 1.7 source target in Java 6 or lower. You can change the source target to 1.6 on compile time, but this will preclude you from using the Java 7 API (such as the getSelectedValuesList method).

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

Sidebar

Related Questions

I just migrated from Windows to Mac OS X and have found theres no
I migrated from Windows, and have heard that Linux programmers do not use IDEs
We have a legacy VB6 application from which we have migrated the licencing code
At work, we have migrated from Windows XP to Windows Vista. After the migration,
I have migrated a Web Application from MyEclipse to Eclipse WTP, and I am
I have migrated our company web apps from Windows Server 2003 to Windows Server
I have just migrated around 100 ASP.net sites from IIS 6 on Windows Sever
I just migrated from Windows to Ubuntu, and I am trying to install Ruby
I have migrated an application from Tomcat to Glassfish in order to take advantage
We have migrated one of our websites from a windows 2003 machine with IIS5

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.