Java GUI and runtime().exec help

I have been working on a GUI that does an assortment of tasks. The final and last task is to make copies of a 3dModel conversion program and a script file that is required to make the converter run and convert. The converter and the script file are moved to a user specified directory. The user specified directory contains all of the models that will be converted. The problem is, I can't get the GUI to boot the converter with the script file. To make the converter work, you need to pass two window's cmd commands but the commands need to occur from the same directory as the converter and script file. This is what I have tried to do:
String[] commands = new String[]{"cmd ",
"/c ",
"cd ",
smdDirectory.getPath(),
"skmodel ",
"model_definition.txt "};
try{               
Process child = Runtime.getRuntime().exec(commands);}
catch(IOException e){}The files have all ready copied to the correct directory. All I need is for the GUI to execute the "skmodel model_definition.txt" commands in the correct directory. What am I doing wrong?
Thanks for the help in advance.

String[] commands = new String[]{"cmd ",
"/c ",
"skmodel ",
"model_definition.txt "};
try{               
Process child = Runtime.getRuntime().exec(commands, null, smdDirectory.getPath());}
catch(IOException e){}I will try that and see if I get the desired results.
EDIT:
I got it to make. Here is the code.
String[] commands = new String[]{"cmd ", "/c ", "skmodel",     "model_definition.txt "};
     try{
          Runtime runtime = Runtime.getRuntime();               
          Process child = runtime.exec(commands, null, smdDirectory);
}Edited by: Euphoria on Sep 28, 2008 9:48 AM

