Setting 'JAVA_HOME' in batch file

Hi,
I'am having a batch file for my Java application. I want to set the 'JAVA_HOME' variable if it is already not set.
I want to confirm if the following statement is correct or if there is a better way to do so.
if "%JAVA_HOME%"=="" set JAVA_HOME=c:\j2sdk1.4.1_02
Thanks in advance.
Regards,
Jay

You can also:
SET JAVA_HOME %JAVA_HOME%;C:\j2sdk1.4.1_02
That'll add the new pointer along with any others that are there already, if none exist then it will create the one pointer.

Similar Messages

  • How to set JAVA_HOME in REDHAT 9.0 Linux?

    I was trying to set JAVA_HOME in profile file, but unable to decide where to put the java_home path. Can anyone guide me?
    J2sdk and JRE are in /USR/JAVA

    It is sufficient to set PATH.
    In Unix (including Linux) most file systems are case-sensitive regarding the file and directory names. So /USR/JAVA is different from /usr/java.

  • Help, how to install jvm and set the classpath using a batch file

    hello,
    i have created my java application and now have to create an installable / batch file which will install the JVM on the users machine and also the java packages such as javamail and the class files that i have created . it also has to set the classpath.
    i would like to know if anyone can tell me how to go about iti.e. how can i install the JVM using a batch file and then place the javamial packages etc in the apropriate directory .
    or is it advisable to explain it to the user how to go about it in tht user manual.
    and would also like to know that if i install the JVM will the path for the java.exe be set
    or will i have to set the path explicitly from the "batch file" so that the user can run the application without and problem just by running the java command followed by filename from the command prompt.

    hi,
    I have windows and I use it.
    The only problem with the free edition is that you can only create 1 launcher and that during the installation you get 1 popup showing that the installer was created with an unregistered version.
    Stijn

  • How to install and set printer paper and tray automatically via script or batch file

    Hi,
    Our firm using HP Printers and we need to deploy printer in Citrix Environment where setting does not save to the Base PC Image.
    Because our Environment is Citrix (User Settings and Printer are deployed when user login).
    Can we build the setting into the Base PC Image for All users?
    Printer get install when using login.
    Problem that I am encounter right now are:
    1. How to correctly identify all tray from each printer.
    2. How to set all paper tray to A4
    I am currently using Powershell Script to install printers during login, all the printer driver has been installed to the Base PC Image.
    But the trouble I have is when the script run to completion.
    It only added the printer.
    I've been googling, but I can't find a way to detect printer tray or how to set all the tray to A4.
    I don't mind using any type of script/batch file or even program.
    Any of the following language is C#, VB.NET, powershell, vbscript or Event Access to HP API ?
    Our Environment:
    Windows 7 x32 SP1
    Windows Server 2008 R2 (Print Server)
    I am using the PCL 6 Printer Driver.
    Our Printers are:
    HP LJ CP1025NW
    HP C LJ 4650
    HP C LJ 3525
    HP LJ 1045
    HP LJ 2050
    HP LJ 3055
    HP LJ 4015
    HP LJ 4350
    HP LJ 4700
    HP LJ 2035n
    Thanks in advance
    Regards Dat.

    Most of those printers are commercial grade printers.  It would be best to post in the commercial LaserJet forums.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • Can a batch file be written to check status of Wifi adapter? Then as outcome change it to the opposite current setting?

    Hi all,
    Is it possible to have a batch file check the status (Enabled/Disabled) of a wireless adapter and as an outcome have it change the adapters setting to the opposite of it's current setting?
    i.e. If set as ENABLED, it will disable it as an outcome.
          If set as DISABLED, it will enable it as an outcome.
    Thanks as this would be extremely useful to overcome a recent problem with Windows 7 not recognising my dads laptop FN key (aeroplane mode).

    Hi all,
    I've managed to program 2 batch files (one enables and the other disables):
    ENABLE WIFI =
    @echo off
    echo Please wait ... enabling wireless adapter ...
    netsh interface set interface "Wireless Network Connection" ENABLE
    echo Your wireless network adapter should now be enabled.
    timeout/t 10
    DISABLE WIFI =
    @echo off
    echo Please wait ... disabling wireless adapter ...
    netsh interface set interface "Wireless Network Connection" DISABLE
    echo Your wireless network adapter should now be disabled.
    timeout/t 10
    These both work perfectly on my Windows 7 laptop.  8)
    HOWEVER ... I'd like to code a single batch file which first checks the connect status of the wireless adapter and then through a IF statement sets the opposite outcome to the current status.
    I'm not entirely sure how to code this though.  :oops:
    I know ... netsh interface show interface name="Wireless Network Connection" ... provides the connection status with "Connect State".
    What is the syntax I should use to lookup this connect state value?

  • ESB Process reads a Batch file for a limited set of records only..?

    Dear All,
    I am having an ESB process that reads a Batch file (csv) that has around 10,000 Products information.
    I have another BPEL process that will create the Product in Oracle Apps through standard API (Main BPEL process that calls a child process for creating product).
    I am invoking the BPEL process from ESB, and that works fine.
    Now, the Issue is: I am able to create at a time around 10 Products (the main process calls the child process in a loop.). The main process instance is not getting created but the child process instance is getting created for a set of records, afterwards the child process instances get stops creating. The main process instance could not be found in the console. Not getting why the process is not getting visible as well it is not completing the process.
    What could be the problem for this... Am I need to change any environment configurations...?
    Please update...
    Many Thanks in advance...

    Does this apply to you?
    https://social.technet.microsoft.com/Forums/en-US/9ccd8e50-b0af-4f58-9787-6435834e4c52/dfsr-not-working-on-new-windows-2008r2-server
    Thanks for the link, but no - not the same scenario although the error is the same.   The RGs I'm working with are all in sync and communication is working, it's just getting the backlog reported correctly.
    To reiterate, I can paste two versions of the exact command into the DOS window buffer; one copied from OneNote and one copied from my batch file.  Executing the one from OneNote succeeds and reports the RG in sync and the one copied from the batch
    file fails.
    I can repeat the results by up arrow once to the command pasted into the buffer from the batch file and see it fail.  Then up arrow twice to retrieve the command pasted from OneNote into the buffer and it will report correctly (illustrated in the grahic).
    Let me add that the command in the batch file was originally copied from OneNote and pasted in to the batch file; as if going into the batch file somehow corrupts it.
    - a -

  • Looking for batch file to use when setting up Java on an XP machine

    Hey Everyone,
    I am trying to get my hands on a batch file that will effectively :) set up the Java Variables on an XP machine. I don't know if this is even possible but I have to assume that it is. The thing is I am studying for Java Certification at the moment, and every day I am on a different computer at my place of study. I carry a copy of the latest jsdk with me on a flash drive and it would be really handy if I had a batch file that I could run and just be done with the setup! I seem to be wasting at least half an hour a day trying to get java going!!! So any help will be much appreciated. Thanks heaps.
    Regards
    Davo

    assuming the j2sdk install file on disk is installJava.exe, the master setup file (setupJava.bat) would look like this:
    ::java home is the folder in C drive where java's files are
    :: run installation for jsdk and jre
    installJava.exe
    :: set variables
    set javahome=c:\j2sdk1.4.2_03
    path=%path%;c:\javahome\bin
    :: if you add security providers
    path=%path%;c:\javahome\jre\lib\ext
    :: may help with certificate verification
    path=%path%;c:\javahome\jre\lib\security

  • Setting jdk directory in batch file after installation

    Hello,
    Little problem : I need, under windows, to launch my application with a .bat cause i use the options -Xms and -Xmx of sun java compiler.
    So i need to get the jdk directory and put it in the batch file to be sure java.exe will be found.
    What could be a nice way to do this ? As nice, i mean i'd like the user don't edit the .bat to enter the path with keyboard.

    you could program a dialog, and create the .bat - file after testing, whether the selection (in a fileDialog, isDirectory (), check for starting that jvm) is valid.
    But this are two issues, independent from each other.
    You may call java -Xmx ... with or without leading path.

  • Urgent : Executing a batch file in a JSP file

    Hi;
    I need help in executing a batch file within a jsp page, ive the following codes but it doesnt seem to work...
    These are the codes :
    <%@ page import="java.util.*,java.io.*,java.net.*" %>
    <%@ page import="java.sql.*" %>
    <%
    Process p = Runtime.getRuntime().exec("Ratio.bat");
    p.waitFor();
    int i = p.exitValue();
    %>
    The following is the error :
    ype Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.io.IOException: CreateProcess: Ratio.bat error=2
    java.lang.Win32Process.create(Native Method)
    java.lang.Win32Process.<init>(Win32Process.java:63)
    java.lang.Runtime.execInternal(Native Method)
    java.lang.Runtime.exec(Runtime.java:550)
    java.lang.Runtime.exec(Runtime.java:416)
    java.lang.Runtime.exec(Runtime.java:358)
    java.lang.Runtime.exec(Runtime.java:322)
    org.apache.jsp.invRatio_jsp._jspService(invRatio_jsp.java:52)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Anyone can tell me why it doesnt work ?... Thanks

    Aside from removing the "start" or adding the title ...
    Does your batfile really say "SET PATH=%PATH%;%JAVA_HMOE%\bin"? If so, I rather expect you meant to say "JAVA_HOME" and not "JAVA_HMOE".
    Also, I'd be cautious about those relative paths that you're passing in to the Java program. Of course I don't know what you're doing with those in the program, but if you try to just pass those paths to a File or InputStream constructor, they're going to be relative to the current directory. And if you execute a batfile using cmd from an exec that's within a JSP ... I'm not sure what your current directory would be when the bat runs. Maybe you've checked this out and it's the right place, but if not, perhaps you have a misconception there.

  • Making batch files to execute java programs in windows

    In my comp sci class, i found a folder with a batch file, an application file, and all class files necessary to run the program.
    how do i take my java program and make a batch file to run it (in dos) like that program in my comp sci class?

    Okay, here are your steps for running a java program from a batch file:
    1) Open Notepad
    2) type the following:
    set JAVA_HOME=C:\j2sdk1.4.0_03 // specify the path where your jdk is
    set path=%JAVA_HOME%\bin;.
    javac {-classpath .;one.jar;two.jar} YourProgramName.java
    java {-classpath .;one.jar;two.jar} YourProgramName
    The stuffs inside {} is not necessary if your program doesnt use any .jar files.
    3) Save the notepad as mybatch.bat in the directory where your Java program is located.
    4) In the DOS prompt, go to the directory where you have .java and .bat files
    (use 'cd' command)
    5) Now, type mybatch.bat and press ENTER.
    Thatz it. Your program runs like a charm now!!!
    (provided the compiler is pleased with ur code :)
    -- layman's pal

  • How to set JAVA_HOME programatically

    Hi Friends,
    Is there anyway to set JAVA_HOME environment property using a batch script.Actually,I am trying to check if the user system has java installed or not. If not,I make him run the JRE installer but the problem is when I try to start Tomcat, it expects JAVA_HOME to be set. So, I want to set JAVA_HOME programatically, is there anyway to do so???
    This is the script i am using to check if java is already installed or not:
    @echo off
    ::This batch file only tested under Windows 2000
    ::It will detect the short path of the current version
    ::of the Java runtime executable
    ::First test to see if we are on NT or similar OS by seeing
    ::if the ampersand is interpreted as a command separator
    reg1.txt echo 1234&remtype reg1.txt | find "rem"
    if not errorlevel 1 goto WIN9X
    ::Find the current (most recent) Java version
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    type reg1.txt | find "CurrentVersion" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java Version = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Get the home directory of the most recent Java
    start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\%JavaTemp%"
    type reg1.txt | find "JavaHome" > reg2.txt
    if errorlevel 1 goto ERROR
    for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
    if errorlevel 1 goto ERROR
    echo Java home path (per registry) = %JavaTemp%
    del reg1.txt
    del reg2.txt
    ::Convert double backslashes to single backslashes
    set JavaHome=
    :WHILE
      if "%JavaTemp%"=="" goto WEND
      if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
      for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
      for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
      goto WHILE
    :WEND
    set JavaTemp=
    echo Java home path (long, with spaces) = %JavaHome%
    ::Convert long path (with spaces) into a short path
    for %%x in ("%JavaHome%") do set JavaHome=%%~dpsx
    echo Java home path (short path, no spaces) = %JavaHome%
    ::Test the java path to see if there really is a java.exe
    if not exist %JavaHome%\bin\java.exe goto ERROR
    ::Make changes to the PATH
    echo Insert code here that needs to know the short path to Java.
    set path=%JavaHome%\bin;%path%
    goto DONE
    :WIN9X
    echo Insert code here for Windows 9x
    goto DONE
    :ERROR
    echo Insert code here for conditions where Java.exe can't be found
    goto DONE
    :DONEThanks

    You are asking questions about Windows batch scripting in a Java forum?
    When you get right down to it, the question is "How do I set an environment variable in a batch script", isn't it? Free your mind from useless distractions: the batch script and the operating system don't care at all what you're going to use that environment variable for.
    Oh yeah, I almost forgot: you use the SET command to set an environment variable.

  • Placing image icon on top of batch file

    i am creating a batch file , now i want to place application specific icon on top of that file , so how can i do it through my code
    File batchFile = new File(installationDirectory+ "\\"+ "QTL.bat");
    fos = new FileOutputStream(batchFile);
    DataOutputStream dos=new DataOutputStream(fos);
    dos.writeBytes("set JAVA_HOME="+ "\""+ javaHome+ "\"" +"\n");
    dos.writeBytes("set QTL_HOME="+ installationDirectory+ "\n");
    dos.writeBytes("cd %QTL_HOME%"+ "\n");
    Regards

    >
    i am creating a batch file , now i want to place application specific icon on top of that file , so how can i do it through my code
    >
    You can't - a batch file doesn't have an Icon or a place to store one.
    On Windows you can specify the icon for a shortcut.
    1. create a shortcut on the desktop to the batch file
    2. right-click the shortcut and select 'Change Icon
    3. select your icon from the available list or point to another DLL that has the icon you want to use.
    The only way to do the above programatically is to use the Win API to programatically create the shortcut and do it.

  • Diference between a batch file and jnlp file

    Dear all,
    I have a question that might sound simple, but excuse me, coz I am new to jnlp.
    I run my appliction using a simple batch file:
    set JAVA_HOME=C:\j2sdk1.4.2_05
    @set RUN=%JAVA_HOME%\bin\java.exe -Xms32m -Xmx128m -classpath .;myapp.jar pack.app.Main -connection jdbc:oracle:thin:@10.0.0.1:1521:ABC -webroot http://10.0.0.2:8080/test
    %RUN%
    The jnlp file I use to start the same application is:
    <jnlp codebase="http://10.0.0.2:8080/test/app">
    <information>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.4+"/>
    <jar href="myapp.jar"/>
    </resources>
    <application-desc main-class="pack.app.Main ">
    <argument>-codebase</argument>
    <argument>http://10.0.0.2:8080/test/app</argument>
    <argument>-webroot</argument>
    <argument>http://10.0.0.2:8080/test</argument>
    <argument>-dbrpc</argument>
    </application-desc>
    </jnlp>
    I encountered two problems:
    1. The aplication hangs when I click certain buttons, which is not the case when I run it normally from the batch file.
    2. Some buttons do not even appear, where they appear normally using the batch file.
    I would appreciate any hints that could help.
    Samar

    You could make a self extracting EXE with WinZip, and then do something like..  (You would create an application with source files to do this, with the below code being your 'install.bat')
    @echo off
    xcopy "AppFiles.exe" %WINDIR%\Temp
    %WINDIR%\Temp\AppFiles.exe
    %WINDIR%\Temp\AppFiles\Install.exe
    RMDIR /S /Q %WINDIR%\Temp\AppFiles
    If you monitor the install and your satisfied its working correctly, you can modify the success return codes under the 'Option' tab, or just check the box 'Continue on Error' to keep the build rolling after this install is complete.  Additionally, you
    may find this works better as VBS script.

  • Problem on using batch file

    Hi,
    I have an application which reads data from a text and writes them to a database. I should use batch files in my project to work classes with double clicking on them. Java application reads path of the text file from a properties file. I used relative paths like that " ..\\data\\records.txt" for text file path . But my problem is that; when I run application normally it executes. But when I tried to run it from batch file placed build folder(under project folder) it does not work. Because it tries to find the data folder under the build folder. But data folder is under parent folder of build folder. My batch file code is like that :
    SET PATH=%JAVA_HOME%\bin;%PATH%
    SET LIB_PATH=..\lib
    SET CLASSPATH=%LIB_PATH%\mysql-connector-java-3.0.17-ga-bin.jar;..\bin;..\
    java.exe yega.timesheet.MainApplication ..\\configuration\\properties.props
    pause
    Which statements should I add(and where) to make this batch file search for data folder under its parent folder... Please help me.
    Thank you.

    Thanks Paul, but I tried to use cd before running program. I added "cd .." or "cd ..\" lines to batch file but they didn't work. I decided to use absolute path instead of using relative paths. I also found one more solution. I can put a properties file in build too. And define text path as " ..\\data\\records.txt " in this properties file.
    Also I need to use "\\" because "..\\configuration\\properties.props" is the input for args...

  • Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

    GUIDE TO RUNNING EXTERNAL JOBS ON 10g WITH DBMS_SCHEDULER
    NOTE: Users using 11g should use the new method of specifying a credential which eliminates many of the issues mentioned in this note.
    This guide covers several common questions and problems encountered when using
    dbms_scheduler to run external jobs, either on Windows or on UNIX.
    What operating system (OS) user does the job run as ?
    External jobs which have a credential (available in 11g) run as the user
    specified in the credential. But for jobs without credentials including
    all jobs in 10gR1 and 10gR2 there are several cases.
    - On UNIX systems, in releases including and after 10.2.0.2 there is a file $ORACLE_HOME/rdbms/admin/externaljob.ora . All external jobs not in the SYS schema and with no credential run as the user and group specified in this file. This should be nobody:nobody by default.
    - On UNIX systems, in releases prior to 10.2.0.2 there was no "externaljob.ora" file. In this case all external jobs not in the SYS schema and with no credential run as the owner and group of the $ORACLE_HOME/bin/extjob file which should be setuid and setgid. By default extjob is owned by nobody:nobody except for oracle-xe where it is owned by oracle:oraclegroup and is not setuid/setgid.
    - On Windows, external jobs not in the SYS schema and with no credential run as the user that the OracleJobScheduler Windows service runs as. This service must be started before these jobs can run.
    - In all releases on both Windows and UNIX systems, external jobs in the SYS schema without a credential run as the oracle user.
    What errors are reported in SCHEDULERJOB_RUN_DETAILS views ?
    If a job fails, the first place to look for diagnostic information is the SCHEDULERJOB_RUN_DETAILS set of views. In 10gR2 and up the first 200 characters of the standard error stream is included in the additional_info column.
    In all releases, the error number returned by the job is converted into a
    system error message (e.g. errno.h on UNIX or net helpmsg on Windows) and that
    system error message is recorded in the additional info column. If there is no
    corresponding message the number is displayed.
    In 11g and up the error number returned by the job is additionally recorded in
    the error# column. In earlier releases 27369 would always be recorded in the
    error# column.
    Generic Issues Applicable to UNIX and Windows
    - The job action (script or executable) must return 0 or the job run will be marked as failed.
    - Always use the full pathname to executables and scripts.
    - Do not count on environment variables being set in your job. Make sure that the script or executable that your jobs runs sets all required environment variables including ORACLE_HOME, ORACLE_SID, PATH etc.
    - It is not recommended to pass in a complete command line including arguments as the action. Instead it is recommended to pass in only the path to and name of the executable and to pass in arguments as job argument values.
    - Scripts with special characters in the execution path or script name may give problems.
    - Ensure that the OS user your job runs as has the required privileges/permissions to run your job. See above for how to tell who the job runs as.
    - External job actions cannot contain redirection operators e.g. > < >> | && ||
    - In general try getting a simple external job working first e.g. /bin/echo or ipconfig.exe on Windows. Also try running the job action directly from the commandline as the OS user that the job will run as.
    Windows-specific Issues
    - The OracleJobScheduler Windows service must be started before external jobs will run (except for jobs in the SYS schema and jobs with credentials).
    - The user that the OracleJobScheduler Windows service runs as must have the "Log on as batch job" Windows privilege.
    - A batch file (ending in .bat) cannot be called directly by the Scheduler. Instead cmd.exe must be used and the name of the batch file passed in as an argument. For example
    begin
    dbms_scheduler.create_job('myjob',
       job_action=>'C:\WINDOWS\SYSTEM32\CMD.EXE',
       number_of_arguments=>3,
       job_type=>'executable', enabled=>false);
    dbms_scheduler.set_job_argument_value('myjob',1,'/q');
    dbms_scheduler.set_job_argument_value('myjob',2,'/c');
    dbms_scheduler.set_job_argument_value('myjob',3,'c:\temp\test.bat');
    dbms_scheduler.enable('myjob');
    end;
    /- In 10gR1 external jobs that wrote to standard output or standard error streams would sometimes return errors. Redirect to files or suppress all output and error messages when using 10gR1 to run external jobs.
    UNIX-specific Issues
    - When running scripts, make sure that the executable bit is set.
    - When running scripts directly, make sure that the first line of the script in a valid shebang line - starting with "#!" and containing the interpreter for the script.
    - In release 10.2.0.1, jobs creating a large amount of standard error text may hang when running (this was fixed in the first 10.2.0.2 patchset). If you are seeing this issue, redirect standard error to a file in your job. This issue has been seen when running the expdp utility which may produce large amounts of standard error text.
    - the user that the job runs as (see above section) must have execute access on $ORACLE_HOME/bin and all parent directories. If this is not the case the job may be reported as failed or hang in a running state. For example if your $ORACLE_HOME is /opt/oracle/db then you would have to make sure that
    chmod a+rx /opt
    chmod a+rx /opt/oracle
    chmod a+rx /opt/oracle/db
    chmod a+rx /opt/oracle/db/bin
    - On oracle-xe, the primary group of your oracle user (if it exists) must be dba before you install oracle-xe for external jobs to work. If you have an oracle user from a regular Oracle installation it may have the primary group set to oinstall.
    - On oracle-xe, the extjobo executable is missing so external jobs in the SYS schema will not work properly. This can be fixed by copying the extjob executable to extjobo in the same directory ($ORACLE_HOME/bin).
    - Check that correct permissions are set for external job files - extjob and externaljob.ora (see below)
    Correct permissions for extjob and externaljob.ora on UNIX
    There is some confusion as to what correct permissions are for external job related files.
    In 10gR1 and 10.2.0.1 :
    - rdbms/admin/externaljob.ora should not exist
    - bin/extjob should be setuid and setgid 6550 (r-sr-s---). It should be owned by the user that jobs should run as and by the group that jobs should run as.
    - bin/extjobo should have normal 755 (rwxr-xr-x) permissions and be owned by oracle:oraclegroup
    In 10.2.0.2 and higher
    - rdbms/admin/externaljob.ora file must must be owned by root:oraclegroup and be writable only by the owner i.e. 644 (rw-r--r--) It must contain at least two lines: one specifying the run-user and one specifying the run-group.
    - bin/extjob file must be also owned by root:oraclegroup but must be setuid i.e. 4750 (-rwsr-x---)
    - bin/extjobo should have normal 755 (rwxr-xr-x) permissions and be owned by oracle:oraclegroup
    In 11g and higher
    Same as 10.2.0.2 but additionally bin/jssu should exist with root setuid
    permissions i.e. owned by root:oraclegroup with 4750 (-rwsr-x---)
    Internal Error numbers for UNIX on 10.2.0.2 or 10.1.0.6 or higher
    If you are not using a credential and are using version 10.2.0.2 or higher or 10.1.0.6 or higher you may come across an internal error number. Here are the meanings for the internal error numbers.
    274661 - can't get owner of or permissions of externaljob.ora file
    274662 - not running as root or externaljob.ora file is writable by group or other or externaljob.ora file not owned by root (can't switch user)
    274663 - setting the group or effective group failed
    274664 - setting the user or effective user failed
    274665 - a user or group id was not changed successfully
    274666 - cannot access or open externaljob.ora file
    274667 - invalid run_user specified in externaljob.ora file
    274668 - invalid run_group specified in externaljob.ora file
    274669 - error parsing externaljob.ora file
    274670 - extjobo is running as root user or group

    Hi Ravi,
    Can you help me...
    Hi All,
    I planned to create a job to do rman backup daily at 04:00 AM.
    1. I created a program as follows
    BEGIN
    DBMS_SCHEDULER.CREATE_PROGRAM(
    program_name => 'rman_backup_prg',
    program_action => '/u02/rmanback/rman.sh',
    program_type => 'EXECUTABLE',
    comments => 'RMAN BACKUP');
    END;
    my rman script is
    #!/usr/bin/ksh
    export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
    export PATH=$PATH:/u01/app/oracle/product/10.2.0/db_1/bin
    /u01/app/oracle/product/10.2.0/db_1/bin/exp rman/cat@catdb file=/u02/rmanback/rm
    an_220108.dmp log=/u02/rmanback/rman_220108.log owner=rman statistics=none comp
    ress=n buffer=400000
    compress *.dmp
    exit
    2. I created a schedule as follows
    BEGIN
    DBMS_SCHEDULER.CREATE_SCHEDULE(
    schedule_name => 'rman_backup_schedule',
    start_date => SYSTIMESTAMP,
    end_date => '31-DEC-16 05.00.00 AM',
    repeat_interval => 'FREQ=DAILY; BYHOUR=4',
    comments => 'Every day at 4 am');
    END;
    3. I created ajob as follows.
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'rman_backup_job',
    program_name => 'rman_backup_prg',
    schedule_name => 'rman_backup_schedule',
    enabled=> true,
    auto_drop=> false
    END;
    While I am running the job I am getting the following error anybody help me.
    ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 2
    If I removed "compress *.dmp" line in rman script it is working fine.
    /* additional Info from dba_scheduler_job_run_details as follows */
    ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    STANDARD_ERROR="
    Export: Release 10.2.0.3.0 - Production on Tue Jan 22 14:30:08 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production
    Export"
    Regards,
    Kiran

Maybe you are looking for