🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1274

Re: Help? Mac OS X and Java 2

#1274
From: MWRon
Date: Tue, 23 Jan 2001 15:08
102 lines
5724 bytes
in article crow-A5F81F.01030723012001@news1.rdc2.on.home.com:119, Crow at
crow@the.nest wrote on 1/22/01 9:55 PM:

> I'm not mistaken, Mac OS X has. Am I right so far? The problem is, when
> I try to compile and run anything, CodeWarrior tells me that it can't
> "initialize the the Java VM". 

You need to install CodeWarrior on the same partition as Mac OS X or you
will get this error

> Strangely, when I compile and run the same programs I've written (using
> CW's JDK1.2 stationary) in Mac OS 9.1, they run fine. What gives? How
> can I run the programs if OS 9 doesn't support Java 2? I don't
> understand at all. Any help would be greatly appreciated.

Because you didn't use any Java2 code, you just used 1.1.x Java routines.

Again Here is the CodeWarrior FAQ for Java on OX S

Unable to Locate Java VM
Q) When I try to build a Java Application with CodeWarrior tools the
linker reports it is unable to locate the Java VM and fails to link.
A) The problem is CodeWarrior is having trouble getting the full path for
PluginClasses.zip. It needs this path (and file) in order to properly set
the classpath when instantiating the Java VM through JNI (so that we can
find the linker classes we use).
The problem seems to be in getting the full paths from FSSpec's. The full
path we get from the FSSpec for your particular setup is /Mac OS
X/Applications/CodeWarior..., but since Applications is mounted at root,
Java sees /Applications, but not /Mac OS X/Applications.
Try installing CodeWarrior on another partition. That should solve the
problem, but please report this to cw_bug@metrowerks.com if it doesn't
work, so we may help.

Can not Initialize Java VM
Q) The linker gives me an error message saying that it can not initialize
the Java VM.
A) If you have OS X Beta and OS 9 on separate partitions and CW 6 is
installed on the OS X Beta partition then just copy the CW 6 folder to the
OS 9 partition, delete the old copy and run it from the OS 9 partition.

Java Applet Support
Q) I want to make a Java Applet how can I do that?
A) Currently, Java Applet development is not supported on MacOS X.  You can 
only run applications from CodeWarrior on OS X. You cannot run applets.

Getting Help
Q) Where can I get help on  Java for Public Beta Mac OS X?
A) If you need help with CodeWarrior Java for Mac OS X while it is in
public Beta we recommend you post messages to the newsgroups
<codewarrior.mac>
and 
<comp.sys.mac.programmer.codewarrior>
Others on those newsgroup will be able to help you with your problems.
Also, Metrowerks monitors these groups and may offer help there.  You may
also want to subscribe to  the MRJ-Dev mailing list, which you can
subscribe to by going to <http://developer.apple.com/java/>.

VM Can Not Be Found Error
Q) What tools are there for Java on Mac OS X
A) You cannot do Java on OSX without the thrill seeker  tools
These tools are on the 
CodeWarrior Reference CD
Thrill Seekers
      MacOS X Java Plugins  folder
Be sure to read the JavaMacOSX.txt file for more information.

 Using Java RAD Tools for Code Generation
Q) Why can't I use the Java RAD tools for Code Generation on Mac OS X 
A) Currently, Java RAD development tools are not supported on MacOS X.  

Simple Console Programming
Q) I made a simple Console Java program to test it but it does not work
A) You must run Java console input and output programs from Terminal.
CodeWarrior will run them but since there is not input or output console
you can not see them.  You can create and run GUI programs only from the
IDE.
RunJavaX will launch java applications without bringing up a console
window so if your application only uses standard output (like, for
example, the hello world stationery), you won't see anything at all
(runjavax will come up and go away). If your application brings up a GUI,
then runjavax should come up and the GUI should also come up. However,
there was also a change in the public beta which is causing runjavax to
fail (its something we need to fix in runjavax)... so you should launch
the application/applet manually instead of launching it from the IDE.
This should not affect debugging, but you won't be able to launch the
debug session from the IDE (see the release notes about this). You'll need
to launch java from the terminal, specifying the debug options, then
launch the debugger in "remote debugging" mode.

How Do I Run Java from Terminal
Q) How do i run a java application in from OS X Terminal.  
A) You can run Java from Terminal  with a command something like this
example command line
>java -cp myjar.jar MyApp arg1 arg2 arg3

-- 
               "GEEKWARE IS BACK"

http://www.metrowerksstore.com/geekware.html

Metrowerks  "Software Starts Here"   MWRon@metrowerks.com
Technical Details
Message-ID: <mwron-2301011008270001@c243286-a.bcreek1.mi.home.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
References: <crow-A5F81F.01030723012001@news1.rdc2.on.home.com:119> <B6927B21.748C%bolsinga@io.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,fe8bdba87cf068ed
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,fe8bdba87cf068ed
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2001-01-23 07:52:01 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
From: mwron@metrowerks.com (MWRon)
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: Help? Mac OS X and Java 2
Date: Tue, 23 Jan 2001 10:08:27 -0500
Organization: Metrowerks
Lines: 102
Message-ID: <mwron-2301011008270001@c243286-a.bcreek1.mi.home.com>
References: <crow-A5F81F.01030723012001@news1.rdc2.on.home.com:119> <B6927B21.748C%bolsinga@io.com>
NNTP-Posting-Host: p-384.newsdawg.com
X-Newsreader: MT-NewsWatcher 2.4.4