XCode Java project - can you compile both a Mac .app and a Windows .exe?

I'm working on a project for my computer science class, and it has to be done in Java. I'd like to be able to build a .app for the Mac and a .exe for Windows, and ideally I'd like to do it straight from within XCode. Is it somehow (at all) possible to configure a target to compile a .exe, or is there an easy way to export an XCode project so it can be easily opened on some Windows application and compiled into a .exe? (note: I am TOTALLY clueless about .exe files and how they're compiled!)

In theory, you can simple stuff everything into a JAR file, and run that
directly on the Windows box. The user simply double-clicks the JAR
file. But it is better, for various reasons, to hide the JAR file inside an
EXE. There are several packages that will do that for you. I think that
"Launch4J" is a good choice. It is free, and well supported.
Here is a good survey article, with links to many of the choices.
http://www.excelsior-usa.com/articles/java-to-exe.html

Similar Messages

  • Can you use both an employee discount and a military discount on one account?

    Can you use both an employee discount and a military discount on one account?

    No.
    You can only have one ELEU (Employee Corporate Discount) on an account
    So choose the one that has the greater percentage which is probably the military.

  • XCode Java project: can't add files

    Greetings all,
    I have a Java codebase which I developed in JBuilder. I now want to produce the final product, a Mac app. To do this I fired up my XCode 2.5. I went File->New Project and chose Java Application under the Java template group.
    Since I don't want the three .java files that the template helpfully puts into the project, I removed them. (The only way to do this seems to be to close the project, go to the Finder, and delete them there, then re-open the project...whatever...) My next task was obviously to add my java files and the three .jar files that they depend on.
    Which is where I ran into problems. It doesn't seem to matter what I do, I cannot get my files properly added to the project.
    I have tried dragging the files from the Finder into the XCode project window and dropping them on the src group icon; despite the fact that the disclosure triangle to the left of the group flashes a lovely shade of pink and then self-opens, when I drop the files there, they do NOT get put into the group; they become siblings of the group instead.
    I have tried right-clicking on the group and choosing Add->Existing Files; same result as above.
    I have tried single-clicking on the group and choosing Project->Add to Project from the menu bar; same result as above.
    I should mention that in all of these three, I do get asked whether I want to copy the file or just have a reference created to it; I always choose not to copy the file (since I want my files to live elsewhere). However, just to experiment, I have just tried Project->Add to Project and asked for the chosen file to be copied...same result as above. The file ends up a sibling of the src group.
    I have also tried removing the src group from the project window and then dragging in from the Finder the entire src folder which holds my Java codebase. It successfully arrives in the project window, but its colour is yellow (whereas the original one's colour was blue) and it never gets compiled. I can't seem to convince XCode that these files are source and should be compiled...despite the fact that if I get out the Info window on any of them, the FileType popup menu states that they are "sourcecode.java".
    I have even tried making an alias to the src folder which holds the codebase, and moving this alias into the XCode project directory in the Finder. This fails to build since XCode tells me that it can't create the directory "src" since one already exists with that name!
    The only way I have found which has any success at all is to actually copy the files and folders into the src and lib folders of the XCode project directory, in the Finder. However, this is not acceptable for either the java or the .jar files. The java files need to be in a certain location for JBuilder, and the .jar files are common files and I am not at all interested in having multiple copies of them floating around on my disk! Furthermore this sort of behaviour should not be necessary with a modern compilation system, especially not one created by Apple.
    Please, can some kind soul tell me, how on earth am I supposed to add existing files to an XCode Java application project, without putting them into the project directory on the disk?
    Thanks gratefully in advance!

    Hi SkiAddict1
    I can't speak for Xcode 2.5, only 3.1...
    The way to add new Java source files is to highlight one of the existing source files (in the src group) and then use File > New File...
    If you want to create a package hierarchy, then you need to use Finder to create the corresponding folders inside src. Once you've done this, then you can create a source file inside a package by highlighting any Java source file, then selecting File > New File... then using the Choose option to specify the correct location. At this point, the main project window doesn't show the newly created file in the folder hierarchy, however next time you restart Xcode it will appear in the right place.
    I think the issue is that the designers of Xcode didn't adequately cater for the Ant tool's use of a src folder and the requirement for nested folders to represent a package hierarchy. However, it's still possible to make do provided you create the folders yourself and always remember to highlight an existing source file before creating a new file.
    Bob
    PS: A neat trick which I find quite handy when porting an existing Java program is to use the boilerplate main class which Xcode creates and use it to call the main () method of the imported project. Eg:
    public class ProjectName {
    public static void main (String [] args) {
    // Call the main method of the imported project
    com.company.project.ProjectClass.main (args);
    }

  • Drivers - Can you do both "Apply Driver Package" and "Auto Apply Device Drivers - PNP" in the same Task Seqeunce ?

    Hi All,
    It has been mentioned to be that it is possible to have both "Apply Driver Package" and "Auto Apply Device Drivers - PNP' " specified in the same task sequence, with some kind of logic specified that if the Apply Driver Package step does
    not run due to the hardware wmi query not being valid then the 'Apply Device Drivers -PNP' will run instead. Vice-versa - if the "Apply Driver Package" wmi query is correct and driver package applied then the 'Auto Apply Device Drivers -PNP'
    will not run and be skipped.
    Is this possible ?
    I can't seem to find any documentation or reference indication this can be done. :-(
    Many thanks everyone..

    To add some info here, note that the end result of both tasks is the same. Neither actually *installs* drivers in any way. Both simply copy the drivers to the target system and inject them into the image being deployed where they are then available to Windows
    Setup (which runs during the Setup Windows and ConfigMgr task) to install based upon the Windows Setup standard PNP detection.
    Thus, using both task types, depending upon what is in the driver packages and what is detected by the OSD PNP detection (which differs slightly from the OS PNP which is far more complex and has been described as a "black art"), potentially injects
    more drivers into the image potentially making more drivers available to Windows Setup. This could of course increase your deployment time.
    I've thought about this approach before and it is technically valid, but I've never had to resort to it. I've always just made sure that the drivers packages are complete. If you're trying to address the scenario of hardware without a explicit driver package,
    I could see it working but I could also see it causing problems because drivers are weird. In general, I would recommend always testing new hardware and anything not accounted for is considered unsupported.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • Can you have both the Edge discount and employer discount?

    I wanted to ask to make sure, because I can't tell based on how it's listed on my plan on the website (I think the Edge per line discount is only listed on the monthly bill).  But once I instate an employer discount, will the Edge $25 discount per line remain on my plan?  I know the employer discount is only on the 10gb shared data part of the plan, so I'm hoping the $40-25=$15 per line access will remain.

        Hi freediverdude - We are dedicated to offering you the best value for your wireless service! I can confirm that the employee discount can be combine with the Edge discount. Please let me know if you have any additional questions or concerns.
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWsupport

  • Hello, we have both Creative Cloud and Creative Cloud for teams. Can you help me with the difference and if i need to have both?

    Hello, we have both Creative Cloud membership and Creative Cloud for team. Can you help me with the difference and if i need to have both? We have 9 employees that are using it. Just not sure if i'm paying for something i don't need.
    Thank you

    Please refer to Creative Cloud Help | Creative Cloud / Common Questions
    CC is for retail use with 20 GB of storage space, CCT is where number of seats are purchased & assigned by one program admin where each seat gets 100GB of storage space.
    You can not have both the CC & team in one account as it will only provide you added storage space of 120 GB but you can activate the CC any of them or either of them twice as CC is based on Adobe ID.
    Regards
    Rajshree

  • Can you setup both VPN server and Back to My Mac on Lion Server?

    I have been trying to figure out if this is possible for some time. Can you use both Back to My Mac and VPN server services at once on a OS X Server?
    So far here is what I have found:
    - According to http://support.apple.com/kb/TS1629  Back to My Mac and VPN use the same UDP ports(500,4500)
    - I have been able to get my VPN service working by removing all access for Back to My Mac(in System Preferences->iCloud) as well as removing all "Mobile Me" access on our AirPort Extreme.
    The moment I try to add an account to access the network via Mobile Me(ie Back to My Mac) on the Airport Extreme, I am no longer able to make a VPN connection.
    Checking the Service VPN Logs, no log entry is shown for the failed connection.
    So, my questions are:
    1. Has anyone been able to get these two working on the same server/network?
    2. Is there any way to change the default ports used by the VPN server service on Lion Server?
    Thank you to anyone that can provide any suggestions.

    Just as FYI....I just started using iCloud and tried the "back to my mac" on a mac server that is my VPN server.
    Enabling "back to my Mac" prevents the VPN from being useable.
    Disable "back to my mac" and the VPN works again, as verified from both another MAC and an iPhone.

  • HP Photosmart C4700 can you use both ?

    On aHP Photosmart C4700 can you use both the USB at the same time use the wireles to be able to print to the printer from 2 different devices using the 2 different ports, USB and  wireless?

    Yes.
    It will work but why do you want to do it?  Is one of your computers not on your network?  A wireless printer can take printing and scanning commands from both wired and wireless computers.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • I have an Intel iMac running OSX 10.6.8. I would like to use Final Cut Pro 10.1. I know I need OSX 10.9 for this. Can I run both 10.6.8 and 10.9 on the iMac ? I do not want to convert completely to 10.9 because of my existing software. Thanks for any help

    I have an Intel iMac running OSX 10.6.8. I would like to use Final Cut Pro 10.1. I know I need OSX 10.9 for this. Can I run both 10.6.8 and 10.9 on the iMac ? I do not want to convert completely to 10.9 because of my existing software. Thanks for any help

    It would depend on how old your IMac is, how mush memory you have, it it can be upgraded by OWC, etc. I have a 2006 Macbook Pro and would NOT put Mavericks on it or espeacially FCP 10.1.1 on it because the most memory it can have is 4 GB. You need at least 8 GB to work with Final Cut Pro 10.1.1. IMHO.
      I would try to find a copy of Final Cut Express perhaps.
      Does this answer your question?

  • When taking a picture with home button and sleep button can you get rid of the tool and task bar??

    When taking a picture with home and sleep button can you get rid of the tool and task bar?? (the search bars)

    No, but you can use any picture editing tool to crop out the bars.  (Many are free in the App Store.)  Me personally, I use PhotoPad, which I use to crop as well as rotate the screen shot.  Takes less than a minute to do both with PhotoPad.

  • I have both an iMovie.app and iMovie 9.09.app on my Macbook Air.  Can I delete one of these apps without losing iMovie?  I need to free up space on my computer as I don't have any space left.

    I have both an iMovie.app and iMovie 9.09.app on my Macbook Air.  Can I delete one of these apps without losing iMovie?  I need to free up space on my Macbook Air as I don't have any space left.  I've ordered an external drive in order to move photos and video there to free up space.  In the meantime I have to make some room for incoming emails and to open programs.  I've already deleted some documents.

    You should find out which app you are using when you double click on a movie.
    See:
    Change Finder mapping from file extension to application
    http://osxdaily.com/2009/10/25/change-file-associations-in-mac-os-x/
    Run
    OmniDiskSweeper
    "The simple, fast way to save disk space"
    OmniDiskSweeper is now free!
    http://www.omnigroup.com/applications/omnidisksweeper/download/
    This will give you a list of files and folders sorted by size. Go after things you know that are big.
    You can use the du command from the terminal to track down usage.
    sudo du -cxsPh  /Users/*
    du -cxsPh ~

  • Can you suggest a group messaging app where recipients can't see all the phone numbers within the group?

    Can you suggest a group messaging app where recipients can't see all the phone numbers within the group?  My friends are complaining that they can see all the people in the group; also when I get a response from some in the group, it comes to me ane many others in the goup - its like they've replied all. 
    Any help would be appreciated.
    iPhone 4; iOS5

    Sorry it hasn't worked out for you. I threw together a simple project that uses rectangles to represent your Bike and wheel groups. They all animate across the canvas in the bike group and the wheels rotate. I have attached screen shots so you can see how they are constructed.
    This image showsthe bike group where the orange rectangle and green circle represent the frame. The white rectangles represent wheels and the green and red rectangles I threw in to represent a wheel that has multiple objects in its group as your wheels do.
    Here the animation across the screen has started and notice all wheels rotating and staying with the frame.
    Again a little further down the timeline.
    I put this one in so you could see the group bounding box around the red and green wheel Good luck with your restart on this project and I hope these screen shots are helpful.

  • Have an original iPhone 3G. Can you still sync iTunes (10.6) and Contacts after Lion install?

    Have an original iPhone 3G. Can you still sync iTunes (10.6) and Contacts after Lion install?

    An older iTunes will not open the library once used by a newer version.
    iTunes 10.6.3 will work with iOS6 as long as the hardware doesn't post-date the release of 10.7  Use iTunes 10.6.3 on both machines.
    iTunes 10.6.3.25 - http://support.apple.com/kb/DL1575

  • I have cs5 on my pc, can i buy cs6 for mac separately and keep both?

    I have cs5 on my pc, can i buy cs6 for mac separately and keep both?
    I have cs5 installed and activated on PC A and PC B.
    If I buy CS6, can I use that on my MAC C and MAC D while still being able to use the cs5 on my PC A and PC B, since mac and pc are two different platforms?
    Thank You!

    No. That would be against the letters and the legal spirit of the EULA and that aside it's not possible for technical reasons. Either you make a platform swap, in which case you will lose your PC licenses of course,  or you buy a second CS6 license for your Mac(s) and keep your CS5 on the PCs.
    Mylenium

  • Can I extend both a 2.4Ghz and a 5Ghz wireless network at the same time with a second Timecapsule / Extreme ?

    Can I extend both a 2.4Ghz and a 5Ghz wireless network coming from a Timecapsule  with a second Timecapsule / Extreme at the same time?

    I am currently extending my 5Ghz network via an Express without any problems, but the Express can only extend either / or. I just want full coverage for both networks in the whole house.
    If you can extend 5 GHz now with an AirPort Express and get satisfactory results, then the AirPort Extreme will work to extend both the 2.4 GHz and 5 GHz bands in the same location.
    However, your computer is going to connect to the band with the strongest signal, so it may....or may not....connect to 5 GHz given a choice of two signals.

Maybe you are looking for