The following procedure can be used to start JDeveloper on OpenVMS. It
has not been extensively tested, but is seems to do the job. The "-V"
option is a OpenVMS specific Java option to get around the 255 byte
limit for the OpenVMS commandline. The OpenVMS Fast Virtual Machine
produced errors, don't know why yet.
For follow-ups, questions and remarks, please send my an e-mail (as
well). Reading all these newsgroups is a bit to much :-) .
Regards,
Dirk Munk
$!==============================================================================
$! Command procedure to startup Oracle9i JDeveloper on OpenVMS.
$!
$! This procedure reads the Oracle supplied JDEV.CONF file that is used to
$! start JDveloper on Unix and Windows.
$!
$! It will generate a command line file to be used with OpenVMS specific
Java
$! "-V" option.
$!
$! It is assumed that Java131 is installed in the default directory.
$!
$! Java for OpenVMS can be found on:
$! http://www.compaq.com/java/download/index.html
$!
$! This commandfile should be installed in and run from the [JDEV.BIN]
directory.
$!
$! It is recommended to use a ODS-5 structured disk as the device to unzip
$! (=install) the JDeveloper kit to.
$!
$! Unzip for VMS can be found at http://www.info-zip.org
$!
$! A ODS-5 structured disk should also be used for the working space.
$! Working space in this commandfile is placed in SYS$LOGIN. You can
change this
$! if SYS$LOGIN for instance is not on a ODS-5 structured disk, however
keep in
$! mind to use a Unix style syntax ( /DKB0/MY_DIR etc.).
$!
$! If you don't have a ODS-5 disk, and you don't want to change a ODS-2
disk to
$! a ODS-5 disk, you can create a LD disk. A LD disk is a file on a
normal disk,
$! that can be used as a (Logical) Disk with the help of the LD driver.
$!
$! The LD package can be found at
$! http://www.openvms.compaq.com/openvms/freeware/
$!
$! To run JDeveloper you need a OpenVMS system with a X-Windows Motif
display.
$!
$! It is likely you can run the OpenVMS based JDeveloper from a PC too,
if the
$! PC has a X-Windows server running, and you start it from a terminal
session
$! from within the OpenVMS based X-Windows session manager (!!).
$!
$!
$!==============================================================================
$!
$initialize:
$ !
$ ! Set error handling
$ on warning then goto end
$ on control_y then goto end
$ ws := write sys$output
$ !
$ ! Determine directory settings
$ save_default = f$environment("default")
$ this_proc = f$environment("procedure")
$ this_dir = f$parse(this_proc,,,"node") + -
f$parse(this_proc,,,"device") + -
f$parse(this_proc,,,"directory")
$ !
$ set default 'this_dir'
$ set process/parse_style=extended
$ !
$ ! Define logical names
$ define := define/nolog
$ define jdev_conf_file 'this_dir'jdev.conf
$ define jdev_option_file 'this_dir'jdev_java.opt
$ !
$ ! Check if configuration file exists
$ if f$search("jdev_conf_file") .eqs. ""
$ then
$ ws "%JDEV-F-NOCONF, configuration file not found
\''this_dir'JDEV.CONF\"
$ goto end
$ endif
$ !
$main:
$ ! Create (temporary) option file
$ create jdev_option_file
$ !
$ ! Add classpath to option file
$ call jdev_add_classpath
$ !
$ ! Convert option file to undefined record format
$ convert/fdl=sys$input: jdev_option_file jdev_option_file
RECORD
FORMAT undefined
$ !
$ ! Initialize JAVA
$ @sys$common:[java$131.com]java$131_setup /output=nl:
$ !
$ ! Start JAVA
$ java "-V" jdev_option_file -
"-Dide.user.dir=/sys$login" -
"oracle.ideimpl.IdeMain"
$ !
$end:
$ ! Close files opened by DCL (if not closed yet)
$ if f$trnlnm("jdev_config") .nes. "" then close jdev_config
$ if f$trnlnm("jdev_option") .nes. "" then close jdev_option
$ !
$ ! Delete temporary option file
$ if f$search("jdev_option_file") .nes. "" then -
purge/nolog/keep=4 jdev_option_file
$! delete/nolog 'f$trnlnm("jdev_option_file")';*
$ !
$ ! Deassign logical names
$ if f$trnlnm("jdev_conf_file") .nes. "" then deassign jdev_conf_file
$ if f$trnlnm("jdev_option_file") .nes. "" then deassign jdev_option_file
$ !
$ ! Set original default directory
$ set default 'save_default'
$ !
$ exit
$!
$!==============================================================================
$!
$jdev_add_classpath: subroutine
$ open/append jdev_option jdev_option_file
$ write jdev_option "-classpath ."
$ open/read/error=end_read_conf_file jdev_config jdev_conf_file
$read_conf_file:
$ ! Read configuration line
$ read/end=end_read_conf_file jdev_config confline
$ confline1 = f$element(0,"#",f$edit(confline,"trim,compress"))
$ confline = f$edit(confline1,"upcase")
$ !
$ ! Check for AddJavaLibFile / AddJavaLibPath
$ libfile_found = f$locate("ADDJAVALIBFILE",confline) .lt.
f$length(confline)
$ libpath_found = f$locate("ADDJAVALIBPATH",confline) .lt.
f$length(confline)
$ if .not. libfile_found .and. .not. libpath_found then goto
read_conf_file
$ !
$translate_conf_line:
$ unix_path = f$element(1," ",confline1)
$ !
$ ! Add lib file
$ if libfile_found
$ then
$ write jdev_option ":",unix_path
$ goto end_translate_conf_line
$ endif
$ !
$ ! Add lib path
$ call convert_path_unix_vms "''unix_path'"
$add_all_zip_files:
$ addfile = f$search("''vms_path'*.zip",1)
$ if addfile .nes. ""
$ then
$ filename = f$parse(addfile,,,"name") + ".zip"
$ write jdev_option ":",unix_path,filename
$ goto add_all_zip_files
$ endif
$add_all_jar_files:
$ addfile = f$search("''vms_path'*.jar",1)
$ if addfile .nes. ""
$ then
$ filename = f$parse(addfile,,,"name") + ".jar"
$ write jdev_option ":",unix_path,"/",filename
$ goto add_all_jar_files
$ endif
$end_translate_conf_line:
$ goto read_conf_file
$end_read_conf_file:
$ if f$trnlnm("jdev_config") .nes. "" then close jdev_config
$ if f$trnlnm("jdev_option") .nes. "" then close jdev_option
$endsubroutine
$!
$!==============================================================================
$!
$convert_path_unix_vms: subroutine ! p1 = unix_path ! return-symbol:
VMS_PATH
$! The unix path has to be converted to a VMS-path for use in F$SEARCH()
$ unix_path = p1
$ new_path = "["
$ filename = ""
$ dir_cnt = 0
$convert_next_dir:
$ curdir = f$element(dir_cnt,"/",unix_path)
$ if curdir .nes. "/"
$ then
$ chk_previous_dir = curdir .eqs. ".."
$ chk_dirname = f$locate(".",curdir) .eq. f$length(curdir)
$ chk_filename = f$locate(".",curdir) .lt. f$length(curdir)
.and. .not. chk_previous_dir
$ !
$ if chk_previous_dir then new_path = new_path + ".-"
$ if chk_dirname then new_path = new_path + ".''curdir'"
$ if chk_filename
$ then
$ filename = curdir
$ goto end_convert
$ endif
$ !
$ dir_cnt = dir_cnt + 1
$ goto convert_next_dir
$ endif
$end_convert:
$ vms_path == new_path + "]" + filename
$endsubroutine
$!
$!==============================================================================