|May 15, 2005, 11:32 AM||#1|
Java, XCode2, Swing Application - Missing File JavaApplicationStub
OK, I'll confess now that while I'm OK with Java, I am new to developing Java applications with Xcode of any version as I normally use Eclipse. Anyway, having bought Tiger I thought I'd at least take a look at Xcode2, mostly for its diagramming tools and because I'm interested in developing a Java-based tool for my Mac that integrates nicely with the other applications. So, I've installed Xcode2 (everything), have built a new Java Swing Application Project, and have then selected Build since it appears to have enough basic classes defined that it should produce something runnable. However, my build fails due to the following error:
Missing File or Directory: /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
Having a quick check in Finder I can confirm that this file/directory is indeed not present on my disk (in fact, I have no MacOS folder in the Resources folder, just a collection of what appears to be language localisations for English, French, German and Japanes).
Perhaps I am jumping the gun a little here, but should this file/folder already exist on my computer, or does it get created later? If it should be there already, any ideas on how I can get it short of reinstalling Tiger?
At this time I have reinstalled Xcode2 and have downloaded the Java 1.5 SDK. Neither actions have resolved the issue.
Any suggestions are gratefully received.
|May 15, 2005, 12:07 PM||#2|
I have the file. I could put it up for download if you think that will resolve the issue. If you don't have the file it may suggest that you have more severe problems that this is a result of.
How did you install Tiger? Update, Archive/Install...?
|May 16, 2005, 06:50 AM||#3|
Damn, I was hoping that this was the same for everyone. Yeah, a download of the file would be useful, although it'd be even better to know where it originally came from so that I can troubleshoot the root cause.
In terms of the installation of Tiger, it was a clean install. I didn't have any problems installing the OS but I did encounter a few issues with Macromedia Studio MX 2004, which I highlighted in another thread but was eventually able to resolve. Aside from this I haven't seen any other indications of a problematic install which makes this even more annoying.
As an aside to this, I tried to run one of the example Java Cocoa applications what Xcode installs with, specifically the BlastApp. While I don't get the same error message when attempting to Build and Run the application, it doesn't work when executed and I see the following error messages in the Run Log window:
[Session started at 2005-05-16 12:40:52 +0200.]
2005-05-16 12:40:54.061 BlastApp Unknown class `BlastAppController' in nib file, using `NSObject' instead.
2005-05-16 12:40:54.063 BlastApp Could not connect the action createNewGame: to target of class NSObject
2005-05-16 12:40:54.063 BlastApp Could not connect the action createDemo: to target of class NSObject
2005-05-16 12:40:54.063 BlastApp Could not connect the action showPrefs: to target of class NSObject
This was created simply by opening the example project and selecting Build & Go. No error messages were reported during the Build process but obviously something screwy is going on here. I have no idea at the moment what a NIB file is (yup, it's that bad) but I can see that Xcode successfully built the application and that BlastAppController.class was one of the files created (along with all the other Java class files in the build/BlastApp.build/BlastApp.build/JavaClasses directory.
Is it possible to uninstall Xcode2 by simply trashing the Developer folder, or is it more in-depth than that? Additionally, (and as much as I hate to ask the question) do you think that reinstalling Tiger will correct the issues that I am encountering?
Thanks for the help.
|May 16, 2005, 07:18 AM||#4|
I'm not really and xcode user but I thought I'd try what you have and built that program. It worked, screenshot below.
The dev tools install lower-level files than the application and I think it was worth a try to uninstall it using the real uninstaller. It sounds like a rather important java file somewhere on your system was corrupted or skipped during installation. A reinstall may seem like hitting the problem with a sledgehammer but I think it would be the fastest way. Archive and install while retaining user preferences would be the best way.
[I'm not a java aficionado, somebody with a more authoritative opinion will come along hopefully.]
|May 16, 2005, 07:59 AM||#5|
Thanks for trying to get in contact this morning. What I also neglected to mention is that as well as Xcode (or something) being apparently screwed on my PowerBook, my Internet connection isn't healthy either. A repairman is coming to check out our telephone tomorrow (taken 2-weeks to organise...) so hopefully this will be resolved as well.
Anyway, I've discovered the uninstall-devtools.pl script and am running this at the moment. I'm going to repair permissions after this is complete, reboot, repair again (just for the hell of it) and will then try to reinstall Xcode. If this doesn't work then I'm going to be somewhat pissed off but won't be reinstalling Tiger for a while since, frankly, the backing-up/reinstalling process takes so friggin' long. Next time I do this I'm buying a Firewire hard drive since the Mac to PC via Airport Extreme (although only 802.11b on my Book) process takes days. Sod that.
|May 16, 2005, 10:19 AM||#6|
OK, the problem appears to be solved. I know that the issue was caused, in part, by me trying to set the default Java VM to 1.5 so that it could be used by the current version of Tomcat and Eclipse. While the download of Java 1.5 provides a little application for setting which version of Java is used, it doesn't do anything for the selection of the appropriate version for compilation and so this had to be manually "frigged" by amending the Links set in the /System/Library/Frameworks/JavaVM.framework/Versions folder so that both Current and CurrentJDK Links point to 1.5.0. However, given the problems that I've encountered with Xcode2, it apparently completely screws it up so I've spent the last hour or so trying to find out what I did on Saturday and correcting it back to the way that it was. I have now reset things to the following:
Current -> A
CurrentJDK -> 1.4
I have no idea what the folder A relates to but it does contain the infamous Resources/MacOS/JavaApplicationStub. Regardless, setting Current to point to A and rebooting the Mac seems to have sorted things out as I can now compile and run all the example Java Cocoa examples. Unfortunately, I now note that the helicopter game is a bit crap...
I guess I am going to have to wait for Java 1.5 to become the standard on OS X before Xcode2 is going to play nicely with it.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Missing Java control panel||martosprint||OS X 10.8 Mountain Lion||3||Nov 6, 2013 02:42 PM|
|Help, Missing Application!||ncaissie||iOS 6||3||Dec 21, 2012 11:24 AM|
|Need help with Java, test is soon and need the application.||Jonari||Mac OS X 10.7 Lion||13||Oct 22, 2012 08:31 PM|
|Missing Application?||Peterc165||MacBook||5||Aug 12, 2012 11:42 AM|
|Java Update unsigned application error||jamroman||Mac Programming||4||Jun 22, 2012 12:56 PM|
All times are GMT -5. The time now is 04:11 PM.