🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.sources.mac
12 messages
12 total messages Started by Ali Janah Mon, 08 Mar 1999 00:00
How to execute Java apps (not applet) on the mac ?
#34
Author: Ali Janah
Date: Mon, 08 Mar 1999 00:00
18 lines
1490 bytes
Hi !

I was wondering if anybody could inform me on how to execute java apps
(not applet) on the macintosh. Java Applet is no problem since
AppletViewer is there or i can just drop the html file on the browser, but
java apps with the method listed below ?

               public static void main ( String args[] )

On the PC, you just go to the DOS prompt and type java (programname.java)
and the apps will execute. Please help me !!

-- 
Ali Janah Abdullah
Software Engineering
Edith Cowan University

E-Mail = aabdulla@student.ecu.edu.au
Re: How to execute Java apps (not applet) on the mac ?
#35
Author: Chris Kelly
Date: Mon, 08 Mar 1999 00:00
28 lines
1990 bytes
aabdulla@student.ecu.edu.au (Ali Janah) wrote:
>I was wondering if anybody could inform me on how to execute java apps
>(not applet) on the macintosh. Java Applet is no problem since
>AppletViewer is there or i can just drop the html file on the browser, but
>java apps with the method listed below ?
>
>               public static void main ( String args[] )

Download MRJ and the MRJ SDK:

    http://developer.apple.com/java/

The MRJ SDK contains an app called JBindery, which allows you to
create a double-clickable app from your classes. The MRJ-Dev mailing
list, linked to from the page above, contains active discussions on
MRJ.

-------

** Support Mac-friendly Java! **
Vote for JConfig in the JDJ "Readers' Choice Awards."
See Category #3 (Best Class Library) at:

    http://www.sys-con.com/java/readerschoice/nominationform.html

You can download a free copy of JConfig at:

    http://www.tolstoy.com/samizdat/jconfig.html
Re: How to execute Java apps (not applet) on the mac ?
#36
Author: Tor Iver Wilhelmsen
Date: Mon, 08 Mar 1999 00:00
6 lines
1370 bytes
aabdulla@student.ecu.edu.au (Ali Janah) writes:

> On the PC, you just go to the DOS prompt and type java (programname.java)
> and the apps will execute. Please help me !!

Drop the class on JBindery.
Re: How to execute Java apps (not applet) on the mac ?
#37
Author: Scott Ruda
Date: Mon, 08 Mar 1999 00:00
67 lines
4613 bytes
Tor Iver Wilhelmsen wrote:
> 
> aabdulla@student.ecu.edu.au (Ali Janah) writes:
> 
> > On the PC, you just go to the DOS prompt and type java (programname.java)
> > and the apps will execute. Please help me !!
> 


> Drop the class on JBindery.

This presumes that you are a developer, and have access to the MRJ-SDK
to get JBindery. JBindery does not come in the user MRJ distribution.

There is no current Apple provided solution for end users to launch
'bare' java applications. I have asked them, and they say that it is the
responsibility of the developer to JBind the app into a Mac
double-clickable form for the end user.

But that leaves out a user who gets a .zip, .class or .jar file written
by the other 80% of the developers of the world that don't have any real
incentive (or possibly the equipment) to make a Mac double-clickable
version. Many of the apps will work fine on the Mac, if only the user
could launch them at all!

Users that have command line interfaces can use a simple README text
file + the CLI to launch the app. For them, the CLI is the 'default
launcher' for Java apps. This is no surprise, since Java comes from Sun,
and all their OSs have CLIs. Some developers supply BAT files, Shortcuts
or sh scripts to even make it easier. So, those other platforms have
_many_ ways they can launch the java apps.