Similar Messages

  • How to capture output of java files using Runtime.exec

    Hi guys,
    I'm trying to capture output of java files using Runtime.exec but I don't know how. I keep receiving error message "java.lang.NoClassDefFoundError:" but I don't know how to :(
    import java.io.*;
    public class CmdExec {
      public CmdExec() {
      public static void main(String argv[]){
         try {
         String line;
         Runtime rt = Runtime.getRuntime();
         String[] cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E.java";
         Process proc = rt.exec(cmd);
         cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E";
         proc = rt.exec(cmd);
         //BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
         BufferedReader input = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
         while ((line = input.readLine()) != null) {
            System.out.println(line);
         input.close();
        catch (Exception err) {
         err.printStackTrace();
    public class E {
        public static void main(String[] args) {
            System.out.println("hello world!!!!");
    }Please help :)

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Can we run a java application using Runtime.exec()?

    Can we run a java application using Runtime.exec()?
    If yes what should i use "java" or "javaw", and which way?
    r.exec("java","xyz.class");

    The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
    The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
    HIH
    ClassLoader cl = null;
    Class c = null;
    Class cArr[] ;
    Method md = null;
    Object mArr[];
    cl = ClassLoader.getSystemClassLoader();
    try{
         c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
    } catch(ClassNotFoundException e) {
    System.out.println(e);
         cArr = new Class[1] ;
         try{
         cArr[0] = Class.forName("java.lang.Object");
         } catch(ClassNotFoundException e) {
         System.out.println(e);
         mArr = new Object[1];
         try{
         md = c.getMethod("processPkt", cArr);
         } catch(NoSuchMethodException e) {
         System.out.println(e);
         } catch(SecurityException e) {
         System.out.println(e);
    try {            
    processedPkt = md.invoke( null, mArr) ;
    } catch(IllegalAccessException e) {
              System.out.println(e);
    } catch(IllegalArgumentException e) {
              System.out.println(e);
    }catch(InvocationTargetException e) {
              System.out.println(e);
    }catch(NullPointerException e) {
              System.out.println(e);
    }catch(ExceptionInInitializerError e) {
              System.out.println(e);
    }

  • Spawn a java process using runtime.exec() method

    Hi,
    This is my first post in this forum. I have a small problem. I am trying to spawn a java process using Runtime.getRuntime().exec() method in Solaris. However, there is no result in this check the follwoing program.
    /* Program Starts here */
    import java.io.*;
    public class Test {
    public static void main(String args[]) {
    String cmd[] = {"java", "-version"};
    Runtime runtime = Runtime.getRuntime();
    try{
    Process proc = runtime.exec(cmd);
    }catch(Exception ioException){
    ioException.printStackTrace();
    /* Program ends here */
    There is neither any exception nor any result.
    The result I am expecting is it should print the following:
    java version "1.4.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
    Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
    Please help me out in this regard
    Thanks in advance
    Chotu.

    Yes your right. It is proc.getInputStream() or proc.getErrorStream(). That is what I get for trying to use my memory instead of looking it up. Though hopefully the OP would have seen the return type of the other methods and figured it out.

  • Invoking "java myClass" using Runtime.Exec from a Java Stored Procedure

    Hi All,
    This is regarding the use of Runtime.getRunTime().exec, from a java programme (a Java Stored Procedure), to invoke another Java Class in command prompt.
    I have read many threads here where people have been successuful in invoking OS calls, like any .exe file or batch file etc, from withing Java using the Runtime object.
    Even i have tried a sample java programme from where i can invoke notepad.exe.
    But i want to invoke another command prompt and run a java class, basically in this format:
    {"cmd.exe","java myClass"}.
    When i run my java programme (in command prompt), it doesnt invoke another command prompt...it just stays hanging.
    When i run the java programme from my IDE, VisualCafe, it does open up a command prompt, but doesnt get the second command "java myCLass".
    Infact on the title of the command prompt (the blue frame), shows the path of the java.exe of the Visual Cafe.
    and anyway, it doesnt run my java class, that i have specified inside the programme.
    Even if i try to run a JAR file, it still doesnt do anything.
    (the JAR file other wise runs fine when i manually invoke it from the command prompt).
    Well, my question is, actually i want to do this from a Java Stored Procedure inside oracle 8.1.7.
    My feeling is, since the Java Stored Procedure wont be running from the command prompt (i will be actually invoking it through a Oracle trigger), it may be able to invoke the command prompt and run the java class i want. and that java class has to run with the SUn's Java, not Oracle JAva.
    Does any one have any idea about it?
    Has anyone ever invoked a java class or JAR file in command prompt from another Java Programme?
    YOur help will be highly appreciated.
    (P:S- Right now, my database is being upgraded, so i havent actually been able to create a Java Stored procedure and test it. But i have tested from a normal java programme running in command prompt and also from Visual Cafe).
    Thanks in advance.
    -- Subhasree.

    Hello Hari,
    Thanks for your quick reply.
    Can you please elaborate a little more on exactly how you did? may be just copy an dpaste taht part of teh code here?
    Thanks a lot in advance.
    --Subhasree                                                                                                                                                                                                                                                                                                                                                                                                           

  • To jschell How to get data System properties by JNI and Runtime.exec()

    Thank you very much for answer. ummm....but I'm can not gets data system properties by JNI or Runtime.exec(). Please help me. I'm want create Java-Applet for data System properties ( memory quantity?, Harddisk capacity?, CPU speed ?, Printer Name? and all hardwares ) in my computer. It very important for me. Help me please. thank you..

    Java applets are restricted to accessing only some system properties - and it is good so. I would not be happy if any applet could inquire about, say, my user name or the amount of memory in my box.

  • T2K/T5K type of Solaris servers and Runtime.exec

    It is being consistently observed that on T2k/T5k type of Solaris servers (e.g. T5220), the UNIX commands sent from Java using the Runtime class APIs are not being reveived by Solaris. It does not happen always, only occasionally. But when it happens, the java process hang at process.waitFor(). We are using Java1.6.
    I read the Java World article "When Runtime.exec() won't" and the behavior we are seeing is not because of any of the known pitfalls mentioned in the article. Also the warning in the Runtime API that speaks about the limited buffer size is also not applicable in this case because we do see it working sometimes. All of a sudden Runtime.exec gets stuck. We have also observed that the problem is not dependent on the command we pass through the Runtime.exec API. It happens for any trivial command.
    For more information on the issue, when we execute a 'pstack' on the process id, we see the following output most of the time and the 'truss' output shows the java process to be in a sleeping state:
    # pstack 20650
    ff2c52d8 lwp_park (0, 0, 0)
    ff2bf350 cond_wait_queue (24dd90, 24dd78, 0, 0, 0, 0) + 28
    ff2bf770 cond_wait_common (24dd90, 24dd78, 0, 0, 0, 0) + 294
    ff2bf874 cond_wait (24dd90, 24dd78, 0, 0, 0, 0) + 10
    ff2bf8b0 pthread_cond_wait (24dd90, 24dd78, ff2f3700, 0, f337da00, ecf00000) + 8
    eedddacc kernel_delete_session (24dd60, 24dd58, 0, 1, 3, 1c63c) + 114
    eeddd7dc kernel_delete_all_sessions (0, 1, 0, 1c8b4, 0, eedfa000) + 98
    eedd1eb4 cleanup_library (0, 1, 0, eedfa000, 28180, 3) + 3c
    eedd1f1c kernel_fini (0, 1, 0, eedfa000, 28120, eedfa4a4) + 44
    eede89e0 _fini (ff3f40fc, ff3f5a70, 2b3f4, 0, ff3f4910, 821) + 4
    ff3c54b4 call_fini (ff3f40fc, f43518f0, eede89dc, ff3f42f0, ff3f42a8, ff3f4910) + cc
    ff3cfdc0 remove_hdl (f43518f0, f1c4e2bc, 0, 4000, ff300a54, 4821) + ac8
    ff3ca408 dlclose_intn (f4351978, ff3f4910, ff3f40fc, 2a520, ff3ca4bc, 0) + 24
    ff3ca4e8 dlclose (f4351978, 0, f4350b88, 0, 1c00, 1) + 24
    eee33904 pkcs11_slottable_delete (1, f9e2c0, 46ec90, eee46bb0, 0, 1) + 138
    eee2e42c pkcs11_fini (eee46b8c, 1, eee2e074, eee46000, 17c18, eee46b84) + 4c
    ff241f38 postforkchild_handler (1d18, ff2f3700, 1c00, 4, f337da00, ff2f3700) + 30
    ff2b74bc fork (0, 41, 0, f1c4e744, ff2f3700, f337da00) + 144
    fe8a8ee4 Java_java_lang_UNIXProcess_forkAndExec (ffffffff, 0, fee0c0, fe8c4000, 4, 2) + 6d0
    f940bc20 * java/lang/UNIXProcess.forkAndExec([B[BI[BI[BZLjava/io/FileDescriptor;Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)I+-20552
    f940bbc4 * java/lang/UNIXProcess.forkAndExec([B[BI[BI[BZLjava/io/FileDescriptor;Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)I+0
    f94058b8 * java/lang/UNIXProcess.<init>([B[BI[BI[BZ)V+62
    f9405764 * java/lang/ProcessImpl.start([Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Z)Ljava/lang/Process;+182
    f9405874 * java/lang/ProcessBuilder.start()Ljava/lang/Process;+112
    f9405874 * java/lang/Runtime.exec([Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Process;+16                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    If you haven't found the answer yet, I found it in another article. Basically, * and other wildcards are expanded by the shell so Runtime.getRuntime()exec("ls /tmp/*") won't work. You need to use the String[ ] form of exec(), i.e. Runtime.getRuntime()exec( new String[ ] {"sh", "-c", "ls /tmp/*"} )
    hope that helps.

  • Runtime.exec help needed

    Hello,
    I am having a strange problem in using the Runtime.exec(command, null, workDirectory) method. Its giving an IOException and says:
    java.io.IOException: CreateProcess: delmembtrn-05.bat error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:551)
    at java.lang.Runtime.exec(Runtime.java:418)
    at java.lang.Runtime.exec(Runtime.java:361)
    at java.lang.Runtime.exec(Runtime.java:325)
    Can anyone please guide me whats wrong here? I am trying to run a batch file which will run some java programs. I am running this program from one place and the batch file is in a different place(as represented by the workDir parameter in the exec method). This is holdin up my schedule. Someone can you please help me in this regard. Mail id: [email protected]

    I wanted to produce the same error before giving any advice - so i wrote:
    import java.lang.*;
    public class TestExec
         public static void main(String Arg[])
         throws Exception
              String command="go.bat";
              String envp [] = null;
              String workingDir="c:/temp/WorkingDir";
              Runtime.getRuntime().exec(command,envp,new java.io.File(workingDir) );
    }go.bat is not in path env var...
    I put go.bat into the workingDir and got this error:
    C:\TEMP\TestClass>java TestExec
    Exception in thread "main" java.io.IOException: CreateProcess: go.bat error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Unknown Source)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at TestExec.main(TestExec.java:13)
    Looks pretty similar!
    After changing "go.bat" to "c:/temp/workDir/go.bat" it worked without error...
    So the conclusion is
    that the bat file command string does not specify the right directory
    or
    the bat file is not in the path string
    The working dir parameter is not added to the path env var...
    Tim Smith
    IncWorx

  • Process communication and runtime.exec()

    I need to create a java class that interacts with a non-java application. The non-java application is a spell checking program which reads a misspelling from stdin and writes a list of suggestions to stdout.
    I want a java class that will act as a gateway to this application so I can do the following:
    JavaGatewayToSpellChecker checker = new JavaGatewayToSpellChecker();
    String[] suggestions = checker.checkWord("misssspelling");Here is how I have the class set up so far:
    import java.io.*;
    public class JavaGatewayToSpellChecker()
        BufferedWriter writer;
        BufferedReader reader;
        public JavaGatewayToSpellChecker()
            try
                String[] cmd = new String[2];
                cmd[0] = "aspell";
                cmd[1] = "-a";
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1]);
                Process proc = rt.exec(cmd);
                writer = new BufferedWriter(new OutputStreamWriter(proc.getOutputStream()));
                reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
            catch (IOException ioe)
                ioe.printStackTrace();
    // no problems yet, as far as I can tell.
    public String checkWord(String word)
            String reply = new String();
            try
                writer.write(word);
                String line = reader.readLine();
    // I know that a line that begins with one of the following
    // characters signals the end of the suggestion list
                while (! (line.startsWith("*") || line.startsWith("&") || line.startsWith("#")))
                    reply = reply + line;
                    line = reader.readLine();
            catch (IOException ioe)
                ioe.printStackTrace();
    String suggestions[] = parseReply();
    // code for parseReply() is omitted for brevity, but I
    // never get down this far anyway. The code just hangs
    // in the loop.
            return suggestions;
        }What am I doing wrong? I have seen a solution using a thread that just runs all the time gobbling the output and either throwing it away or writing it to a file, but I need the output returned so I can parse it and pass it back to the calling method.
    I will be really impressed if anyone can solve this problem.
    Thanks,
    Jon

    Well, you guys were no help at all. I spent hours reading the java forums and tried everything under the sun. I had a separate thread read the output and then tried to communicate with that thread using PipedReader/PipedWriter. I can read the output and write it to a file or print it, but I can't bloody pass it back to the calling method. What am I missing??
    Finally I just made the class static and decided to exec the entire process everytime I need it. Since I have to spell check a couple hundred thousand strings I'm just going to have to start and stop the process a couple hundred thousand times. This is the most retarded programming solution I have ever come up with. I can't believe the guys who wrote the java.lang.Runtime package couldn't do any better than this. From what I can tell from reading the boards I am not the only person who has struggled with this issue.
    There is clearly an elegant solution that anyone with six years of java experience and a week of free time on their hands could come up with, but for those of us who have only been programming since 2001 and who have to get on with life I guess it makes more sense just to let the computer run all night on a dumbass solution than try to divine the solution to this problem.
    AAARRGGGHHHH. I just have to rant a bit. I wasted a whole day :(
    My solution:
    import java.io.*;
    public class JavaGatewayToSpellChecker
        public static String checkWord(String word)
            String reply = new String();
            try
                String[] cmd = new String[2];
                cmd[0] = "aspell";
                cmd[1] = "-a";
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1] );
                Process proc = rt.exec(cmd);
                BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(proc.getOutputStream()));
                BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
                System.err.println("writing: "+word);
                writer.write(word);
                writer.newLine();
                writer.close();
                String line;
                while ( (line=reader.readLine()) != null)
                    reply += line;
                int exitVal = proc.waitFor();
            catch (Exception e)
                e.printStackTrace();
            return reply;
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Start a new java process using Runtime.Exec() seems to ignore the -Xmx

    I am working with a process that requires a minimum of 1.5 GB to run and works better if more is available.
    So I am determining how much memory is available at startup and restarting the jre by calling
    Runtime.exec("java -Dcom.sun.management.jmxremote=true -Xmx1500M -jar XXX.jar")
    which reinvokes the same process with a new max memory size.
    The initial call to the process is
    java -Dcom.sun.management.jmxremote=true -Xmx3500M -jar XXX.jar
    The initial call returns 3262251008 from Runtime.maxmemory()
    When reinvoked through Runtime.exec() as above
    Runtime.maxmemory() still returns 3262251008
    Is there a way to separate the new process from the size specified by the parent process?

    That is strange. Here is a program I wrote which calls itself recursively.
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.List;
    import java.util.ArrayList;
    import static java.util.Arrays.asList;
    public class MemorySize {
        public static void main(String... args) throws IOException, InterruptedException {
            System.out.println("Maximum memory size= "+Runtime.getRuntime().maxMemory());
            if (args.length == 0) return;
            List<String> cmd = new ArrayList<String>();
            cmd.add("java");
            cmd.add("-cp");
            cmd.add(System.getProperty("java.class.path"));
            cmd.add("-Xmx"+args[0]+'m');
            cmd.add("MemorySize");
            cmd.addAll(asList(args).subList(1,args.length));
            Process p = new ProcessBuilder(cmd).start();
            readin(p.getErrorStream());
            readin(p.getInputStream());
        private static void readin(final InputStream in) {
            new Thread(new Runnable() {
                public void run() {
                    try {
                        byte[] bytes = new byte[1024];
                        int len;
                        while((len = in.read(bytes))>0)
                            System.out.write(bytes, 0, len);
                        in.close();
                    } catch (IOException e) {
                        e.printStackTrace();
            }).start();
    }If you run this with the args 128 96 33 222 it prints out
    Maximum memory size= 66650112
    Maximum memory size= 133234688
    Maximum memory size= 99942400
    Maximum memory size= 35389440
    Maximum memory size= 231014400

  • Socket stays open after java process exits, Runtime.exec()

    I have a program that does the following:
    opens a socket
    Does a runtime.exec() of another program
    then the main program exits.
    what i am seeing is, as long as the exec'd program is running, the socket remains open.
    What can i do to get the socket to close?
    I even tried to explicity call close() on it, and that didn't work. Any ideas would be great.
    I am running this on WindowsXP using netstat to monitor the port utilization.
    here is some sample code
    import java.io.*;
    import java.net.*;
    public class ForkTest
        public static void main(String[] args)
            try
                DatagramSocket s = new DatagramSocket(2006);
                Process p = Runtime.getRuntime().exec("notepad.exe");
                System.out.println("Press any key to exit");
                System.in.read();
            catch (IOException ex)
                ex.printStackTrace();
    }

    java.net.BindException: Address already in use: Cannot bind
            at java.net.PlainDatagramSocketImpl.bind(Native Method)
            at java.net.DatagramSocket.bind(DatagramSocket.java:368)
            at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
            at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
            at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
            at ForkTest.main(ForkTest.java:11)

  • Difference between command line and Runtime.exec()

    Hi all.
    I'm coding some lines to call sqlldr program.
    System info:
    OS: Win2k server
    Java platform: JSK 1.4
    DBMS: Oracle 9i
    I've tested sqlldr in command line and it is OK. But when i call Runtime.exec("sqlldr user/pass@servicename control=mycontrol.ctl")
    the ErrorStream show that: Message 2100 not found,No message file for product=RDBMS ,facility=UL...
    So i had to put a String array which contained "ORACLE_HOME" as the second parameter of exec method. But there's another error appear:
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12560: TNS:protocol adapter error
    I checked tnsnames.ora and it's OK. I do the command line again and it's still OK. Why did Runtime.exec("...") method get Error.
    Does Someone solve it for me.
    Thanks so much.

    I'm having the similar/same issue.
    I'm trying to run SQLLdr from JAVA.
    From a command line, it works fine.. From within JAVA, I get..
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12640: Authentication adapter initialization failed.
    Did you find a solution to your problem?

  • How can I downgrade my Java version and Runtime Environment to 6?

    Hi, thanks for reading this in advance:
    I have a couple problems. Ever since Java Preferences was removed in one of Lion's updates I have been having trouble with java.
    How do I downgrade my java and runtime environment to java 6?
    When I go into terminal, and type java -version, this is what I get:
    java version "1.7.0_09"
    Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
    How do I downgrade the "java version" to 6 and how do I downgrade the SE Runtime Environment to 6?
    I accidentally installed 7 a couple days ago and I've been having trouble with some applications.
    Thank you so much.

    Dear Minionsman and everyone who reads this. I was so happy when i downgraded and i wanted to share it to all, I have found out why it says this in terminal
    java version "1.7.0_09"
    Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
    and why it says something different on java tester
    Its because java 7 blocks every java version below it.
    How do you downgrade?
    Well all you do is delete a few files
    INSTRUCTIONS BELOW
    1.Open Terminal
    2. Enter these commands
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI .plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    3.
    Go to /Library/Internet Plug-Ins/ and delete the JavaAppletPlugin.plugin bundle.
    4.
    Go to /System/Library/Java/JavaVirtualMachines/ and delete anything whose name starts with jdk1.7.0 or says Java 7 or something similar.
    5. now go to terminal and type
    java -version
    6.it should say something like this
    java version "1.6.0_35"
    Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M4508)
    Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
    <Edited by Host>

  • Java inheritance and interface code help required

    please help me I need your 30 mins only,,, working on assignment and I am trying to understand interface and inheritance might not need even 30 mins, please add me on skype *[deleted by moderator]*
    Or add me on
    yahoo msgr *[deleted by moderator]*
    waiting for your help.
    I have no single person friend or I can ask help from who knows java or programming. pretty much want to learn need a friend who can guide me in java.
    unfortunately have to submit assignment tomorrow.
    Thank you in advance for your time and consideration.
    Akee
    *Edited by moderator: EJP on 10/11/2012 10:38: removed your private contact details. This is a public forum, not a personal help desk. Ask your questions here or not at all.*

    Hi,
    there are lot of thread alredy posted please serach
    check following link
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/1d753cab14a909e10000000a11405a/frameset.htm
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Links of blogs on java mapping...
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    blog
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping(file to xslt mapping)
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners(xslt with java enhancement function)
    Regards,
    Amit

  • Legacy C program - new Java GUI and calling methods

    Hello,
    I am fairly new to these forums. I've been working for a company that has an exsisting program that is a propriotery video-client to a video-server. It is written in C and has DirectX components for the standalone C application and ActiveX components for the Internet Explorer version.
    I looked over the source code and found a main() function. Now I am trying to execute that main() fuction through java and jni. I have managed to get a simple HelloWorld program to work but am now stuck.
    I would like to do the following.
    1. Convert the exsisting code to a C library. I have to use Visual C++ 6.0 to create this project. (There is already an exsisting dsw project file for the video client).
    Question: How do I get rid of the main() function and compile correctly in Visual C++?
    2. How do I call the library function that I created in the above from a java main() method? What should I use to edit and compile java/c code?
    Thank you,
    Viral

    Hi,
    If you need to have fast results you can try to use the ActiveX with COM bridge like Jawin or JACOb (both at sourceforge) or use Eclipse's SWT that has an activeX support too.
    An other alternative is to create a full JNI wrapper to your project.
    A1 : Replace the main by DllMain (create a new DLL with msvc++ wizard to see how to create a basic DLL).
    A2 : Call all functions exported by DLLs with a free tool like JNative.
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for