Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Yeah sorry I've been busy, here is what hapened:

I receive five files:
Info.plist
JavaApplicationStub
MRJApp.properties
GenericJavaApp.icns
PkgInfo


I tried downloading them all to a folder and renaming the folder .app, that didn't work, maybe you could .sit or something like that.
 
That's what I had feared. I had tried attaching the file using Hotmail, my company's e-mail service, and finally my third-party e-mail address. Apparently the .app file is just a graphical representation of a .class file along with some other preference files.

Again, try executing your own HelloJava4 from Terminal. If it executes, it might have something to do with MRJAppBuilder.
 
I think they're must be something wrong with my Java launching software. I tried the HelloJava4 app again. I compiled, did the normal things. This time i tried launching the gui again using terminal, it thought for a sec. I was waiting for a cryptic error and it opened in the dock like a new app and ran. This was using the files generated by MRJ. Ideas?! I'm still :confused:
 
Originally posted by W-_-W
I think they're must be something wrong with my Java launching software. I tried the HelloJava4 app again. I compiled, did the normal things. This time i tried launching the gui again using terminal, it thought for a sec. I was waiting for a cryptic error and it opened in the dock like a new app and ran. This was using the files generated by MRJ. Ideas?! I'm still :confused:

You mean the files I sent you or the files you compiled yourself? Also, Java GUI programs usually take an extra second or so to launch (since it's being executed from within the Java VM).
 
Originally posted by W-_-W
Could you just post the source here, or just email me it?

The "HelloJava4" file I posted on the previous page is the one. Just copy it, paste it in a new Java file from Project Builder (or any plain text document), name it as "HelloJava4.java", and compile.
 
A place to look

Hey, just wondering if you have checked with the ADC site for solutions?

Here is a link that may be of help.

Also, for a potentially more beginner-friendly, JBuilder Personal 7 from Borland can be had for the low low cost of FREE! It's a pretty good, fairly feature complete environment with good debugging tools and decent help resources, and is OS X native. It can be found here . You do have to register with BOrland, but it is pretty painless. Hope this helps!

RL
 
I'll insert some images to show the exact steps you might need to take. I'm posting them here just in case anyone has the same problem in the future.

First create a Java file from Project Builder:

pic1.jpeg


Then name the file "HelloJava4." It doesn't really matter what you name it, but the name of the file must match the name of the public class you give in the Java file in the line "public class NAME_HERE".

pic2.jpeg


Go ahead and paste the code I posted in the other page. The text in green doesn't really matter, but just make sure the first few lines up to "public class HelloJava4" match what I have.

pic3.jpeg


Then compile the code in Terminal. I saved it on my Desktop, so I went to my Desktop directory and typed "javac HelloJava4.java."

pic4.jpeg


Two files should have been created.

pic5.jpeg


Then go back to Terminal and type "java HelloJava4" to execute the program.

pic6.jpeg


Finally, a HelloJava4 program should execute and a window should pop up.

pic7.jpeg
 
I'm having trouble loading up any of your pictures on your tutorial you ever so nicely created for us retards.

Houston we still have a problem, I can't get double clickable apps. But can launch gui apps from the finder.
 
Originally posted by W-_-W
I'm having trouble loading up any of your pictures on your tutorial you ever so nicely created for us retards.

Houston we still have a problem, I can't get double clickable apps. But can launch gui apps from the finder.

Hum, if that's the case, it might be something wrong with the MRJAppBuilder. Did you install it along with the Developer's tools CD? Perhaps a reinstallation of MRJAppBuilder is in order? Don't worry too much, though: It's not the end of the world if you can't create a double-clickable Java GUI app. As long as you can execute the program from Terminal, it'll be OK. ;)
 
I wonder if the apps that I create will run on other macs. I will reinstall dev tools to see if it makes a difference. It better, it will be so cool to be able to make my own clickable apps, that will be the icing on my coffee flavoured cake. (Get it?)
 
I'm sorry, but I don't understand the confusion on this thread. Here's my rendition of why you're having problems.

Java is indeed a completely platform neutral technology. What you aer having problems with is the invocation of the java interpreter. The one hurdle that java didn't overcome (and could never, really) is that different platforms have different methods of starting up programs and of starting programs from their repective "finders."

A perfect example of this is OS X's methods for identifying executable programs from the finder. ANY GUI program in OS X has to have certain elements in its .app folder in order to be launchable as an application from the finder. There are ways around this (like creating a unix shell script to launch a pure Java program).

In addition, OS X handles java very well, but it also extends it with additions to help it integrate into the OS better. The end result is that OS X java programs aren't truely "native java" programs. This is a minor inconvenience as the differences in the code base between OS X, Unix and Windows "platform native" java programs (ie. double clickable) is negligable.

OS X's overhead for making a platform native java program is daunting the first time you try it. But once you get your head around it, its really not that bad. Look at Apple's Java documentation that comes with the developer tools. It should have examples and all of your answers.

This will show you how to make any pure java Jar file into a double clickable app in OS X.
Developer/Documentation/Java/pdf/MacOSXJava.pdf

This will show you how to create a completely Cocoa Java application:
Developer/Documentation/Cocoa/JavaTutorial/index.html

Taft
 
As for Java editors, in my opinion IntelliJ's IDEA is the best out there (www.intellij.com). It has a number of great tools to ease development (the refactoring tools are really great). It also sports full Ant integration (Ant is a build tool similar to, but easier to use and more powerful than, make).

The only thing it doesn't cover is GUI design integration. If you NEED that, try JBuilder from www.borland.com. They have a free version. Its an allright IDE, but nothing compared to IDEA.

Taft
 
Originally posted by W-_-W
I wonder if the apps that I create will run on other macs. I will reinstall dev tools to see if it makes a difference. It better, it will be so cool to be able to make my own clickable apps, that will be the icing on my coffee flavoured cake. (Get it?)

The HelloJava4 program you compiled will work on any platform with a Java VM. Users will have to execute it from the command console. If you want a double-clickable version of the program, however, you will need to create it separately depending on the platform.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.