Invoking XSLT from the Command Line with JRE1.4 and JRE1.5

When I invoke XSLT from the Windows Command Line with "java.exe org.apache.xalan.xslt.Process -IN OldFile.xml -XSL StyleSheet.xsl -OUT NewFile.xml" it worked fine with JRE1.4.
Then I installed JRE1.5.0_09. The class "org.apache.xalan.xslt.Process" was moved to "com.sun.org.apache.xalan.internal.xslt.Process". But when I call it with "java.exe com.sun.org.apache.xalan.internal.xslt.Process -IN OldFile.xml -XSL StyleSheet.xsl -OUT NewFile.xml" I get the error "Exception in thread "main" java.lang.NoSuchMethodError: main". When I look into the Process class there is no "main", but a "public static void _main(String argv[])".
The "JAXP Compatibility Guide for the J2SE Platform, versions 1.4 and 1.5" on "http://java.sun.com/webservices/docs/1.6/jaxp/JAXP-Compatibility_150.html" chapter "Invoking XSLT from the Command Line" claims it should work.
Is there no more chance to invoke XSLT from the Windows Command Line? Why is "main" renamed to "_main"? Is the documentation wrong or is this a bug?

When I invoke XSLT from the Windows Command Line with "java.exe org.apache.xalan.xslt.Process -IN OldFile.xml -XSL StyleSheet.xsl -OUT NewFile.xml" it worked fine with JRE1.4.
Then I installed JRE1.5.0_09. The class "org.apache.xalan.xslt.Process" was moved to "com.sun.org.apache.xalan.internal.xslt.Process". But when I call it with "java.exe com.sun.org.apache.xalan.internal.xslt.Process -IN OldFile.xml -XSL StyleSheet.xsl -OUT NewFile.xml" I get the error "Exception in thread "main" java.lang.NoSuchMethodError: main". When I look into the Process class there is no "main", but a "public static void _main(String argv[])".
The "JAXP Compatibility Guide for the J2SE Platform, versions 1.4 and 1.5" on "http://java.sun.com/webservices/docs/1.6/jaxp/JAXP-Compatibility_150.html" chapter "Invoking XSLT from the Command Line" claims it should work.
Is there no more chance to invoke XSLT from the Windows Command Line? Why is "main" renamed to "_main"? Is the documentation wrong or is this a bug?

