This is a religious issue and neither side is likely to convince the other. Ideally, if you are writing a Java application that targets both platforms (and perhaps others), you would like it to feel like a Windows application on a Windows machine and like a Mac application on a Mac. The Makefile will handle java files in the current directory and in any sub-directories. Use the generated Makefile with mmake as follows The command 'make bundle' creates a Mac OS X Application Bundle with all the jar file. I am new to java and makefile, and I'd like some introductory information about a makefile. The information that's typically found online are mostly examples and high level. Here's some specific/naive questions I have about makefile: • What type of files are targets of a makefile?.class and.java? • What does a makefile do to those project files? I did my projects in Eclipse, so the.class files are stored in bin, and.java files are stored in scr. What kind of connection does makefile make between these files? • What is the result of a makefile? Makefile's purpose is tell compiler how to make an executable, so the result is a new executable file in the current directory, yes? • Where should I place the makefile? In the bin folder? Mingle all flies under one directory and put it under there? • lastly, I made a small makefile for my project which should compile 3 classes. It's not working and I don't know why: makefile: JFLAGS = -g JC = javac.SUFFIXES:.java.class.java.class: $(JC) $(JFLAGS) $*.java CLASSES = DNA.java C.java fastmatch.java default: classes classes: $(CLASSES.java=.class) clean: $(RM) *.class Did I do something wrong? I just put everything under one folder and typed 'make' in command line. I think i'm missing some big picture here so I'd really appreciate if someone can explain them to me. Make is not the correct tool for building Java. You should use or or another Java-building tool. It is possible to get the job done with make, but for anything but the most trivial Java programs, you will end up with a makefile that deletes everything and recompiles from scratch every time. Make works well in the land of C and friends. There, a source file depends on all the headers that it imports, and the headers depend on nothing (because they don't get compiled), so your dependency tree is not excessively deep. In Java, every class depends on every class it imports, which depend on further classes, so it's frequently the case that a single class can't be compiled without compiling every other class in the project. You could describe that in your makefile, but it would be hours of tedious work to do what Ant does in less than a second. All that said: • 'targets' are things that the makefile is generating. If you're not writing code that writes code, then the.java files are not the targets • in the makefile you've posted,.class files will end up in the same location as corresponding.java files • the result of a makefile can basically be anything at all. Make is a fairly powerful language in its own right. The result of this makefile is three compiled Java classes (possibly more, because javac might find more classes to compile or some of your classes might have inner classes. Again, this is why make is a bad tool for Java) • a makefile typically lives in the root project directory. Often, complex projects will have other makefiles for sub-directories. ![]() ![]() A prototype launcher stub is present in the source code at: The Xcode project file in that directory will build a shell.app with the launcher stub and an example Info.plist. The next steps for this code is to be adapted into the JDK's proper Makefile-driven build system, and to create an artifact in the standard JDK bundle. After that, a script or Ant target which can be driven by and IDE should take that artifact and a application descriptor to create a proper.app. Contributed steps to bundle from the [email protected] mailing list: ----------------------------------------------------------- ----------------------------------------------------------- STEP 1. Checkout, download, install & build the MacOS OpenJDK package as described on the Oracle OpenJDK Mac OS X Port page: STEP 2. Identify & launch the JavaAppLauncher.xcodeproj located in your /YOUR_INSTALL_PATH/jdk7u-dev/jdk/src/macosx/bundle/JavaAppLauncher/ directory. In the Xcode project repair any undefined file paths. Here is the list of top 10 upcoming survival games 2018. This list includes the best survival games of 2018 which players can survive, open world, build. Find Survival games for macOS like SOPHIE, Factions, Evil Granny: Nurse in Hospital, Meeple Station, Maguntsche: Chapter One on itch.io, the indie game hosting marketplace. These would be indicated in the files tab in the Xcode project left side bar in red. I had to update the 1.7.0.jdk & 1.7.0.jre paths to the bundles stored in /YOUR_INSTALL_PATH/jdk7u-dev/build/macosx-amd64/j2sdk-image/ directory and the /YOUR_INSTALL_PATH/jdk7u-dev/build/macosx-amd64/j2re-image/1.7.0.jre respectively. I also had to update all the files in the include diretory which included: /include/classfile_constants.h /include/darwin/jawt_md.h /include/darwin/jini_md.h /include/jawt.h /include/jdwpTransport.h /include/jni.h /include/jvmti.h /include/jvmticmlr.h All the above I found in the /YOUR_INSTALL_PATH/jdk7u-dev/build/macosx-amd64/include/ directory. I also need to find the /frameworks/Cocoa.framework/Headers/Cocoa.h reference. I used the one hosted in /System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/ directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |