wood burning stoves 2.0*
The moose likes Mac OS and the fly likes drjava AND how to change compiler version? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "drjava AND how to change compiler version?" Watch "drjava AND how to change compiler version?" New topic
Author

drjava AND how to change compiler version?

armeen golden
Greenhorn

Joined: Oct 02, 2005
Posts: 8
hi, i have been using drjava for a while and i am pretty happy with its interface and overall preformance. drjava compiler is using verstion 1.4.x however i would like to change that to 1.5 which is installed on my machine.

i am writing codes that takes advantage of new classes in 1.5 and it does not compile via drjava (compiler v.1.4.x) however through terminal which is set to compile via 1.5 version, those codes compile and work just fine!

i looked at drjava preferneces but i see no options to change the compiler version? by the way i am using mac os x tiger, drjava version 20050814-223.

thanks for your help in advance.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Editing the Config File

Rene


Regards, Rene Larsen
Dropbox Invite
armeen golden
Greenhorn

Joined: Oct 02, 2005
Posts: 8
thanks for the link. i am not able to find any confugration file in the home directory. the only file available is the drjava.plist which is located in home/library/prefereces/

any other inspiring ideas?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I've just downloaded 'drjava-stable-20050814-2234' and started the App 'DrJava.app' - closed it again - and I got a '.drjava' file in my home dir.

My default java version is 1.5 !!

Therefore I then modified the '.drjava' file as described in the user guide.
added this line: 'javac.location=/System/Library/Frameworks/JavaVM.framework/Versions/1.4/Classes/classes.jar'

I then reopened 'DrJava.app' - and I got both Compiler 1.4.x and 1.5.0

You should also be able to add the new java.location via the GUI under 'Resource Location->Tools.jar Location'

Rene
[ November 17, 2005: Message edited by: Rene Larsen ]
armeen golden
Greenhorn

Joined: Oct 02, 2005
Posts: 8
alright i came up with a solution. i was under the impression that spotlight searches for the hidden file as well. i used thinkertool utility to identify .drjava file which was located in my home directory. the instructions in the documentation is not very clears on how exactly change the compiler version!

instead, i used the java preferences utility located in /Applications/Utilities/Java/J2SE 5.0/. from there i just had to change the order of java verstions that appls used in my system. before it was set to 1.4.2 then 1.5. now the order is the other way around and everything is working great.
Scott Spencer
Greenhorn

Joined: Jul 07, 2004
Posts: 1
Actually, I've found that if I just set the Java Applet and Application Runtime settings to J2SE 5.0 in the Java Preferences.app in /Applications/Utilities/Java/J2SE 5.0, DrJava will use 5.0 on it's own.

However, this is interesting because I would love to use DrJava to compile LeJOS code, and if possible I'd like to get DrJava to include the LeJOS Compiler in the compiler list.

BTW, I love DrJava for a Java development IDE on the Mac. It is powerful yet easy to learn and use.

http://drjava.org/
[ December 02, 2005: Message edited by: Scott Spencer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: drjava AND how to change compiler version?