aspose file tools*
The moose likes Mac OS and the fly likes Problem with NetBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Problem with NetBeans" Watch "Problem with NetBeans" New topic
Author

Problem with NetBeans

Barry Burd
Author
Ranch Hand

Joined: Jun 18, 2003
Posts: 118
    
    5

I'm not an experienced Mac user, but I'm trying to run NetBeans (the latest RC) on Mac OS 10.3. First, I installed the latest 1.4.x JDK. That works. (I got it to work with Eclipse.) Next, I downloaded NetBeans from NetBeans.org. The product uncompresses itself and leaves a NetBeans icon on the Mac desktop. But then, when I double-click the icon, the NetBeans icon bounces for a second or two and then nothing happens. If I open a terminal session and type "ps ux" then I don't see a NetBeans process or a java process. So I think the process is just terminating itself immediately. How can I diagnose this problem? Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

I'd try starting it from the command line. Who knows what kind of icon it created on the desktop.

Selecting the icon and hitting Command-I will bring up a dialog with info on the icon which might give you some clues as to what it is.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Barry Burd
Author
Ranch Hand

Joined: Jun 18, 2003
Posts: 118
    
    5

The icon represents a .app file. So (from what I gather) it's really a folder. I opened a terminal window and went to the NetBeans.app folder's bin directory. There I found a netbeans file, which already had execute permissions. So I tried executing ./netbeans, and I got an error message saying that the dirname command isn't found. (For that matter, I can't execute the man command in the shell because it can't find /usr/bin/col. Something is wrong with my shell?)
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
On OSX applications are actually a special kind of folder. Inside the folder are the executable, error message files, icons, etc. Normally you should be able to just double-click on the .app folder and the OS will find the executable inside and run it.

To run an app from the command line, use the 'open' program (/usr/bin/open) on the .app file, e.g.
open /somepath/NetBeans.app
That should do the same thing as the double-click, but maybe you'll see some erorr messages.
Barry Burd
Author
Ranch Hand

Joined: Jun 18, 2003
Posts: 118
    
    5

Ok -- Here's what I get when I issue the open command:

open[372] LSOpenFromURLSpec() returned -10814 for application (null) path /Users/barryburd/Desktop/NetBeans.app
open[372] Couldn't open file: /Users/barryburd/Desktop/NetBeans.app

Is this a simple matter of doing a chmod, or is something more complicated going on here?
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
Yeah, my best guess is that it's an ownership and/or permissions problem. Take a look at some of the apps in /Applications and compare their ownership and permissions.
Barry Burd
Author
Ranch Hand

Joined: Jun 18, 2003
Posts: 118
    
    5

Well, I tried poking around with .app folders, but I didn't find anything that looked suspicious. Here's a terminal session. (It may have some information that you can decipher.) When I issue the open command, nothing happens...

-bash-2.05b$ /usr/bin/open NetBeans.app
-bash-2.05b$ cd NetBeans.app/
-bash-2.05b$ ls
Contents
-bash-2.05b$ cd Contents
-bash-2.05b$ ls
Info.plist MacOS Resources
-bash-2.05b$ cd MacOS/
-bash-2.05b$ ls
netbeans
-bash-2.05b$ cd netbeans
-bash: cd: netbeans: Not a directory
-bash-2.05b$ ls -l netbeans
lrwxr-xr-x 1 barrybur barrybur 34 2 Dec 14:42 netbeans -> ../Resources/NetBeans/bin/netbeans
-bash-2.05b$ ./netbeans
./netbeans: line 1: dirname: command not found
./netbeans: line 1: dirname: command not found
./netbeans: line 68: /../platform4/lib/nbexec: No such file or directory
-bash-2.05b$ ls -l NetBeans.app
total 0
drwxr-xr-x 6 barrybur barrybur 204 2 Dec 17:59 Contents
-bash-2.05b$
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with NetBeans