Set java path to run jar in command prompt

i have installled only jre.. i dont have jdk..
Is it possible to run jar command in command prompt.
if possible please give me jar command...
thanks in advance

i have installled only jre.. i dont have jdk..ok
Is it possible to run jar command in command prompt.Please, read java tutorial before posting such question
if possible please give me jar command...Please, read java tutorial before posting such question

Similar Messages

  • Run midlet from command prompt

    Hi all,
    Can someone please detail me, as to how can I run the midlet from the command prompt directly and whether all kind of midlets (including those which use bluetooth and WMA api's ) can be directly run from the command prompt in windows. Any documentaiton or weblink to this will be appreciated.
    TIA
    -Shishir

    I have got around the issue. Previously I had not mentioned the path initially. But now I am getting an ExceptionInitializerError
    Here is the command again
    C:\Program Files\WTK2.5.1>java -cp .\wtklib\kvem.jar;.\wtklib\kenv.zip;.\wtklib\
    lime.jar;.\apps\Games\bin\Games.jar;.\wtklib -Dkvem.home=. com.sun.kvem.midp.Mai
    n DefaultGrayPhone -descriptor .\apps\Games\bin\Games.jadThe errors are
    Warning: Toolbar resources not found
    java.lang.ExceptionInInitializerError
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(Unknown Sour
    ce)
            at com.sun.kvem.environment.EmulatorInvoker.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.sun.kvem.environment.JVM.main(Unknown Source)
    Caused by: java.lang.NullPointerException
            at com.sun.kvem.util.ToolkitResources.getString(Unknown Source)
            at com.sun.kvem.midp.MIDP.initMenuActions(Unknown Source)
            at com.sun.kvem.midp.MIDP.<clinit>(Unknown Source)

  • Can I change user name after running essbase from command prompt??

    Hi,
    I run essbase from command prompt and during this activity I was asked to give user name and password, but by mistake I put wrong user name and now wolud like to chanege it.
    Is it possible??
    cheers,

    It worked,
    now I was able to connect to easbase from planning, I ve created sample aplication and initialize it but cannot connect to Eas to download data for sample application. After I run the validation there is now only one error displayed:
    Essbase / Essbase Administration Services
    FAILED Web App Availability of web application context (POL-MPIKULSKI 10080, eas)
    Error: com.hyperion.cis.utils.BadResponseCodeException: Bad response code: 404
    Recommended Action: Check application is started
    I tried to start the eas from start>programs>epm system>essbase>administration services>start administration services(java embeded) but it didnt help.
    can I start in in different way??
    cheers,

  • Running Jar vs. command line with libraries

    Hi everybody,
    I have an application that works well from the command line, which relies on 3 libraries, all of which are in the same directory. My current directory structure is like this:
    Main Folder
    -> Library 1
    -> Library 2
    -> Library 3
    -> Run script
    -> Source Folder ("source")
    ->-> Code and main class
    Library 1 depends on both Library 2 and Library 3. When I run from the command line, from the main folder, using this command:
    java -Djava.library.path=. source/MainClass
    My program runs fine.
    The problem comes when I try to package it into a Jar and replicate the directory structure.
    My manifest is:
    Manifest-Version: 1.0
    Main-Class: source.MainClass
    <newline>
    and my jar command is:
    jar cvmf Manifest.txt test.jar source/*.class
    When I try to run my jar, I get this error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/MainDirectory/Library1.so: Library2.so: cannot open shared object file: No such file or directory
    I know what this means-- for some reason it doesn't know where Library2 is-- but I'm mystified as to why this works fine from the command line and not from a jar. Can anyone help me figure this out, please?
    Thanks,
    Jezzica85

    warnerja wrote:
    Wrong question. You still want to run it via java -jar, but...
    Your jar needs a MANIFEST.MF (if I recall correctly, that is the right file name) in its META-INF folder (again, if I recall correctly) which needs to set up the classpath via a Class-Path=... line in the file.
    Actually you probably already do have such a file (you need it anyway for the jar to figure out what the main class is to execute), but it probably doesn't contain a Class-Path entry or is incorrect.
    Google for jar manifestI've had less than stellar success on correcting the big boys lately, but why should I let that stop me...
    As far as I can tell, the OP seems to be having problems with native link libraries. Some java class loads Library1 then (it appears) Library1 attempts to load Library2.
    Would fixing a CLASSPATH help that?
    I would expect it to be a problem with LD_LIBRARY_PATH (ala Sabre's earlier reply).

  • Cant See RTF Files in JAR but can when running program from command prompt

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

    posted August 16, 2005 08:26 AM
    Hi ALL:
    I have a Java Swing APP. It has Menus which displays information through File I/O in a JEditorPane.
    When I run my program from Command Prompt using "java myApp" it shows these RTF Files as it is.
    However when I run them after converting Directory into a Executable JAR FILE, it fails. I get a blank JEditorPane. My RTF files are in the CORRECT PATH, just dont get displayed. Rest of the APP works fine.
    Chetan
    any suggetsions

  • Setting java path in Linux

    Hi,
    I have installed Java 7 using rpm file: jdk-7u17-linux-x64.rpm, with the help of below command on my linux box:
    rpm -ivh jdk-7u17-linux-x64.rpm
    After completing the installation the java is installed in location "/usr/java/jdk1.7.0_17", when I try to find the jave version I am getting different result:
    java version "1.6.0_22"
    OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
    It is still pointing to 1.6 which was installed on my linux box earlier. How can I make sure that the java command uses the latest installed JDK 7?

    Hi.
    which java show what file select for this command.
    Environment variable PATH set order of path for find executable file.
    Try set:
    export PATH=/usr/java/jdk1.7.0_17/bin:$PATH
    export JAVA_HOME=/usr/java/jdk1.7.0_17
    add this commands to $HOME/.profile for make this changes permanent.
    Regards.

  • Need help setting java paths?

    I have a number of java files set up like this:
    com.pogo.chess2.Applet, com.pogo.chess2.game.Applet, etc
    Now each class file uses the keyword: package followed with its associating directory, for example Applet.class would look like this:
    package com.pogo.chess2;
    import com.pogo.game.external.b;
    How do I create a new java project and properly set the path?
    Basically I have all of my java code in a folder called com, which has subdirectories with java files as well. What is a package? How do I set it up using a gui such as JCreator Le? Is there a way to drag the folder com to the project and all the files will load?
    Thanks in advance.

    For package, see
    http://java.sun.com/docs/books/tutorial/java/concepts/package.html
    The rest of your questions involve details of editor/IDE usage. None of them relate to Java. Read the information or Helps from the product you're using.

  • Not running from the Command Prompt.

    I have developed a SMTP based mail dispatch software using netbeans and Javamail. It is working fine while running within netbeans. But while runing it from the command prompt after making a build of it from netbeans, it gives error File not found exception for javamail as below.
    =================================================
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_07\lib\java
    mail.address.map (The system cannot find the file specified)
    exception thrown:

    JavaMail attempts to load resources from many places. The fact that some
    are not found is not necessarily a problem. JavaMail will fall back to
    resources included in the mail.jar file.
    You need to look further in the debug output for the source of your problem.
    (I assume you've included mail.jar in your CLASSPATH when running
    your program from the command prompt. See README.txt included
    with JavaMail.)

  • Pass commands to running program using command prompt

    I have a program written in core java.
    This program do not contain any gui. As this program is to start using shell script , there will not be a command prompt open. Now , after program is started , i need to give the commands like \q for exit, \w to open some action etc .....
    How can i pass these commands to that already running program.
    I expect in the following way-
    Open a command prompt
    Select a specific path.
    when i type \w and enter then the running program should do some action.
    Can any one help me?
    Program will be running on Linux.

    Stop cross-posting:
    http://forum.java.sun.com/thread.jsp?thread=512664&forum=31&message=2438136
    http://forum.java.sun.com/thread.jsp?thread=512663&forum=54&message=2438134
    http://forum.java.sun.com/thread.jsp?thread=512267&forum=422&message=2435704
    MOD

  • VBScript Runs Correctly From Command Prompt, But Not From SQL Server Agent Job

    I'm trying to run this script on my local machine to do some post-batch cleanup and it doesn't run correctly from the scheduled job (or when I invoke the job).
    Here's the script in question:
    Option Explicit
    Const filePath = "C:\Documents and Settings\jmunn\My Documents\Visual Studio 2008\Logs\"
    Const holdDays = 6
    main
    Sub Main()
    ClearArchive
    End Sub
    Sub ClearArchive()
    Dim fso 'As Scripting.FileSystemObject
    Dim fld 'As Scripting.Folder
    Dim f 'As Scripting.File
    Dim delLogName, delLogOut, delCtr
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fld = fso.GetFolder(filePath)
    delLogName = filePath & "Nightly Backup - Backup Logs Deleted" & ".txt"
    Set delLogOut = fso.CreateTextFile(delLogName, True)
    delLogOut.WriteLine(delLogName)
    delLogOut.WriteLine("")
    delLogOut.WriteLine("-- The following log files were deleted on " & DateValue(Now()) & " at " & TimeValue(Now()))
    delLogOut.WriteLine("")
    delCtr = 0
    For Each f In fld.Files
    If Left(f.Name, 48) = "Nightly Backup - SQL Server Databases_Subplan_1_" And Right(LCase(f.Name), 4) = ".txt" Then
    If DateDiff("d", f.DateCreated, Date()) > holdDays Then
    delLogOut.WriteLine(f.Name)
    fso.DeleteFile f, True
    delCtr = delCtr + 1
    End If
    End If
    Next
    If delCtr = 0 Then
    delLogOut.WriteLine("No log files were deleted this run...")
    End If
    Set fld = Nothing
    Set fso = Nothing
    delLogOut.Close
    End Sub
    If I put the script in its own file and run it from the command prompt, it runs just fine. If the script runs from the SQL Server Agent job, the for-loop will delete the files correctly, but the filenames
    do not get written to the deletion log file and the counter does not get incremented, so according to the job log, nothing was deleted. Why does the script run differently from each invocation? It can't be a permission thing, the service that logs in has full
    access to the directory and the files do get deleted. Any ideas out there?
    Between this and other outstanding issues, I'm quickly losing faith in SQL Server.  >=o(
    Thanks in advance for your thoughts!
    John
    Version Info:
    Microsoft SQL Server Management Studio      10.0.2531.0
    Microsoft Analysis Services Client Tools      10.0.1600.22
    Microsoft Data Access Components (MDAC)      3.85.1132
    Microsoft MSXML      2.6 3.0 4.0 5.0 6.0
    Microsoft Internet Explorer      8.0.6001.18702
    Microsoft .NET Framework      2.0.50727.3603
    Operating System      5.1.2600
    "A bus station is where a bus stops. A train station is where a train stops. On my desk I have a workstation..."

    Hi
    jrmunn
    i am trying to execute VB script to refresh my excel files.. using Vbscript file through SQL Agent job step.
    i have copied VBscript in a file with the extension RefreshExcel.vbs kept in C:\RefreshExcel.vbs
    Below is the script used inside the file (RefreshExcel.vbs)
    //---Script code-----------------------------------------------------------------
    Dim objXL, objWB
    Dim FileLocation, FileName
    On Error Resume Next
    'lgnConn = 1
    FileLocation = "F:\Reports\Reports"
    Set objXL = CreateObject("Excel.Application")
    objXL.DisplayAlerts = False
    FileName = "ReportFile1.xlsx"
    'MsgBox (FileLocation & "/" & FileName)
    Set objWB = objXL.Workbooks.Open(FileLocation & "/" & FileName)
    objWB.EnableConnections
    objXL.CalculateUntilAsyncQueriesDone
    objWB.RefreshAll
    objXL.CalculateUntilAsyncQueriesDone
    objWB.RefreshAll
    objXL.CalculateUntilAsyncQueriesDone
    objWB.Save
    objWB.Close
    Set objWS = Nothing
    Set objWB = Nothing
    objXL.Quit
    Set objXL = Nothing
    'MsgBox ("Refresh Completed")
    ---------------------------------------------------------------------------------------------------//Script complete
    Now when i am trying to call this script file in SQL agent job step (as you mentioned )
    as Type -cmdExec(OperatingSystem)
    cscript "C:\RefreshExcel.vbs"
    Issue: job step executed succesfully ,,but without performing any refresh on the excel. So i am not understandig what is going wrong. the same script file work when i am calling it through a batch file (window scheuler task). But it doesnt support
    to run the file "when user is not logged in"
    that is why  i want to refresh my excel file through sql agent ,which can be scheduled to any time and cab be run as SQL agent credentials.
    Can you please help me on this ...i have tried all the option but nothing working .. found hope by seeing your solution.
    Thanks in advance.
    Please help me. :-(

  • Query running on sql commands prompt not running on report region

    Hi All,
    Facing a weird issue now. I have written a report query which is running absolutely fine in sql command prompt but when i trying to run this as a report it is just processing and the report is not loading. What could be the reason behing this?
    Thanks in Advance
    Regards

    Hi,
    With no other information about the problem is hard to know what's happening. If you could at least provide us with the query then I think it would be easier for us to help you.
    Regards,
    Sergio

  • HELP FOR RUN PHOTOSHOP IN COMMAND PROMPT AND OPEN FILE

    HELLO
    i have problem for run photoshop in cmd(command prompt) and
    open a file immediate
    for example:
    D:\Program Files\Adobe\Photoshop CS>Photoshop.exe -open -f:\1.jpg
    but these not answer
    I need parameter open in photoshop
    please help me
    thanks

    I would right click on 1.jpg. Select Open with... Select Choose default program... Pick Photoshop and make sure you check "always use the selected program to open this kind of file."
    D:\1.jpg
    Would then open photoshop.

  • How to run form from command prompt

    Hi,
    How to run a form from command prompt
    can anybody suggest me the way
    prasanth a.s.

    Well, if you are running windows, client server forms 6i, and your form is called 'myform', you could put this into a batch file :-
    start ifrun60 module=myform

  • Running eclipse java project on command prompt

    Hi all,
    I have one simple java project and that is very well running in eclipse. I have added some external JARs to that project. It performs this job- it creates connection to server, and listens to the signals from server.
    My question is - how do I run that java project on command prompt?*
    I want to run that using ANT or simply I want to make a JAR file so I can execute JAR on command prompt. I created JAR, but it doesn't contain external jar which I added to the project. So I was not able to run that project.
    Can you please tell me any of the method - using ANT or by making JAR?
    Also can you be little bit more explanatory in reply?
    Thanks

    I want to make a JAR file so I can execute JAR on command prompt.This is very likely a good way to proceed. It is explained in great detail in Sun's Tutorial in the section on [Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html].
    I created JAR, but it doesn't contain external jar which I added to the project. So I was not able to run that project.Yes - the jar file you create has to know about the classes and other resources in that external jar. Otherwise, at runtime, the program will not be able to get at the stuff it needs. Usually you don't include that other jar (or its contents) in the jar file you are creating. Instead you provide your jar file with a manifest that describes the other jar's location. Details are also in the tutorial.
    One thing to note is that Sun's tutorial provides a lot of explanatory, conceptual, material. To that end it keeps the context simple and transparent by describing the steps as they would be carried out by someone working at the command line. The Eclipse documentation and forums might provide a more click-this-drag-that "explanation". If you do follow the method in the Tutorial and get stuck, post a description of the actual commands you used and their outcome.

  • Running a java application in command prompt

    hi, I'm new to this forum.
    I would like to know what exactly needs to be specified to run a java application in a normal DOS command prompt.
    I know it is something like:
    javaw -classpath .\class GUI.applicationGUI
    where applicationGUI is the main class, right? What else do I need to do, since I have some other non-GUI classes that I need, inside the class folder ?
    Thanks for your time.

    You need to import those classes. And you need to make packages.
    In classes 1, 2 and 3 put:
    package class;
    In class 4 put;
    package class.GUI;
    Then you need to make the connection:
    In classes 1,2 and 3 put:
    import class.GUI.*;
    In class 4 put:
    import class.*;
    Compile each directory separately while in the respective directory. javac *.java
    Then go back to the directory above the directory "class" and run
    java class/GUI/name_of_file_containing_main_method

Maybe you are looking for

  • March 2015 TechNet Guru Awards! See who's boss in BizTalk! It could be YOU!

    The results for March's TechNet Guru competition were posted! http://blogs.technet.com/b/wikininjas/archive/2015/04/17/the-microsoft-technet-guru-awards-march-2015.aspx Below is a summary of the medal winners for December. The last column being a few

  • Serial Numbers and Delivery not automated.

    "The serial number field on the delivery is only a text field and requires user input. The actual serial numbers shipped on the delivery are not put in this field automatically by the system as you know. This is how it works. The serial number data i

  • Deploy BC4J JSP on  TOMCAT

    Hi all, Our application(JSP/BC4J) works on JDEV9i_902/OC4J. But it dosen't work on Tomcat 3.3.a (and other version) We have the following exception: Message d'erreur: oracle.jdeveloper.html.ReadOnlyField oracle.jbo.JboException: oracle.jdeveloper.htm

  • How can i download flash player on the kindle fire

    How can I download flash player on the kindle fire

  • General task doubt

    Hi, i have created a dailog task and made a general task in my workflow. i have done agent assignment through rule for this task. My Question is,   is there any problem making task as genral task? Thanks & Regards, Sankar.