**Note: I do not want to get into a CLI vs GUI discussion here. There is
a GUI way to solve this problem. If Apple (and presumabley it's users)
don't want a CLI, then fine. But then there needs to be a GUI solution offered.

For Apple, the 'default launcher' is the Finder. Therefore, they need to
have some way to double click on a given java application, and have it
do whatever is needed to launch the app. For Java apps, admittedly, this
is more complicated then for Mac apps, which were written from the
ground up as Mac apps. But it _is possible_ to at least give the
equivalent, if not something better, than a CLI launcher. Double
clicking on a .jar file can be bound to launch some application that
prompts the user with the necessary questions about how to launch the
java app. 

This is essentially what JBindery is, but it is designed for a
developer, with alot of terminology and options that only a developer
needs. A simplified version of it would do fine for users. I had
suggested to Apple to do a user version of JBindery, but got no answer
on that. There are a number of third party java app launchers, including
one I think is called DropMain. Metrowerks has an app called 'Metrowerks
Java' which comes with their development environment, and also works
fine (though I believe the UI could be improved).

Regardless of whether there are third party ways to do this, I still
think that Apple should supply some default launcher in the user MRJ
distribution, and not just one for developers. I think they are
artificially limiting the use of Java on the Mac platform to only apps
that have been given the 'blessing' of Mac developers. The promise of
Java is that developers can write once and have the app run anywhere
without additional work, especially for what the developer may consider
an 'insignificant' platform. It is Apple's responsibility to make the
Mac OS competitively capable, otherwise users will have yet one more
excuse to jump ship.

Scott
Re: How to execute Java apps (not applet) on the mac ?
#29
Author: Ali Janah
Date: Tue, 09 Mar 1999 00:00
36 lines
2399 bytes
In article <36E4A513.F1BDA7F1@emu.com>, Scott Ruda <scottr@emu.com> wrote:

> Tor Iver Wilhelmsen wrote:
> > 
> > aabdulla@student.ecu.edu.au (Ali Janah) writes:
> > 
> > > On the PC, you just go to the DOS prompt and type java (programname.java)
> > > and the apps will execute. Please help me !!
> > 
> 

> 
>> This is essentially what JBindery is, but it is designed for a
>> developer, with alot of terminology and options that only a developer
>> needs. A simplified version of it would do fine for users. I had
>> suggested to Apple to do a user version of JBindery, but got no answer
>> on that. There are a number of third party java app launchers, including
>> one I think is called DropMain. Metrowerks has an app called 'Metrowerks
>> Java' which comes with their development environment, and also works
>> fine (though I believe the UI could be improved).
> 

Thanks for your explanation. I do have Jbindery which i have downloaded
from Apple which is part of the MRJ SDK 2.1 package. But it is not exactly
easy to use it. I can't drop stuffs on it. The Jbindery icon does not
become shadowed (usually indicating that the files are not an input for
it). Please could u explain to me how to use this thing ?.......

Thanks again..

-- 
Ali Janah Abdullah
Software Engineering
Edith Cowan University

E-Mail = aabdulla@student.ecu.edu.au
Re: How to execute Java apps (not applet) on the mac ?
#30
Author: Geert Poels
Date: Tue, 09 Mar 1999 00:00
12 lines
1817 bytes
> Thanks for your explanation. I do have Jbindery which i have downloaded
> from Apple which is part of the MRJ SDK 2.1 package. But it is not exactly
> easy to use it. I can't drop stuffs on it. The Jbindery icon does not
> become shadowed (usually indicating that the files are not an input for
> it). Please could u explain to me how to use this thing ?.......
You should use the add-button to add either directories, zip or jar -files
(in which the compiled java .class files are in); next enter the name of
the class-file in which the main-routine is.
This should already work but I suggest you save it first, to avoid
having to add everything everytime again.

Geert
Re: How to execute Java apps (not applet) on the mac ?
#31
Author: Scott Ellsworth
Date: Tue, 09 Mar 1999 00:00
86 lines
5198 bytes
In article <36E4A513.F1BDA7F1@emu.com>, Scott Ruda <scottr@emu.com> wrote:
>Tor Iver Wilhelmsen wrote:
>> 
>> aabdulla@student.ecu.edu.au (Ali Janah) writes:
>> 
>> > On the PC, you just go to the DOS prompt and type java (programname.java)
>> > and the apps will execute. Please help me !!
>> 
>
>
>> Drop the class on JBindery.
>
>This presumes that you are a developer, and have access to the MRJ-SDK
>to get JBindery. JBindery does not come in the user MRJ distribution.

>There is no current Apple provided solution for end users to launch
>'bare' java applications. I have asked them, and they say that it is
>the responsibility of the developer to JBind the app into a Mac
>double-clickable form for the end user.

>But that leaves out a user who gets a .zip, .class or .jar file
>written by the other 80% of the developers of the world that don't
>have any real incentive (or possibly the equipment) to make a Mac
>double-clickable version. Many of the apps will work fine on the Mac,
>if only the user could launch them at all!

Yes and no.  A simplified tool as you suggest would be a good idea,
and I do hope they put one together, but since normal mortals can
download the SDK, and thus get JBindery, you do not have to be a
developer to get JBindery.

This may appear to be quibbling, but I remember the Bad Old Days
when you had to take some serious effort to get anything Apple
considered a developer tool.  Since any user can get it with minimal
grief, the issue become whether JBindery is too complicated for an
end user.  I think we agree that it likely is, just because it has
options that may not be needed.

>Users that have command line interfaces can use a simple README text
>file + the CLI to launch the app. For them, the CLI is the 'default
>launcher' for Java apps. This is no surprise, since Java comes from
>Sun, and all their OSs have CLIs. Some developers supply BAT files,
>Shortcuts or sh scripts to even make it easier. So, those other
>platforms have _many_ ways they can launch the java apps.

I submit that most users would not be able to use a simple readme
and a CLI, at least judging from the people I work with, the end users
I support, and the end users my wife supports at the city she works
for.  I believe that the kind of user who can do this is exceptional,
and would likely be able to use JBindery.

JBindery certainly is a bit on the complex side, but I can see
Apple's point.  Of the people in my office here, every one of the PC
developers could handle a batch file, and could handle JBindery if
they felt the need.  The staff cannot handle modifications to batch
files at all, and I would not expect them to be able to do JBindery
either.

Similarly, every MIS person I know would have about equal problems
with JBindery and any changes to the batch file a developer created.
If the system is straightforward, or they have experience, no problem.
If not, things get dicey.  The people they support would have hissing
fits with even the most simple batch file or trying to figure out
JBindery, at least judging from the amount of anguish batch file
modifications produce when they arise.

Again, this may not be representitive of the whole computer using
population, but it seems to be true from my own personal experience.

>This is essentially what JBindery is, but it is designed for a
>developer, with alot of terminology and options that only a developer
>needs. A simplified version of it would do fine for users.

I do think we could see this being helped a great deal by Java2.  Sun
has added a tag to the jar manifest file which names the main class. 
If we assume that the jar file contains every needed class, then Apple
could fairly easily make drag and drop JBindery that just
auto-launched the main class.  I would like to see this, and I would
like to see CW add the main class tag as soon as possible.

Scott

Scott Ellsworth          scott@eviews.com
"When a great many people are unable to find work, unemployment 
results" - Calvin Coolidge, (Stanley Walker, City Editor, p. 131 (1934))
"The barbarian is thwarted at the moat." - Scott Adams
Re: How to execute Java apps (not applet) on the mac ?
#32
Author: Scott Ellsworth
Date: Tue, 09 Mar 1999 00:00
24 lines
2223 bytes
In article <aabdulla-0903991927250001@139.230.47.36>, aabdulla@student.ecu.edu.au (Ali Janah) wrote:
>Thanks for your explanation. I do have Jbindery which i have downloaded
>from Apple which is part of the MRJ SDK 2.1 package. But it is not exactly
>easy to use it. I can't drop stuffs on it. The Jbindery icon does not
>become shadowed (usually indicating that the files are not an input for
>it). Please could u explain to me how to use this thing ?.......

Are your files jar files, or are they .class files?  Where did they
come from?

If they were produced on your Mac, they were likely made with CW,
which should put in the right creator types for JBindery to recognize
the kind of file.  This would imply a desktop rebuild might help.

If, on the other hand, you just downlaoded them, and are acting as a
user, then they may not have a file type such that JBindery knows that
they are .jar or .class files.

Scott

Scott Ellsworth          scott@eviews.com
"When a great many people are unable to find work, unemployment 
results" - Calvin Coolidge, (Stanley Walker, City Editor, p. 131 (1934))
"The barbarian is thwarted at the moat." - Scott Adams
Re: How to execute Java apps (not applet) on the mac ?
#33
Author: Greg Bolsinga
Date: Tue, 09 Mar 1999 00:00
16 lines
1930 bytes
In article <aabdulla-0903991927250001@139.230.47.36>,
aabdulla@student.ecu.edu.au (Ali Janah) wrote:

=>Thanks for your explanation. I do have Jbindery which i have downloaded
=>from Apple which is part of the MRJ SDK 2.1 package. But it is not exactly
=>easy to use it. I can't drop stuffs on it. The Jbindery icon does not
=>become shadowed (usually indicating that the files are not an input for
=>it). Please could u explain to me how to use this thing ?.......

Perhaps your desktop needs to be rebuilt. JBindery accepts drags.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
Greg Bolsinga                                        Java Tools
bolsinga@metrowerks.com                  Metrowerks Corporation
 Automatic shoes give me 3-D vision and the California blues.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
Re: How to execute Java apps (not applet) on the mac ?
#27
Author: Ali Janah
Date: Thu, 11 Mar 1999 00:00
29 lines
2370 bytes
> Are your files jar files, or are they .class files?  Where did they
> come from?
> 
> If they were produced on your Mac, they were likely made with CW,
> which should put in the right creator types for JBindery to recognize
> the kind of file.  This would imply a desktop rebuild might help.
> 
> If, on the other hand, you just downlaoded them, and are acting as a
> user, then they may not have a file type such that JBindery knows that
> they are .jar or .class files.

The java apps is created by myself using BBEdit as my editor (I don't use
CodeWarrior yet). Then after saving the .java file, I then drop the .java
file on the Drop�Javac script which will then compile the .java into a
.class file. Now if this is an applet..all i have to do is just create a
simple appletcode reference in a html file or use AppletViewer to see
it...but this is a JAVA apps which does not extend or inheret the Applet
Class. I have tried dragging the .class file to JBindery to no success.
Maybe I will try again after rebuilding the desktop. Have refer to the PDF
manua that comes with it....but it's not exactly fully comprehensibale.
What can i do ?

-- 
Ali Janah Abdullah
Software Engineering
Edith Cowan University

E-Mail = aabdulla@student.ecu.edu.au
Re: How to execute Java apps (not applet) on the mac ?
#28
Author: Chris Kelly
Date: Thu, 11 Mar 1999 00:00
35 lines
2741 bytes
aabdulla@student.ecu.edu.au (Ali Janah) wrote:
>The java apps is created by myself using BBEdit as my editor (I don't use
>CodeWarrior yet). Then after saving the .java file, I then drop the .java
>file on the Drop�Javac script which will then compile the .java into a
>.class file. Now if this is an applet..all i have to do is just create a
>simple appletcode reference in a html file or use AppletViewer to see
>it...but this is a JAVA apps which does not extend or inheret the Applet
>Class. I have tried dragging the .class file to JBindery to no success.
>Maybe I will try again after rebuilding the desktop. Have refer to the PDF
>manua that comes with it....but it's not exactly fully comprehensibale.
>What can i do ?

Get a Mac ZIP program, put your class into an *uncompressed* .zip
file, drag the .zip onto JBindery...

JBindery should open. In the 'Command' section (the first section),
enter the name of your class in the 'Class Name' text box. Then, click
'Run', or click 'Save' to save it as a standalone app.

Also, be sure and join the MRJ-Dev mailing list, linked to at the page
below. It features vast multitudes of helpful MRJ developers,
including Apple engineers:

    http://developer.apple.com/java/

-------

Is Java *really* cross-platform? Visit this page to find out:

  http://www.tolstoy.com/corejava.html

Then vote for JConfig in the JDJ "Readers' Choice Awards!"
See Category #3 (Best Class Library) at:

    http://www.sys-con.com/java/readerschoice/nominationform.html
Re: How to execute Java apps (not applet) on the mac ?
#26
Author: Dave Horlick
Date: Sat, 13 Mar 1999 00:00
15 lines
1902 bytes
In article <aabdulla-1103991235190001@139.230.47.36>,
aabdulla@student.ecu.edu.au (Ali Janah) wrote:

> I have tried dragging the .class file to JBindery to no success.

Ali,

Did Drop�Javac produce more than one .class file? If so, you need to drop
*all* of these class files onto JBindery. On one of the JBindery panels you
will need to type in the name of the .class file that has your main()
method in it. Make sure to keep your use of letter capitalization consisent
from source code to filename to JBindery field.

Hope this helps,
Dave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads