[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-users
Subject:    Re: [ jEdit-users ] Running Jedit from Command Line on OS X Tiger.
From:       Unnsse Khan <untz () san ! rr ! com>
Date:       2005-06-08 6:10:10
Message-ID: 02F82F78-60A0-466A-9E28-7026180C1ABA () san ! rr ! com
[Download RAW message or body]

When I tried to create a simple Java file called, Test.java, using
this, this is what happened:

Raven:~ untz$ open -a Jedit.app Test.java
2005-06-07 23:06:08.742 open[292] No such file: /Users/untz/Test.java
Raven:~ untz$

This did work when I typed:

open -a Jedit.app

but I want to mimic gvim's functionality -- I want it to create the
filename.java when I try this...

Is there anyway to put this command line invocation into a shell
script named jedit or
map it to an executable named jedit on OS X Tiger? I am a dummy when
it comes to
shell scripts, so if someone can outline the solution, I'd be very
grateful!

With thanks!

Unnsse


On Jun 6, 2005, at 7:39 AM, Michael F. Corcoran wrote:

> in OSX you can also use the open command to call jedit from the
> command line:
>
> % open -a Jedit.app <filename>
>
> cheers
>
> Mike
>
>
> At 10:11 PM -0700 6/5/05, Unnsse Khan wrote:
>
>> Jeff,
>>
>> When I tried "which jedit" this is what I got:
>>
>> Raven:~ untz$ which jedit
>> no jedit in /bin /sbin /usr/bin /usr/sbin /System/Library/
>> frameworks/JavaVM.framework/Versions/1.5.0/Home/bin /Developer/
>> JavaTools/j2sdkee1.3.1/bin /Developer/JavaTools/
>> j2me_wireless_toolkit2.2/bin /usr/local/bin
>>
>> My JAVA_HOME is:
>>
>> Raven:~ untz$ echo $JAVA_HOME
>> /System/Library/frameworks/JavaVM.framework/Versions/1.5.0/Home
>>
>> My .bash_profile is:
>>
>> Raven:~ untz$ cat .bash_profile
>> JAVA_HOME="/System/Library/frameworks/JavaVM.framework/Versions/
>> 1.5.0/Home";
>> J2EE_HOME="/Developer/JavaTools/j2sdkee1.3.1";
>> J2ME_HOME="/Developer/JavaTools/j2me_wireless_toolkit2.2";
>> CATALINA_HOME="/Developer/JavaTools/tomcat/jakarta-tomcat-5.5.9";
>> CLASSPATH=.:"$J2EE_HOME/lib/j2ee.jar":"$CATALINA_HOME/common/lib/
>> servlet-api.jar":"$CATALINA_HOME/common/lib/jsp-api.jar":"/
>> Developer/Database/hsqldb/lib/hsqldb.jar";
>> PATH=$PATH:$JAVA_HOME/bin:$J2EE_HOME/bin:$J2ME_HOME/bin:/usr/local/
>> bin;
>> VIMRUNTIME="/Applications/Vim.app/runtime";
>> export JAVA_HOME J2ME_HOME J2EE_HOME CATALINA_HOME PATH VIMRUNTIME
>> bash
>>
>> The contents of the directory which holds jedit is:
>>
>> Raven:/Developer/JavaTools/jEdit 4.2 untz$ ls -al
>> total 7368
>> drwxr-xr-x    13 untz  admin      442 Jun  3 01:42 .
>> drwxr-xr-x    18 untz  admin      612 Jun  5 00:48 ..
>> -rw-r--r--     1 untz  admin     6148 Jun  1 19:29 .DS_Store
>> drwxr-xr-x    16 untz  admin      544 Sep  3  2004 doc
>> drwxr-xr-x     7 untz  admin      238 Oct  6  2002 jEdit-icon-pack
>> -rw-r--r--     1 untz  admin   587353 Jun  1 19:31 jEdit-icon-
>> pack.zip
>> drwxr-xr-x     4 untz  admin      136 Dec 26  2003 jEdit.app
>> drwxr-xr-x     5 untz  admin      170 Sep  3  2004 jars
>> -rw-r--r--     1 untz  admin  3172983 Sep  3  2004 jedit.jar
>> drwxr-xr-x    10 untz  admin      340 Sep  3  2004 macros
>> drwxr-xr-x   136 untz  admin     4624 Sep  3  2004 modes
>> drwxr-xr-x     3 untz  admin      102 Sep  3  2004 properties
>> drwxr-xr-x     4 untz  admin      136 Sep  3  2004 startup
>>
>> I can't believe that I need to make a shell script to invoke
>> jedit....
>>
>> Being a newbie to shell scripts, what do I call the shell script
>> (name & extension) and where should I place it?
>>
>> Also, the particular JDK, I use is JDK 1.5, so what would be the
>> heap size? Also, can't I just download the AntFarm plug-in
>> do use Ant in JEdit?
>>
>> Sorry for the twenty questions and thanks for the help!
>>
>> -Unnsse
>>
>> On Jun 5, 2005, at 6:29 PM, Jeffrey Hoyt wrote:
>>
>>
>>> On 6/5/05, Unnsse Khan <untz@san.rr.com> wrote:
>>>
>>>
>>>>  Hello,
>>>>
>>>>  I installed jEdit version 4.2 final on my OS X 10.4 (Tiger)
>>>> PowerBook.
>>>>
>>>>  I made the appropriate aliases (for access from my Desktop) and
>>>> now I have
>>>> several questions:
>>>>
>>>>  1. How can I run jedit from the command prompt?
>>>>
>>>>  I have jEdit installed in:
>>>>
>>>>  /Developer/JavaTools/jEdit 4.2
>>>>
>>>>
>>>
>>> if it's like the Linux install, there should already be an
>>> executable
>>> in your path.  Try:
>>>
>>> which jedit
>>>
>>> and see if that gets you anywhere.  If it doesn't create a shell
>>> script that looks like this:
>>>
>>> #!/bin/sh
>>> # Java heap size, in megabytes
>>> JAVA_HEAP_SIZE8
>>> DEFAULT_JAVA_HOME="/usr/local/share/j2sdk1.4.2_04/jre"
>>> if [ "$JAVA_HOME" = "" ]; then
>>> JAVA_HOME="$DEFAULT_JAVA_HOME"
>>> fi
>>> exec "$JAVA_HOME/bin/java" -mx${JAVA_HEAP_SIZE}m ${JEDIT} -jar
>>> "/usr/local/share/jedit/4.2/jedit.jar" -reuseview $@
>>>
>>> Note I have two changes in there - the JAVA_HEAP_SIZE is upped to
>>> 128
>>> meg (32 is default, I think), and I added the -reuseview (this
>>> allows
>>> you to do jedit <filename> and have the file open up in the current
>>> view instead of opening a second view).
>>>
>>>
>>>>  2.  I downloaded the jEdit icon pack into my jEdit directory,
>>>> how do I
>>>> change the icon on my Desktop?
>>>>
>>>>
>>>
>>> Sorry, can't help you with that one.  Try CTRL+clicking on it (or
>>> whatever the equivalent to right clicking is).
>>>
>>>
>>>>  3. How can I run build.xml (Ant) from jEdit.
>>>>
>>>>
>>>
>>> I attached a macro and a console commando dohicky (yes, that IS the
>>> technical term ;) that will do it.  The macro goes in the "macro"
>>> directory in your settings directory (probably something like
>>> /Users/YOU/.jedit) and the commando file goes in the console/
>>> commando
>>> directory in your settings directory.  Run whichever you like.  Or
>>> just fire up the console and run it from there.
>>>
>>>
>>>>  4. Does jEdit 4.2 support JDK 1.5?
>>>>
>>>>
>>>
>>> Yup.  Well, Sun's at least.  Not sure about OSX's.
>>>
>>> Hope it helps,
>>>
>>> Jeff
>>>
>>> --
>>> They that give up essential liberty to obtain a little temporary
>>> safety deserve neither.
>>>
>>> <Compile.bsh>
>>> <ant2.xml>
>>>
>>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can
>> you shotput
>> a projector? How fast can you ride your desk chair down the office
>> luge track?
>> If you want to score the big prize, get to know the little guy.
>> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
>> --
>> -----------------------------------------------
>> jEdit Users' List
>> jEdit-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jedit-users
>>
>
>
> --
> ***********************************************************
> Dr. Michael F. Corcoran
> Universities Space Research Association
> Goddard Space Flight Center
> Greenbelt, MD 20771
> 301-286-5576 (office)
> 301-286-1684 (fax)
> corcoran@barnegat.gsfc.nasa.gov
> http://lheawww.gsfc.nasa.gov/users/corcoran/bio.html
> ***********************************************************
>



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
--
-----------------------------------------------
jEdit Users' List
jEdit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic