P.S.: about JAVA:
When you have to dig deep into Microsoft's libraries, the choice is C#.
On almost any other platform JAVA is the choice of arms.
Example: last week one of my applications said POOF!
The log told me what happened and where: an unexpected null-pointer.
In C or C++ I could have tested for weeks to find the error,
because in C the error happens somewhere and the result happens somewhere else at an other time.
Happy go lucky! I suffered for decades because my employer wanted me to use it.
Now I'm retired and I can choose the tools I want.
Then again, after decades of UNIX and MSWindows, OSX seems tough to me,
let alone this bundler problem.
Another point: there seems to exist some ANT based bundler, but that would be my last resort.
I found it at "/usr/share/java/Tools/Jar Bundler.app".
It seems unrelated to Xcode at all since the directory was created a year ago.
So, I tried it and the application bundle I created with it seems empty and does not start my .jar
Further investigation is needed, since I must create at least 2 of those bundles to start
all my applications (one of these 2 is a kind of program manager I wrote long ago).
As it is Whit Monday, I have to delay my 'work' a bit; see you later.
The bundler should not bother with the contents of a .jar, however many classes and/or resources are in there.
Now I'm curious about the inputs to the Bundler.
I left everything blank/default except for the filenames and the main class name.
I made it create a .app in my Desktop with the main class name (only letters) but it created
a useless Desktop.app in there.
1) May be this trick works: build an app like 'another' with just one (empty?) main class but
by the right name you want; install that app andd consequently replace the .jar inside by the right one.
I believe that the app launcher does no more than start JAVA on the .jar which contains a manifest
for the main class name.
That tutorial looks pretty good, but it is pretty basic. There is nothing wrong with that, but it would give one a false impression of the scope of the C++ language. The fundamental problem with C++ is that it doesn't scale well from a human perspective. As your develop C++ software of greater and greater complexity, the amount you must learn increases at an even greater rate. Eventually you stagnate when, after enough years, you realize you don't know enough C++ to continue. Then you switch to something like Objective-C.
If you want to get a taste of the rest of C++, I suggest Nikolai Josuttis' excellent C++ Standard Library book: http://www.cppstdlib.com
For some of the tips and tricks that most people never learn until after developing a few years of bad habits, see any of Scott Meyers' books.
Did you realise that the Jar Bundler chooses the JAVA release?
On my Mac I had to install Java 6 (APPLE) and JAVA 7 (ORACLE) side by side.
So I made all my applications tell me (a.o.) what JAVA they run on (A pop-up from F1), very useful.
Now I'm very curious about the .app that works for you: does it have JAVA7-only calls inside?
Hi, first of all I was very busy last week to find out why my JAVA programs did not run well on OSX.
I found several strange things, e.g. the jar command produces a .jar file with a group (wheel) that's not mine.
Another example: contrary to MSWindows I can (accidentally) overwrite a running .jar file.
Back to 'business': I tried to be smart and dragged a .jar that works well to the Dock.
From there I can fix it and run it when ever I want. I only get an extra icon in the Dock.
The problem is that all Dock .jar-s are treated as documents and receive the same icon (coffee cup).
So I downloaded 'PrefSetter' only to find that the icon reference is NOT in the Dock's plist.
I still must find a way to set the correct icon on a running .jar, but the API containing the right methods might
be part of APPLE's JAVA-6; so I postponed search for a solution.
Now, I would like to go on with Jar Bundler, but I don't seem to understand that program.
Finally I get an empty app in the wrong place.
If you succeeded to at least build an app with it, please give me some hints about what
to enter where. To begin with: what file does it want for the main class?
I believe that for main-class you are supposed to select the jar that you exported from whatever IDE you were using. However, I think the main problem here is in the jar and its setup, because when I select a different jar, the name of the main class of the JAR file (ending in .class) appears in the text box. However, the name of the main class does NOT appear when I select the jar that I WANT to export.
Is :JOOP supposed to represent all the names that start in "J" or end in "ean" or am I missing something?
I recommend you open the faulty .jar and see if there is a top-level directory by the name "Meta-inf".
In there you should find a file by the name "Manifest.mf"; its contents could be:
Created-By: 1.7.0_21 (Sun Microsystems Inc.)
In this example it is a 5 (five!!!) line file, the 5th line must be empty;
the second line depends on referred other .jar's.
The 4th line in the example indicates the main class.
Please compare this for the .jar that works and the one that does not.
;JOOP! (my name is Joop; the other names I listed are more or less my name in other countries).