Momagent command line problem

 Hi All
 I have command line for mom agent but it have more than 200 characters.
How can i deploy through sccm 

Use a batch file instead, e.g. "install-mom.cmd" contains your very long command line.
Torsten Meringer | http://www.mssccmfaq.de

Similar Messages

  • Javac command line problem

    Why might the javac.exe, java.exe, and javaw.exe command lines not stay open? When I open these files, the command line flashes open and immediately disappears.
    I tried opening these files using "Run as..." and unchecking the "Protect my computer from unauthorized program activity" option (as my first guess was and still is that I am running into some kind of Windows security settings problem), but this seemed to have no effect.
    I am using Windows XP Professional with all updates as of 06-21-2007.

    You always want to run executables like that and things like .bat files from a command window. To open a command window, follow jverd's post, reply #2.

  • Acrobat Reader command line problem

    In windows xp professional I'm programatically creating a batch file and executing it (shell command in visual basic) to convert pdf files to Microsoft xps.
    The batch command looks like this one:
    "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" /t "D:\MyDir\Microsoft XPS Document\x.pdf" "Microsoft XPS Document Writer" /t "D:\MyDir\Microsoft XPS Document\x.xps".
    When the user logged in on the machine is an administrator, acrobat reader does the operation silently. When a normal user (not belonging to administrators group) is logged in on the machine, acrobat reader opens the save as dialog window requiring user interaction.
    The normal user has full control over the destination directory. I already tested giving the normal user full control over AcroRd32.exe and over cmd.exe with no success. I also tried in visual basic 2008 executing the command through System.Diagnostics.Process.Start with the exact same curious results.
    Can someone help.
    Thank you.

    Hi.
    I couldn't find a solution within Adobe for the problem I reported Oct 9, 2012, so I went to a fallback solution aimed to complete the needed stages. I'm posting here the visual basic 2008 code I wrote then. It is not a graceful solution and has some coarse code but was designed as part of an application that must keep processing files without user intervention. The procedure "followAcroRd32PDFtoXPS" must be called after the execution of a batch command like the described in the previous post:
    Module fallback
        Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
        Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwndParent As Integer, ByVal hwndChildAfter As Integer, ByVal lpszClass As String, ByVal lpszWindow As String) As Integer
        Declare Function GetDlgCtrlID Lib "user32" (ByVal hDlg As Integer) As Integer
        Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (ByVal hDlg As Integer, ByVal nIDDlgItem As Integer, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
        Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
        Const WM_SETTEXT = &HC
        Const BM_CLICK = &HF5
        Function FileInUse(ByVal filepath As String) As Boolean
            Dim f001 As Integer
            If System.IO.File.Exists(filepath) Then
                Try
                    f001 = FreeFile()
                    FileOpen(f001, filepath, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite)
                    FileClose(f001)
                Catch
                    Return True
                End Try
            End If
        End Function
        'outpfile <-- path to the XPS Document to be created
        'starttime <-- system date and time when the batch command line was executed
        Sub followAcroRd32PDFtoXPS(ByVal outpfile As String, ByVal starttime As System.DateTime)
            Dim p As System.Diagnostics.Process, q As System.Diagnostics.Process, proc() As System.Diagnostics.Process
            Dim i As Integer, j As Integer
            Dim l As Long, memusage() As Long
            Dim t000 As System.DateTime
            Dim t999 As System.DateTime
            Dim hwnd As Integer, lObjhWndTB As Integer, lObjhWndBu As Integer
            Dim nIDDlgItem As Integer
            Dim resu As Integer
            dim maximumacrobatwaittime = 60 'seconds
            dim memoryusageinactivity = 12 'seconds
            dim acrord32pdftoxpstimelimit = 12 'seconds
            'Identify necessary Adobe Reader process
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                i = 0
                For Each p In System.Diagnostics.Process.GetProcesses
                    If LCase(p.ProcessName) = LCase("AcroRd32") Then
                        If Not p.StartTime < starttime Then
                            ReDim Preserve proc(i)
                            proc(i) = p
                            i = i + 1
                        End If
                    End If
                Next
                If i > 0 Then Exit Do
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Identify necessary window
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                hwnd = FindWindow(vbNullString, "Save the file as")
                If hwnd <> 0 Then
                    Exit Do
                End If
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Send click message to button save
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                lObjhWndTB = FindWindowEx(hwnd, 0, "ComboBoxEx32", "")
                If Not lObjhWndTB = 0 Then
                    nIDDlgItem = GetDlgCtrlID(lObjhWndTB)
                    resu = SendDlgItemMessage(hwnd, nIDDlgItem, WM_SETTEXT, 0, outpfile)
                    If resu > 0 Then
                        lObjhWndBu = FindWindowEx(hwnd, 0, "Button", "&Save")
                        If Not lObjhWndBu = 0 Then
                            resu = PostMessage(lObjhWndBu, BM_CLICK, 0, 0)
                            If Not resu = 0 Then
                                Exit Do
                            End If
                        End If
                    End If
                End If
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Adobe Reader eventually will enter inactivity after printing to XPS Document
            ReDim memusage(0)
            Do
                System.Threading.Thread.Sleep(1000)
                ReDim Preserve memusage(UBound(memusage) + 1)
                For Each p In proc
                    p.Refresh()
                    memusage(UBound(memusage)) = memusage(UBound(memusage)) + p.WorkingSet64
                Next
                If Not UBound(memusage) < memoryusageinactivity Then
                    j = 0
                    l = memusage(UBound(memusage))
                    For i = UBound(memusage) - 1 To UBound(memusage) - memoryusageinactivity + 1 Step -1
                        If l = memusage(i) Then j = j + 1
                    Next
                    Select Case j
                        Case memoryusageinactivity - 1
                            Exit Do
                        Case Else
                    End Select
                End If
            Loop
            'Wait for the new XPS Document
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                Select Case My.Computer.FileSystem.FileExists(outpfile)
                    Case True
                        If Not FileInUse(outpfile) Then Exit Do
                    Case Else
                End Select
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > acrord32pdftoxpstimelimit Then
                    Exit Do
                End If
            Loop
            'Kill Adobe Reader process
            For Each p In proc
                p.Refresh()
                Try
                    p.Kill()
                Catch ex As Exception
                End Try
            Next
            'Kill eventual MS Windows error reporting system process
            For Each p In System.Diagnostics.Process.GetProcesses
                If LCase(p.ProcessName) = LCase("WerFault") Then
                    If LCase(p.MainWindowTitle) = LCase("Print driver host for 32bit applications") Then
                        For Each q In System.Diagnostics.Process.GetProcesses
                            If LCase(q.ProcessName) = LCase("splwow64") Then
                                Try
                                    q.Kill()
                                Catch ex As Exception
                                End Try
                            End If
                        Next
                        Try
                            p.Kill()
                        Catch ex As Exception
                        End Try
                    End If
                End If
            Next
        End Sub
    End Module

  • BlueJ command line problem

    Hi i am new to java practicing since 3 weeks now. i am using blueJ iam liking it but the problem i am facing is i can't pass command line parametres to String args through BlueJ .After right clicking on Main program (in Insert Sort) it asks for arguments when i pass the arguments that is
    4 3 2 0 1 it says :- "}" expected or ";" expected and same program if i run thru command line passing parametres it works fine. The thing is i want to use debug features of Bluej which i can't using command prompt
    please help me out

    thanks for your quick response.
    i am new to this stuff. are u telling me that
    java VectorTest one two
    will return as 0 even though there are 2
    arguments for the args array.
    if so what do i do.create a new class to accept the
    arguments and add them to the vector?
    No, if you put the command line as you describe, you should get args.length = 2, as you would expect.
    BTW - the reason your square brackets are disappearing is because the forum uses square brackets for special formatting - which is a real pain. I think the following should work:
    String nString = args;
    [ / code]
    But it doesn't exactly - the square brackets end up as angle brackets, as you can see - anyone help, please? Also, at the end of the code section, there shouldn't be spaces around the / - I just put them in to stop it acting like a real end of code section.
    Also, notice that there's no need to putnString = new String(args);
    you can use args directly.
    Robin

  • Solaris 10 x86 cdrw trouble.  Gnome and command line problems writing.

    I'm experiencing general weirdness trying to write CD's and DVD's using a new internal DVD-RW device -- It's a Sony NEC AD 7220 A CD / DVD RW drive on a Solaris 10 x86 AMD system. I have searched far and wide for other threads of similar instances but no one has posted an issue like the one I'm having.
    I have a Sony Optiarc AD 7220 A CD-RW on a x86 AMD Athalon 1.6 ghz based server with 2 GB RAM.
    The DVD-RW drive gets detected by BIOS (Phoenix TrustedCore 2.3) and reads disks fine. I installed Solaris 10.08 from DVD using this DVD-RW drive.
    However, trying to write to new blank media does not work properly, (effectively at all).
    I've tried different brands of brands of blank CD's and CD-R and CD+R (have not tried using CD-RW disks yet). Ditto with DVD's - tried DVD-R and DVD+R's.
    1. Inside the Solaris 10 GUI (Gnome, a.k.a. Java Desktop), when I put in a blank CD-R, a dialog box "Format Media...?" pops up. If I click "Ok" it formats the blank CD and closes the session, CD has been written to and is ruined.
    2. I open a terminal window, as root, and put in a blank CD. "mkisofs –r /home/foo 2>/dev/null | cdrw –i –p 1" will write a directory tree OK, but if I go back into gnome GUI and open and close the CD tray, again, up pops the "Format Media..." dialog box instead of the CD appearing on the desktop. If I restart vold (svcadm restart volfs) then open and close the CD tray, voila, the contents appear on desktop as CD icon.
    3. When I try to write to a DVD-R: "cdrw -i /local/iso_image" It always fails with: Write Track 1....Failed. after a few minutes. It did in fact write part of the .iso but bails out with a failure.
    I've tried various other write commands (specifying the device ID, speed, so on and so forth) and command line switch options (following the rules of course) and it seems to me to be more than a syntax / media issue. However if it is I would like to know. I did see a similar CDRW device on the HCL for OpenSolaris with a 'reported to work' rating. That was for a Optiarc AD-5200A, which is going away thus my company has chosen to use the AD 7220A in speciality racks we build and deliver to the U.S. Navy.
    I really need to get a handle on this CD-RW device issue and decide if a different brand / model is what it's going to take to solve this and move on to producing and delivering these systems in working conditions.

    Sony systems are often very particular about what CD's and DVD's they'll take. I have several Sony systems that I use for video work and they'll read almost anything but they'll only write to DVD RW.  They also don't like cheap brand CD's and DVD's.  Be sure to try both CD RW and DVD RW before doing anything else.  Because of the requirement for DVD RW, they won't take fast speed (16x) DVD's, just 4x. If all of this turns out to be the case, you may want to go with a different manufacturer for the drive, DVD +RW 4x aren't always easy to find in the store.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Apple Cube OS9 command line problems.

    I have a old Cube with a partioned HD with OS9.2 on one partition and OSX.2 on the other.  Had been working fine with OS9, but tried to boot the OSX using "Start Disk" and it crashed giving me a command line.    How can I reset the start disk to the OS9? Won't start from a CD for some reason and I can't seem to get it out of this loop.
    This is what it gives me:
    /etc.master.password: no such file or directory
    sh-2.o5a# _
    The only thing I can think of is to type "reboot" and it does...back to this command line.   Not sure of what command I can use to get back to the original
    OS9 boot.   Any help would be appreciated.  Trying to get this computer set up as a word processor for my daughter.  Thanks in advance!!!

    Depress the Option key at startup and the OS 9 partition icon should be shown as a startup option. Click the icon and then the right arrow.
     Cheers, Tom

  • Command line problem

    when I submit the following using the terminal :
    /Applications/Compressor.app/Contents/MacOS/Compressor -clustername "This Computer" -jobpath /Users/apple/Desktop/test.mp4 -settingpath /Users/apple/Library/Application\ Support/Compressor/Settings/siteh.264.cmprstng -destinationpath /Users/apple/Desktop/testok.mp4
    I get this:
    Invalid parameter: -clustername
    I just installed from scratch Mac OS 10.9.1 and Compressor 4.1
    any suggestion ?

    I found the problem - even if in the manual and everywhere else says to use the command -clustername and -destinationpath they have been removed - use -help to see the ones that work like
    locationpath
    apple should update all their documentation

  • Command line Problems

    Hello!!
    I have problems with the find command.
    When I find something, a little time later my computer restarts.
    Only occurs with this command
    Somebody knows why occur this??
    What I had to configure?

    Try using the -path -prune find options to ignore /dev. For example:find / -name '*' -path /dev /prune -print

  • Problem using extension manager CS5 with command line

    Hi All,
    I had posted my question here : http://forums.adobe.com/message/4695419#4695419, but was advised to do so here as well..
    I have a requirement to get the path of all the installed Extension Managers on any Windows system for the purpose of installing an extension.. I thought, there would be no problem in getting the path from the registry. There was no problem in Win XP, but the same does not work for Win 7.. I googled, and found alternate ways to get the path.
    Here is the link : http://forums.adobe.com/thread/851359. I followed the instructions in this post, but failed to get this working for CS5 as mentioned in my previous thread... No problem for CS5.1 and CS6.. Why is that?
    I want to get this working for CS5, CS5.1, CS6... How can I get the path of all the Extension Manager versions installed on a Windows system?
    Please refer to the following screenshots to get a better understanding of my problem,
    I created a jsx file named "Result.jsx", which I saved in my D drive, with the following code,
    resultFile = new File("D:/result.log");
    resultFile.open("w");
    resultFile.write(BridgeTalk.__diagnostics__);
    resultFile.close();
    If I run this directly from ESTK CS5, there is no problem, and I get the result.log file. I tried to execute this script via command line as shown in the screenshot,
    On executing the above, I got the following error,
    What is going wrong?
    Please help!

    I am sorry for the poor documentation of Extension Manager which causes you so much trouble.
    1. You can use BridgeTalk API to ask specific version of Extension Manager to do something. There is sample in packaging_extension.pdf about this. You don't need to know the installation path of Extension Manager. One thing to note is that the value of bt.target is version specific, i.e. "exman-5.0", "exman-5.5" send this message to different version of Extension Manager, so you can change this value to install/enable/disable/remove extensions using different version of Extension Manager. More detailed documentation of BridgeTalk can be found by clicking "Help" menu then clicking "Javascript Tools Guide CS5" in "Adobe ExtendScript Toolkit CS5".
    2. Specific version of Extension Manager only manage extensions for corresponding version of product. You should use Extension Manager CS5 to install extensions for Photoshop CS5. The reason that the extension you installed for Photoshop CS5.1 using Extension Manager CS5.5 is displayed for Photoshop CS5 in Extension Manager CS5 is that two versions of Photoshop specified the same directory for Extension Manager to manage extensions. This is a defect and will cause some problems if multiple versions of Photoshop co-existed in one machine. But "to find  previous (CS5) extension manager and to enable it" should work for you, I guess you use command line to enable it and specify wrong product name (see #3) so that it doesn't work.
    3. When using command line, you should specify "product" attribute with the name displayed at the left panel of Extension Manager. So "Photoshop CS5 32" is correct. Remember to enclose it with double quote because of existence of space character.
    4. As above mentioned, use display name of Photoshop, and call proper version of Extension Manager by BridgeTalk.

  • Problems with in/out points when submitting jobs via Terminal/command-line

    I've writting a GUI based script which allows a user to select a source Quicktime file, and will encode that file to multiple formats, and trims each destination based on specific timecode in/out points. However, I'm having problems getting the Compressor command-line interface to honor the in/out timecodes that I've explicitly set for multiple jobs within a single commandline.
    In other words, if I want to encode a source Quicktime between 01:00:00:00 and 01:00:29:23 with just ONE setting/destination, then the following commandline works:
    /Applications/Final\ Cut\ Studio/Compressor.app/Contents/MacOS/Compressor -clustername MHM -batchname CLI_BATCH -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov  -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/OTWC.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_OTWC.mov -in 01000000 -out 01002923
    But if I try to append multiple settings/destinations to the commandline, Compressor will only honor the -in/-out arguments which appear in the LAST -jobpath instance in the commandline.
    For example, the following commandline will properly encode the file to multiple destination files, using the appropriate .settings file, but it ignores the -in/-out points that were set for any -jobpath instance that appears before the last -jobpath instance (in other words, every file is output using 00:59:57:00/01:00:30:01 as the in/out points, instead of having the "*_OTWC.mov" file output using 01:00:00:00 as the in point)
    /Applications/Final\ Cut\ Studio/Compressor.app/Contents/MacOS/Compressor -clustername MHM -batchname CLI_BATCH -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov  -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/OTWC.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_OTWC.mov -in 01000000 -out 01002923 -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/HNN-HD.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_HNN-HD.mov -in 00595700 -out 01003001
    It's wierd that everything else about this command-line syntax works as expected (and as explicitly stated in the Compressor -help output, which says "when submitting individual source files. (The) Following parameters are repeated to enter multiple job targets in a batch"), except for the -in/-out points.
    I've even tried quoting the -in/-out arguments using colons (e.g., -in "01:00:00;00") , but this doesnt appear to change the behavior.
    Is this a bug, or am I missing something here?

    I've writting a GUI based script which allows a user to select a source Quicktime file, and will encode that file to multiple formats, and trims each destination based on specific timecode in/out points. However, I'm having problems getting the Compressor command-line interface to honor the in/out timecodes that I've explicitly set for multiple jobs within a single commandline.
    In other words, if I want to encode a source Quicktime between 01:00:00:00 and 01:00:29:23 with just ONE setting/destination, then the following commandline works:
    /Applications/Final\ Cut\ Studio/Compressor.app/Contents/MacOS/Compressor -clustername MHM -batchname CLI_BATCH -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov  -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/OTWC.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_OTWC.mov -in 01000000 -out 01002923
    But if I try to append multiple settings/destinations to the commandline, Compressor will only honor the -in/-out arguments which appear in the LAST -jobpath instance in the commandline.
    For example, the following commandline will properly encode the file to multiple destination files, using the appropriate .settings file, but it ignores the -in/-out points that were set for any -jobpath instance that appears before the last -jobpath instance (in other words, every file is output using 00:59:57:00/01:00:30:01 as the in/out points, instead of having the "*_OTWC.mov" file output using 01:00:00:00 as the in point)
    /Applications/Final\ Cut\ Studio/Compressor.app/Contents/MacOS/Compressor -clustername MHM -batchname CLI_BATCH -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov  -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/OTWC.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_OTWC.mov -in 01000000 -out 01002923 -jobpath /Volumes/mel/temp/20120329/TEST_SRC.mov -settingpath /Volumes/common/settings/compressor/M9_Slave/_Local_/HNN-HD.setting -destinationpath /Volumes/mel/temp/20120329/TEST1234_Testing30_HNN-HD.mov -in 00595700 -out 01003001
    It's wierd that everything else about this command-line syntax works as expected (and as explicitly stated in the Compressor -help output, which says "when submitting individual source files. (The) Following parameters are repeated to enter multiple job targets in a batch"), except for the -in/-out points.
    I've even tried quoting the -in/-out arguments using colons (e.g., -in "01:00:00;00") , but this doesnt appear to change the behavior.
    Is this a bug, or am I missing something here?

  • SCCM 2012 - Problems running vbscript or simple command line

    Hey everybody, I'm having a heck of a time trying to get SCCM 2012 to deploy some very simple Vbscripts or even a simple command line.  I need to deploy some registry fixes across the company as well as a Vbscript that uninstalls some old applications. 
    If I run these scripts/commands outside of SCCM everything works fine, inside of SCCM it always shows "succeeded" but it doesn't actually run correct on the client.
    What's confusing to me is the use of distribution points when you're running a command line that doesn't actually have any source files.  For instance this is what I'm trying to run "regedit /s \\servername\folder\registryfix.reg".  I've also tried
    a similar bat file as well with the same result.  I've tried it with a source folder specified, I've tried it using Run Program From Server or Download locally.  I've gone through everything I can think of but can't get it to work.
    Similarly with a vbscript I'm trying "cscript.exe /s \\servername\folder\uninstallapps.wsf" and various different settings in the package deployment.
    I'm really confused here guys so any help would be greatly appreciated.  Thanks

    What I have found is that if you try and run the REG.EXE command line directly, either as a program or via a CMD/BAT file, the 64-bit redirection will occur.  So, if you had something like this in a program or via a CMD/BAT file that ran against a 64-bit
    system:
    REG ADD HKLM\Software\Microsoft\Test /v Test /d Test
    You would end up with this registry entry existing under:
    HKLM\Software\Wow6432Node\Microsoft\Test
    That's because SCCM uses the 32-bit launcher to take care of this and redirection occurs - You can see this via the "CCM32BitLauncher.log" on the client.
    To work around this problem, I have done the following:
    On a reference machine, create/export the registry entry I want into a *.reg file - An example export of "Test.reg" for the above mentioned registry entry would look something like this:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Test]
    "Test"="Test"
      2.  Stick our "Test.reg" file in a source share, create a package with the share as the source content, and distribute it
      3.  Create a program for the package with a command line like this: 
    REG IMPORT Test.reg
    This is obviously not as clean as having a command line with a package to distribute, but I find it works fine for me and gets around the redirection for registry entries.

  • Problem - reading an abitrary string from the command line in basic swing

    Hi,
    I'm sorry if this problem is a bit basic, but I've only just started swing in Java. Anyway, I'm trying to adapt a basic swing version of the HelloWorld class. When I try to pass an abitrary string from the command line to the label within the class, I get the following error,
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
            at week2.HelloWorldSwing_commandline.main(HelloWorldSwing_commandline.java:31)
    Java Result: 1I must be missing something because I can't see where the problem is in the following code.
    import javax.swing.*;
    import java.awt.*;
    public class HelloWorldSwing_commandline {
        String message;
        private static void createAndShowGui(String message){
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("HelloWorldSwing");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JLabel label = new JLabel(message);
            Container content = frame.getContentPane();
            content.add(label);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[ ] args) {
         createAndShowGui(args[1]);
    }Any help would really be appreciated.

    Hi,
    I've tried changing the index value to O in the main method, but I still get the same error.
    I'm running this in NetBeans 4.1, and when I try to run the class I get the error as listed above.
    Any ideas how to correct this error?
    Thanks

  • Problem associated with Command Line arguments

    hi ,
    I am not able to pass a file path as command line argument in java.
    Actually i want to run a java program from the command prompt passing a file path . Something like this i tried to do , but its not working.
    D:\VISHAL\src> java CopyFile C:\Documents and Settings\Administrator\Desktop\link.txt
    where ,
    CopyFile is the name of my class which i am going to run
    C:\Documents and Settings\Administrator\Desktop\link.txt is the argument.
    Can anyone tell me whether a java program accepts an argument like this, if yes please tell me the exact syntax..
    Thanks
    Vishal J
    Message was edited by:
    vishal_vj

    is there any other way of solving this?Y don't U try it out with the logic as mentioned
    below it wud be the case if U r not going with
    java CopyFile "C:\Documents and
    Settings\Administrator\Desktop\link.txt" 1
    String filepath = new String();
    for(int i = 0; i < Arg.length; i++)
    filepath.append(Arg);
    File f = new File(filepath);
    What????  This is a non-solution to a non-problem.  First of all, you would be constructing a filename without spaces, when the real path contains spaces.  Secondly, even if you did insert spaces it would not matter.  What if the String (and it does not have to be a filename) contained tabs rather than spaces.  The real (and really only) solution to the problem is to put quotes around the argument, for the exact reason stated in my last post.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Permission problems with command line CVS and Java CVS App

    Greetings,
    I'm part of a moderately sized website development team which recently upgraded to MacBook Pros (dual core) running OS 10.4.9. One of the primary tools we use in our day to day work is the open source concurrent versioning system (CVS). We've noticed a distressing issue running CVS on our macbook pros: there seems to be a problem with the way these new machines handle permissions on the directories/files that CVS uses to manage files.
    The error occurs when the CVS application, in this case both command line CVS and GUI CVS application named SmartCVS, tries to rename a temporary file named Entries~ to its new name Entries (no ~). It looks like this:
    java.io.IOException: Could not rename file
    /Users/[USER]/Sites/[MODULE]/lib/CVS/Entries~ to
    /Users/[USER]/Sites/[MODULE]/lib/CVS/Entries
    at smartcvs.JP.a(SourceFile:125)
    at smartcvs.JP.a(SourceFile:113)
    We've noticed that if we open up a get info window on the directory we're downloading, and choose "Apply to enclosed items" right when we start the download process, the issue will be resolved, presumably because the permissions are being set on the subdirectories as the download is taking place.
    We've checked the permissions on the overall ~/Sites/ directory numerous times, and they always seem to be set correctly as drwxr-xr-x. It's within this folder that CVS creates a directory with the CVS module name and downloads all the contained files, so we don't see why it would be having issues completing this successfully. We also checked to ensure the GUI CVS application is running under the current user on the machine: it does.
    Has anyone run into issues like this in the past? Is there more information I could provide to further clarify the problem we're having?
    Thanks for any input you have!

    Thanks for asking Jeff, yes one place we are seeing this error is Java application SmartCVS, though the results posted here are from a normal command line CVS checkout.
    ===
    Checkout command:
    cvs co [MODULE]
    ===
    Error:
    cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: No such file or directory
    ===
    ID:
    uid=502([USER]) gid=502([USER]) groups=502([USER]), 81(appserveradm), 79(appserverusr), 80(admin)
    ===
    LS -ALN
    Computer:~/Sites [USER]$ ls -aln
    drwxr-xr-x 28 502 502 952 Jun 4 13:11 Sites
    Computer:~/Sites/[MODULE] [USER]$ ls -aln
    drwxr-xr-x 38 502 502 1292 Jun 4 13:33 www_root
    Computer:~/Sites/[MODULE]/www_root [USER]$ ls -aln
    drwxr-xr-x 32 502 502 1088 Jun 4 13:33 [SUBDIR1]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1] [USER]$ ls -aln
    drwxr-xr-x 5 502 502 170 Jun 4 13:33 [SUBDIR2]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2] [USER]$ ls -aln
    drwxr-xr-x 4 502 502 136 Jun 4 13:33 [SUBDIR3]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2]/[SUBDIR3] [USER]$ ls -aln
    drwxr-xr-x 6 502 502 204 Jun 4 13:33 CVS
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2]/[SUBDIR3]/CVS [USER]$ ls -aln
    total 32
    drwxr-xr-x 6 502 502 204 Jun 4 13:33 .
    drwxr-xr-x 4 502 502 136 Jun 4 13:33 ..
    -rw-r--r-- 1 502 502 45 Jun 4 13:33 Entries
    -rw-r--r-- 1 502 502 45 Jun 4 13:33 Entries.Log
    -rw-r--r-- 1 502 502 48 Jun 4 13:33 Repository
    -rw-r--r-- 1 502 502 63 Jun 4 13:33 Root
    MacBook Pro / MacPro Mac OS X (10.4.9)

  • Problem with command line argument files and quoted strings

    I'm trying to use the following custom tag:
    -tag com.me.Test.testTag:f:"My Test Tag"
    This works fine when sent straight to the command line, but if I put it in an argument file (@argfile) along with the rest of my command, I get the following error:
    javadoc: Illegal package name: "My Test Tag"
    Any idea why this is happening? If I use a one-word tag header and omit the quotes, javadoc runs with no problems. I'm using Sun's SDK 1.4.1.
    Thanks for your help!
    Linda Howard

    White space is treated a bit differently in an @argfile,
    to enable users to put packages or options on separate lines.
    You might try escaping the spaces:
    "My\ Test\ Tag"
    or using a non-breaking space:
    "My Test Tag"
    What operating system are you on?
    -Doug Kramer
    javadoc team