Similar Messages

  • SQL 2012 SSIS package runs from the command line (dtexec.exe) and completes right away ...

    Hi
    I’m upgrading our SSIS packages from SQL 2005 to SQL 2012 .
    Everything is working fine in Visual Studio, but when I’m submitting dtexec.exe it’s finishing right away in the command line (the actual execution takes long time). 
    It looks to me that as the return code doesn’t pass properly.
    As I have depending tasks how I can make sure all jobs will be executed in the proper order.
    (We never had this issue in SQL 2005)
    C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn>dtexec.exe /ISSERVER "\"\SSISDB\Direct_Prod\Direct_SSIS_Package
    \DD_Load_Customer.dtsx\"" /SERVER TORSQLSIS01 /ENVREFERENCE 2
    Microsoft (R) SQL Server Execute Package Utility
    Version 11.0.2100.60 for 32-bit
    Copyright (C) Microsoft Corporation. All rights reserved.
    Started:  10:21:55 AM
    Execution ID: 21138.
    To view the details for the execution, right-click on the Integration Services Catalog, and open the [All Executions] report
    Started:  10:21:55 AM
    Finished: 10:21:56 AM
    Elapsed:  0.766 seconds

    As per MSDN /ENVREFERENCE argument is used only by SQL Server Agent
    see
    https://msdn.microsoft.com/en-us/library/hh231187.aspx
    below part is what it says
    /Env[Reference] environment reference ID
    (Optional). Specifies the environment reference (ID) that is used by the package execution, for a package that is deployed to the Integration Services server. The parameters configured to bind
    to variables will use the values of the variables that are contained in the environment.
    You use /Env[Reference] option together with the /ISServer and the /Server options.
    This parameter is used by SQL Server Agent.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Problem with running a java program from the command line

    I have this code:
    package pkg;
    import jxl.*;
    import java.io.File;
    public class TestClass {
         public static void main(String[] args) {
              try{
                   Workbook book = Workbook.getWorkbook(new File("d:/testWorkspace/excFile.xls"));
                   Sheet sheet = book.getSheet(0);
                   String s=sheet.getCell(4, 2).getContents();
                   System.out.println(s);     
              }catch (Exception e){System.err.println(e);}
    }I've wrote it in Eclipse, added jxl.jar to the buildpath, and it works fine.
    Then I tried to run it from the command line and I did it like this:
    D:\testWorkspace\testProject\bin> java -cp \jxl.jar pkg.TestClassThe result was:
    Exception in thread "main" java.lang.NoClassDefFoundError: pkg/TestClass
    Caused by: java.lang.ClassNotFoundException: pkg.TestClass
    ...but the file TestClass.class DOES exist in the folder d:\testWorkspace\testProject\bin\pkg\ and the file jxl.jar IS on the root of drive D (like I already wrote, it worked fine inside the Eclipse).
    So, my question is: How to run this code from the command line?
    I have no idea what went wrong.
    Can someone help me, please?

    The current directory is not implied in the classpath.
    D:\testWorkspace\testProject\bin> java -cp .;d:\ pkg.TestClassor
    D:\testWorkspace\testProject\bin> java -cp .;d:\jxl.jar pkg.TestClassI always forget which is right since I never work with jars...

  • How can I print the test page with the Arabic type from the command line

    Hi,
    I have been trying to make the tool for printing the test page from the command line on the Arabic OS. I used "rundll32 printui dll printuientry" with "/k /n" options. My tool is to print the test page in all OS when pushing the
    button.
    Normally, in the Arabic Windows, the test page is printed with RTL type when printing the test page in the "Devices and Printers". But in my tool, the test page is printed with LTR type. I'm confused because of this result.
    Is it possilbe to print the test page with RTL type when using the "rundll32 printui dll printuientry"? If it is possible, could anyone give me the hint or information for resolving?
    Please check for me.

    Hello,
    Thank you for your post.
    Your issue is out of support range of Test Tools in Visual Studio 2010 and 2012 forum which discusses Visual Studio Test issues.
    I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I used to beable to push firefox with sccm using setup.exe from the command line , this no longer works i want to be able to have a silent install run for all,

    In the past I have always created a deployment with sccm and installed firefox.exe with the /s switch from the command line what is the new switch for silent installation ?

    hello, have you tried it with the full installers that are available at https://www.mozilla.org/firefox/all yet?

  • "Policytool" can not be invoked from the command line

    Hello Everyone. I tried to use Policytool to generate a java policy file, however I can not start it from the command line. Could somebody here let me know it there is any trick there? Thanks in advance!
    Kuilian

    try this
    java -Djava.security.policy=<"your policy file"> <your file to run>
    srikanth.n

  • I want to set password security on a pdf from the command line

    I have a pdf file that is created and placed on a report server.  I would like to run a batch cmd to set the security for that pdf based on a saved security policy.  I will call the batch cmd file from a batch application.  Can Acrobat XI handle this operation or do I need a third party tool.  The pdf is created by BI Publisher (Peoplesoft).
    Thanks,
    Jay

    You need to invoke your cmd manually, don't you? So, instead of opening the Terminal application, enter the command and press "Enter" you open Acrobat and click a button. It's a different manual step to start the process, but you need a manual step to start the process anyway. I do realize that you may have a bash/perl/python script that does more than just apply encryption but that's the capability that Acrobat has.
    Regretfully, Acrobat JavaScript API does not provide functionality to encrypt with password. You can use JS to encrypt with certificates but [for unknown to me reason] not with passwords. Otherwise it could've written a JS script that encrypts, embed this JS in a separate PDF, open that PDF from a command line with your JS script executing on Open and have this LS script do all the work you need. Well, you can do that for certificate encryption but not for password encryption. I don't know why. And you cannot invoke an action from  a JS either. Oh, well...

  • Is it possible to run Acrobat3D from the command line?

    I'd like to know if it is possible to run Arobat3D from the command line in batch mode. I'm interested in knowing if this is possible in either a windows or unix environment.
    My objective is to convert CAD data e.g. CATIA V5 or DXF etc to PDF, in batch mode without using the Acrobat3D interface itself.
    I know that it's possible to run a batch process from within Acrobat3D itself, therefore one solution may be to invoke those batch processes from the command line.
    I've looked through the other listings on this forum and seen this question asked previously, but I've not seen any responses that suggest this is even a feasible concept.

    As of now, it's not possible in the cmd-mode to just remain connected and not stream.
    But the reason you want to do that is because of the long start-up time. That 20 sec time can be divided into:
    1. launch time
    2. time to start encoding (after pressing start button) -> cannot be reduced even if 'connected only' feature is available in cmd-line
    Below are tips you can use to reduce this 20 sec of time:
    1. Lesser the no. of devices connected to the system, shorter is the launch time. Disable the devices which are not to be used in the session.
    2. Try using device indexes (0, 1, 2, etc) instead of device names in the profile. Indexes might change after you disable some of the devices.
    3. Use the profile with correct settings, to avoid any validation errors.
    4. Higher the video size, higher is the overall time. Small sizes take lesser time to start.
    Let me know if you see any improvement in the startup time.

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all,
    I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the command line but what I'm looking for similar syntax to run a script directly without needing to put it in a file. For example I have tried (obviously unsuccessfully):
    C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\ExtendScript Toolkit.exe -run "alert('Hello World');"
    Thanks!

    You might be looking for something like this: javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
    Although that one is about executing JSX files, the solutions given (Applescript as well as COM/VBScript) can be adapted to simply run a javascript code snippet rather than JSX file because the solutions simply call the Adobe app's Applescript/COM API to "execute javascript" (actually execute ExtendScript technically), and in the solution, they using includes to pull in the JSX file. You'd simply replace the include with actual javascript code snippet inserted in.
    Though this would then require you to run a VBScript, Applescript, or other script (that calls the COM/Applescript API) rather than the ESTK command line option.

  • How to burn CD's from the command line in 2009?

    I've always managed to burn CDs and DVDs from the command line but I haven't done it in a long time. cdrecord wasn't working as root and I noticed it was just a symlink pointing to wodim.
    I tried the following command as root in a directory with some wav files:
    # cdrecord -dev=/dev/sr0 -driveropts=burnfree -audio -pad *.wav
    Which gives me:
    Mar 6 08:43:18 wilco ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
    Mar 6 08:43:18 wilco ata7.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
    Mar 6 08:43:18 wilco cdb 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Mar 6 08:43:18 wilco res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
    Mar 6 08:43:18 wilco ata7.00: status: { DRDY }
    Mar 6 08:43:18 wilco ata7: hard resetting link
    Mar 6 08:43:19 wilco ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    Mar 6 08:43:19 wilco ata7.00: configured for UDMA/100
    Mar 6 08:43:19 wilco ata7: EH complete
    This worked for me in 2008, so has anything big changed?

    Rasi wrote:
    Wilco wrote:
    Dieter@be wrote:I did not follow the discussion, but I just use wodim as specified on http://wiki.archlinux.org/index.php/CD_Burning_Tips, and that works great for me.
    Hmm strange, I tried the same command as in my first post and it works fine with the real cdrtools but not with wodim (I also tried k3b and that failed too). So I just stick with cdrtools
    Hooray, one more convert
    I haven't really followed the discussion either but why choose an "emulated cdrecord" that doesn't work instead of the real program that works great?

  • Compress/zip files from the command line in Windows 7?

    In Windows 7 is there a native way to compress or zip files from the command line?  I'd like to do it without installing any third-party utilities such as 7Zip.

    I fully agree that Compact is not the answer. There are additional concerns with the Compact command. It enables disk compression which is a total no-no. Very bad! It makes your computer very slow and is quite difficult to undo. The only time anyone should
    use this command is when they're removing disk compression because someone turned it on to save space.  Turning this off has to be done by booting into the recovery console, if my memory serves me correctly, and it's a real nuisance.  So
    definitely no to the Compact command.
    If you wanted to compress files before sending them to another drive, or over a network, or by email, then Compact wouldn't actually help at all because the files have to get uncompressed whenever they're accessed, especially before sending them anywhere. 
    When I say accessed, I mean that just looking at a file triggers the OS to decompress it in the background and present you with an uncompressed version of it then letting you change it and recompressing it again for storage every single time you access the
    file, which is why your machine gets slower.  If you have folders or files that have blue text instead of black, then you've probably already made this mistake.
    I would also like to know if there is a built-in command for zipping files/directories, or, if there isn't such a thing built into Windows, then I would like to know if this is feature is accessible through Visual Studio, which would be just as good as having
    a command-line program for those of us that do a bit of programming.
    If anyone knows if MS provides such a feature, either by command-line or through an API, then I'd love to hear about it.  Good luck to those of you that have disk compression turn on.

  • Accessing Runtime Mbeans from the command line.

    Hi,
    I just wanted to know if runtime Mbeans can be invoked from the command line.
    I tried accessing the ExecuteQueueRuntime mbean from the command line but nothing ever comes back.I am able to retrieve configuration mbeans without errors.
    Do I need to create the runtime mbeans before I can use them ?
    Or I need to invoke these commands via server code only?
    Thanks.

    Can you post the command you are using? I just tried this and seems to work.
    D:\>java weblogic.Admin -username weblogic -password weblogic get -type ExecuteQueueRuntime -pretty
    MBeanName: "mydomain:Location=myserver,Name=weblogic.admin.RMI,ServerRuntime=myserver,Type=ExecuteQueueRuntime"
    CachingDisabled: true
    ExecuteThreadCurrentIdleCount: 2
    ExecuteThreadTotalCount: 3
    ExecuteThreads: [Lweblogic.management.runtime.ExecuteThread;@3eb934
    Name: weblogic.admin.RMI
    ObjectName: weblogic.admin.RMI
    Parent: myserver
    PendingRequestCurrentCount: 0
    PendingRequestOldestTime: 1129990444704
    Registered: false
    ServicedRequestTotalCount: 87
    Type: ExecuteQueueRuntime
    MBeanName: "mydomain:Location=myserver,Name=weblogic.kernel.System,ServerRuntime=myserver,Type=ExecuteQueueRuntime"
    CachingDisabled: true
    ExecuteThreadCurrentIdleCount: 5
    ExecuteThreadTotalCount: 5
    ExecuteThreads: [Lweblogic.management.runtime.ExecuteThread;@2cfc8c
    Name: weblogic.kernel.System
    ObjectName: weblogic.kernel.System
    Parent: myserver
    PendingRequestCurrentCount: 0
    PendingRequestOldestTime: 1129990444754
    Registered: false
    ServicedRequestTotalCount: 124
    Type: ExecuteQueueRuntime
    MBeanName: "mydomain:Location=myserver,Name=weblogic.kernel.Non-Blocking,ServerRuntime=myserver,Type=ExecuteQueueRuntime"
    CachingDisabled: true
    ExecuteThreadCurrentIdleCount: 0
    ExecuteThreadTotalCount: 0
    ExecuteThreads: [Lweblogic.management.runtime.ExecuteThread;@2d125d
    Name: weblogic.kernel.Non-Blocking
    ObjectName: weblogic.kernel.Non-Blocking
    Parent: myserver
    PendingRequestCurrentCount: 0
    PendingRequestOldestTime: 1129990444764
    Registered: false
    ServicedRequestTotalCount: 0
    Type: ExecuteQueueRuntime
    MBeanName: "mydomain:Location=myserver,Name=weblogic.admin.HTTP,ServerRuntime=myserver,Type=ExecuteQueueRuntime"
    CachingDisabled: true
    ExecuteThreadCurrentIdleCount: 2
    ExecuteThreadTotalCount: 2
    ExecuteThreads: [Lweblogic.management.runtime.ExecuteThread;@2d260e
    Name: weblogic.admin.HTTP
    ObjectName: weblogic.admin.HTTP
    Parent: myserver
    PendingRequestCurrentCount: 0
    PendingRequestOldestTime: 1129990444814
    Registered: false
    ServicedRequestTotalCount: 0
    Type: ExecuteQueueRuntime
    MBeanName: "mydomain:Location=myserver,Name=weblogic.kernel.Default,ServerRuntime=myserver,Type=ExecuteQueueRuntime"
    CachingDisabled: true
    ExecuteThreadCurrentIdleCount: 15
    ExecuteThreadTotalCount: 15
    ExecuteThreads: [Lweblogic.management.runtime.ExecuteThread;@2d3a8c
    Name: weblogic.kernel.Default
    ObjectName: weblogic.kernel.Default
    Parent: myserver
    PendingRequestCurrentCount: 0
    PendingRequestOldestTime: 1129990444854
    Registered: false
    ServicedRequestTotalCount: 7
    Type: ExecuteQueueRuntime
    D:\>
    Thanks,
    -satya
    BEA Blog: http://dev2dev.bea.com/blog/sghattu/

  • Get GPS location from the command line

    Is there a utility to get the current GPS location from the command line?  A quick search says `geo` will do it, but that appears to come with the android dev tools, which I'd rather not install right now.  The reason I want to do this is to avoid hard-coding my coordinates in a call to `redshift`.

    enduser wrote:
    Hmm.. `gpspipe` gives me:
    gpspipe: could not connect to gpsd localhost:2947, Unknown error -6(-6)
    And `gpsd` gives me:
    gpsd:ERROR: can't run with neither control socket nor devices
    Do I need to be root for these applications? Alternatively, could I maybe just grab the timezone from /etc/localtime and use that? (though I guess that doesn't get close enough on longitude...)
    You have to start gpsd from systemctl.  And you can plug/unplug gps devices at will, so it can be enabled in systemctl whether or not an actual gps is always available.

  • Hot Deploying Servlets from the command line

    Is it possible to hot deploy a servlet from the command line?
              

    Use the mbocutil command line tool located in:
    server root/bin/msg/admin/bin
    You can create a folder with spaces by using quotes like thus:
    ./mboxutil -c "user/Tuser/Test Folder"
    -Chris

  • Using the command line with DESKI to run a specific module in a report

    I'm using BOXI R2 Desktop edition in a Windows Environment.
    I have a report with a macro inserted in it which is composed of several sub-modules. 
    I know I can launch the report from the command line as follows: "C:\PROGRAM FILES\BUSINESS OBJECTS\BUSINESSOBJECTS\BUSOBJ.EXE" -user "USERID" -pass "PSWD" "Directory and Filename" -keyfile "Keyfilename" -nologo
    What I want to know is can I launch the report from the command line and call a specific module.  So if I have 5 modules in a single report, can I just call 1 from the command line?
    How would that be formatted?
    Thanks in advance.

    There's some more stuff to be done to correctly call external executables.
    Read [When Runtime.exec() wont|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html], it shows some of the pitfalls of Runtime.exec().
    Edit: there's also JRuby, which might be worth a try.

Maybe you are looking for

  • Oracle Service Bus Installation

    Greetings. We are migrating an Oracle Service Bus infrastructure to a new Hardware Infrastructure in a High Availability environment with two nodes, in the current environment there is one node. There isn't a hardware load balancer in the new infrast

  • How to restore a table using RMAN with previous backup ?

    Hi everyone, we have to restore a table from 1 week previous backup using RMAN. Could you show me how to restore a table using RMAN with previous full backup. please Help me out. Thanks Info > oracle 10g, OS: AIX5L

  • Can anyone help? iMac wont boot

    Hi, I have a G4 iMac (dome) and I use my Air most of the time, so I have decided to give it to a friend who REALLY needs a computer... I haven't ever had any problems with it and I needed to wipe it clean to give it away. So I powered it up (it had b

  • Changing SID Server 2012

    Hello, In Server 2008, to be able to create new VM using same (copied) VHD, we had to use SYSREP to change SID or 3rd party tools, if we wanted to join it to the same domain, otherwise we got an instability on servers. How can we change/update SID in

  • Configration File for JBoss ??

    In the section "BC4J as an EJB Session Bean" of "How Do I Deploy BC4J Applications to JBoss?" a BC4J Configuration file has been created for JBoss by modifying the IAS configuration file. But the dear fellow, who wrote the Article did not mention tha