I have not tested this myself, but try this... If you want to compile java files based on a file that contains a list of files, try this in the text-edit field in place of any filenames:
@filesToCompileWhere filesToCompile is a file in the same directory as MacJikes and contains a return-delimited list of files you want to compile. ie:
'Macintosh HD:Work files:java:MyProgram.java' 'Macintosh HD:Work files:java:MyOtherProgram.java'Yes, this should work from AppleScript also. Yes, I now understand that MacJikes' user interface needs a major overhaul. Please use AppleScript with MacJikes in the interim. The next release will be directed toward making MacJikes much more intuitive to use.
Date: Wed, 10 Feb 1999 11:14:27 -0500 From: shieldsd@us.ibm.com Subject: [Jikes] Re: Jikes and JIMI - a perfect marriage? Rick, Re 1: Jikes doesn't do *any* optimization or inlining. All "-O" means to Jikes is to suppress the line number table. In general we have found that javac and Jikes emit essentially the same code, as there is usually only one way to process a particular construct (one of the strengths of the JVM design). We have seen claims that code produced by Jikes is faster, but no one has ever sent us any hard evidence of this. Class files produced by Jikes are sometimes smaller, as we only put something in the constant pool if there is a reference to it, but this should make little practical difference. Re 2: We don't do any inlining. I recall John Rose from Sun's team saying at a presentation at the last JavaOne that Sun would be doing less and less optimization in the front end, as their experience had been that overly aggressive optmization could produce security problems, and they felt all optimization should be done at run time, such as by using HotSpot, etc. Re 3: We get occasional reports about code produced by Jikes failing verification. We try to fix them as we can, though we're still catching up with the backlog of problem reports received before (while we were busy getting it out) and after release of Jikes in source form. It can be hard to track such problems down as the verifier doesn't always pinpoint the cause of verification failure. We have received reports of problems with JIT's. We suspect this is because JIT's are usually developed and tested in the context of a particular front end, and so "learn their master's voice", but may not work with other front ends. For example, early versions of the IBM's JIT for OS/2 failed as it hadn't been told about the "nop" operator. We've also gotten a few complaints about failures running with Symantec's JIT. This suggests you might be better off continuing to build your final release version using javac, or whatever other compiler is appropriate. We know of several companies, including IBM for some projects, that do their development using Jikes and then do final build using javac, we also know of others that do build production versions using Jikes. Re Jikes news, we've just finished implementing the language extensions added in latest JDK 1.2 (aka Java 2), and hope to post a new version shortly. If you haven't yet done so, I encourage you to subscribe to our mail lists -- instructions for doing so can be found at http://www.ibm.com/research/jikes. thanks, dave PS to Jikes list; Rick is head of Java Lobby (30,000+ members). His company was also a finalist in the recent JavaWorld awards (as was Jikes, in a different category). PS to Rick: Good to see you at the NYC Java UG meeting. If you're going to LinuxWorld Expo in San Jose in March, look for me in the IBM booth. "Rick Ross"on 02/10/99 08:19:59 AM To: shields@watson.ibm.com cc: Luke Gorrie (bcc: David Shields/Watson/IBM) Subject: Jikes and JIMI - a perfect marriage? Dear Dave, We're considering switching to Jikes to produce our final, distributable copies of the JIMI graphics libraries. I have a few questions from our lead develoepr (who is a big fan of Jikes): 1 - Is optimized output from Jikes typically at least as fast or faster than optimized output from javac? Are there any circumstances where you know Jikes will produce slower code? How aggessive are your optimizations in Jikes? 2 - We have encountered illegal optimizations in javac (ie - protection violations w/inlining). Isn't this one of the specific places where Jikes will be more rigorously adherent to specs? 3 - Are there any gothcha's we need to be aware of? Particularly, are there any points where the non-compliant MS VM's will puke on classes compiled by Jikes, even though Jikes may be producing correct bytecode? Are there any known problems with other major VM's, again even though Jikes may be producing legal and correct bytecodes? Please reply ASAP - we've been using Jikes for internal development for a long time now, but we have been switching to javac for final production. We'd like to make the leap to Jikes only, and your input here will help a lot. Best regards, Rick To learn more about this mailing list, including disclaimers and how to end your subscription, see http://www.ibm.com/research/jikes/subscribe .
stdin (the left dialog io-redirector): dont use it. Passing a file with a commmand line in it causes crashes.
stdout should be able to redirect to a file just fine.
-classpath :MRJClasses.zip,:JDKClasses.zip,:Everything.jar MySource.java
-classpath 'Macintosh HD:System Folder:Extensions:MRJ Libraries:MRJClasses:JDKCl asses.zip,Macintosh HD:System Folder:Extensions:MRJ Libraries:MRJClasses:MRJClas ses.zip,Macintosh HD:SDKs:Swing-1.1:swingall.jar' 'Macintosh HD:dev:java:MyClass.java '
Note that any pathname that has spaces in it needs to be quoted using "'"s as above.
Note that unix pathnames are not directly substitutable for Mac pathnames in the current MacJikes implementation.
Using lots of .zip or .jar files might require you to allocate more RAM to MacJikes. if you can spare the RAM, I have always been safe at 30MB myself. :-)
MacJikes takes over all processing time while it is compiling. MacJikes v1.1 fixes this problem for the MacJikes application.
This port of Jikes uses the MPW conventions for filenames and pathnames.
disk: |
the name of a disk |
folder |
reference to a folder |
:folder |
reference to the same folder above |
:folder: |
reference to the same folder above |
:filename |
reference to a file in the current directory |
: |
current directory |
:: |
back one directory |
::back2 |
back one directory, referring to the file or folder named back2. |
::back2: |
back one directory in the back2 directory. |
. |
current directory |
.. |
back one directory |
.: |
a folder named ".". Don't abuse the "." and ".."! |
..: |
a folder named "..". Don't abuse the "." and ".."! |
{path},{path}
|
The comma separates logical pathnames. That's right, you cannot define packages such as "sbytnar.Jet,Car,Plane". Get over it. :-) |
In my testing, the Metrowerk's Classes.zip file works perfectly. The MRJ 2.0EA3 "JDKClasses.zip" also works fine. You have to specify either of these for EACH TIME you execute Jikes for MacOS:
These are examples of the command line parameters you would give the application or the MPW tool.
-classpath :,:Classes.zip MySource.java -classpath :,:JDKClasses.zip MySource.java
This is what happens when Jikes cannot write a file because the pathname is too long! Ooops. This happens when you see errors like this when you are compiling source files in directories that exist in places other than the Jikes binary:
Found 4 system errors: *** Error: Unable to write file "/mindbright/ssh/SSHStdIO$CtrlDPressedException.class" *** Error: Unable to write file "/mindbright/ssh/SSHInteractiveClient$DumbConsoleThread.class" *** Error: Unable to write file "/mindbright/ssh/SSHPduInputStream$PduByteArrayInputStream.class" *** Error: Unable to write file "/mindbright/ssh/SSHPduOutputStream$PduByteArrayOutputStream.class"
set CLASSPATH ":,:Classes.zip" export CLASSPATH MacJikes MySource.java
Yes, environment variables that Jikes normally listens to are able to be used with the MPW Shell version of Jikes for MacOS. If you intermix javac and MacJikes, you can keep separeate classpaths. MRJ's javac listens to CLASSPATH, MacJikes listens to JIKESPATH exclusively if it is defined, otherwise it uses CLASSPATH.
File name length is definitely a problem. Any .java file that creates a .class file that is >32 characters will cause PROBLEMS. You might end up with a ton of folders with garbage names, or even a complete crash. Be smart. Rename class files, their contents and anything that depends on them. I am working on making MacJikes so you don't have to worry about this.
I am contemplating a fix for this by truncating names like this:
For
class UserAlreadyLoggedInException /* 28 characters */
contained in:
UserAlreadyLoggedInException.java /* 33 characters WILL NOT fit under HFS */
will be assumed to be named:
UserAlreadyLoggedInExceptio.java /* 32 characters will fit under HFS */
and will NOT generate:
UserAlreadyLoggedInException.class /* 34 characters WILL NOT fit under HFS */
but WILL generate:
UserAlreadyLoggedInExcepti.class /* 32 characters will fit under HFS */
If you rename a class file such that its name is shorter than the class enclosed, you will see a failure like this:
Assertion (type_name_length - (n + 1) == type -> ExternalNameLength()) failed in "getclass.cpp" on line 628
For SunSphere from MRJ 2.1 EA3, here is how you can get almost all of the source compiled:
# --------
setdirectory Viking:jikesos:jikes:src:zSunSphere:Source
if (`exists SunSphereConfig.java)
else
rename SunSphereConfigMRJ.java SunSphereConfig.java
delete SunSphereConfigPersonal.java
endif
flush; Viking:jikesos:jikes:src:MacJikesPPCTool -depend -d :
-classpath ::,:Classes.zip `files -f .java`
# --------
Return to the MacJikes homepage.
This material is Copyright 1999, Steven Bytnar