Maybe you are looking for

  • Does apple have any products to facilitate video input on iMac 27"?

    I want to input video to my iMac 27". I assume you can add a display port video card to a pc, what about VGA and hdmi support?  Has apple addressed this?  I know there was the belkin av360, apple doesnt like It anymore?

  • Exporting edited video

    I am new to premiere CS5.  I need to send the roughcut to the client for review before further work is done.  In simple steps, can someone please explain how to export the project to create a quicktime video?  How can I create different sized files?

  • Doubt in call method program

    hi, I am getting error as i marked BOLD in this program...can u give solutions for that.. REPORT  YSBDC6. TABLES:LFA1. DATA:BEGIN OF ITAB OCCURS 0,      LIFNR LIKE LFA1-LIFNR,      LAND1 LIKE LFA1-LAND1,      NAME1 LIKE LFA1-NAME1,      END OF ITAB.

  • Can only use phone in speaker phone mode

    I can only use the phone in speaker phone mode. Neither party can hear the phone in regular mode. Any ideas

  • How to tune the SQL & solve UNIQUE Contraint issue using without duplicates

    CREATE TABLE REL_ENT_REF   ROLL_ENT        VARCHAR2(4 BYTE)              NOT NULL,   ROLL_SUB_ENT    VARCHAR2(3 BYTE)              NOT NULL,   ROLL_ENT_DESCR  VARCHAR2(50 BYTE),   ENT             VARCHAR2(4 BYTE)              NOT NULL,   SUB_ENT