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

  • Home
  • SEARCH
  • 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 9200677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:49:15+00:00 2026-06-17T22:49:15+00:00

I have a current java application that I would like to run on an

  • 0

I have a current java application that I would like to run on an iPhone. This is just for interest and therefore I do not mind if the GUI is a little off so I hope to do this with as little steps as possible.

I have installed the codename one plugin into eclipse but am not sure where to go from here.

What I have done:

I created a new project of type codename one opened the source folder (in Eclipse) and replaced the created files with my already written java files. However I now have errors for every use of a swing component within the files. What can I do?

I was thinking I’m not supposed to remove the files I deleted – they were just generated classes but then I don’t know how to merge that with my current java program (it’s a chess application btw).

Also, all my java files are in a package called chess – is this a problem?

Sorry I am just not sure where to go from here – can’t find anything useful on the internet. All I need is the simplest way to take my java code and converted to c (Obs) and a way of transferring that on to my iPhone to run.

Thanks in advance for any advice.
PS
I just noticed I think some imports belonging to codename are missing from the file. Is there a way I can insert all the required imports automatically?
PPS
OK a couple imports eclipse has decided to insert have removed errors. These are ones such as

import com.codename1.ui.events.ActionEvent;

What are the imports required for JFrame, JChechkBox, JButton, JLabel, etc? Is there a …*; directory that I can import to acquire the necessary packages?

Thank you again!

  • 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-17T22:49:17+00:00Added an answer on June 17, 2026 at 10:49 pm

    Codename One doesn’t support Swing. Swing has many desktop level assumptions. You will need to rewrite the Swing code to use the Codename One API and possibly other uses of Java features such as reflection which is also unsupported (to keep the code size small).

    Its possibly not a good idea to remove the code we generated since a main method isn’t the right way to build a mobile app. You need the lifecycle class and the theme.

    The Codename One UI API is very similar to Swing so porting should be trivial in some cases but it is work and some things are just different.

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

Sidebar

Related Questions

I have a simple file transfer application that is run as a standalone Java
For the Android application I am currently creating I would like to have a
I have a Tomcat application that requires multiple passwords on startup. My current configuration
In a certain Java class for a Struts2 web application, I have this line
I would like to develop an application that will receive pictures from a camera
In my work environment, we have a number of Enterprise Java applications that run
I have a Java application which queries a database table which the current user
I'd like to have my desktop Java application to have single sign on related
The application that I would like to revamp is pretty well organized. UI is
For my current project I have to send a signature from PHP to Java

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.