Problem on Creating Unix Termial in java like windows command prompt

hi all,
i created an unix terminal using java swing(to connect unix server and executing commands). here i redirect the console output to textarea. The problem is i can't read the input from the textarea. and another problem is how to disable the editable option in the textarea before to the command read line. The terminal is like a putty. Any One Please give a suggestion for this problem.

sabre150 wrote:
georgemc wrote:
LinaGsp wrote:
5)then I run this command "jar cvfm MyJar.jar manifest.mf .class"If this is exactly what you did, and not a typo, that's probably your problem. Do you have a file called .class?It is more likely that the forum markup is getting in the way.Of course it is! D'oh! I seem to have a blind spot to that, I never take it into consideration...
OP, listen to these guys, ignore this blind old fool :-(

Similar Messages

  • Using Java in windows command prompt

    Hi,
    I don't know if I have been searching correctly, but I haven't found a solution to my problem through common search engines.
    I'm programming in java using vim (accessed through windows command prompt), and I've created classes, everything compiles fine.
    However, I wanted to test my classes my creating instances of them (i.e. objects) through the same windows command line (command prompt). I know you can achieve this by using interaction panes through third party programs such as Dr.Java and eclipse, but I was wondering if this can be done using the command line.
    Thanks
    Jaime

    Thanks Paulcw for your quick reply! :D
    I'm guessing I didn't word my question properly.
    Neither of my classes have a main method in them, so when I am trying to create instances (objects) of them, I would like to as if my command line was the main.
    For example:
    Class1 c = new Class1(parameters);
    c.moveRight();
    etc.
    I'd like to be able to use my classes methods from the command line, I think what I'm looking for is a batch, but I'm not sure.
    Thanks again,
    Jaime

  • Java Code Compilation in Windows Command Prompt

    Hi Everyone,
    I have been programming in java for quite some time now using an IDE (eclipse). I downloaded the following java file from:
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.html#requirements
    and have downloaded the required JMF. The problem is that I want to compile and run this code in Windows Command Prompt; however, I keep receiving errors upon compilation because I do not know how to make jmf.jar be recognized as a library.
    Thx.

    javac -cp jmf.jar;otherJars file1.java file2.java file3.java...
    Run java and javac from the command line for an explanation of their options.
    Edited by: nclow on Jul 24, 2008 1:43 PM

  • 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.

  • How java runs in command prompt and why java runs on it

    how java runs in command prompt and why java runs on it

    command prompt was used before the development of IDEs like RAD,eclipse etc.
    its still used for better understanding of the compilation and errors.
    type the java file and save the file(source file) in the bin folder of ur jdk environment with extension .java. the source file must be the one that has the main method declared.
    in the cmd prompt screen , set the path of bin folder.
    eg:C:/program files/jdk(some version)/bin/...
    for compilation,type:
    javac (source file_name).java and press enter
    for running the file:
    java source file_name

  • Manipulating Windows command prompt through Java

    I am wondering if there is any way to manipulate simple Windows command prompt commands like color, cd, dir, cls through a java application. Any help or informative redirection would be much appreciated.

    BinaryBurnout wrote:
    I am wondering if there is any way to manipulate simple Windows command prompt commands like color, cd, dir, cls through a java application. Any help or informative redirection would be much appreciated.Realize that the Windows command prompt is an application (cmd.exe), and those commands are specific to that application.

  • My iPhone 5 only display the apple screen with text on the top (like a command prompt). Has anyone else seen this???

    I was checking my mail and suddenly i get the apple screen with text on the top (like a command prompt). It won't receive phone calls and it doesn't respond to anything. I tried to force shutdown, reset, etc and nothing happened... Now the screen changed to vertical gray lines. I'm attaching a picture of both screen displays. Someone please help!!!!!

    Try a reboot by holding both the power and ome buttons until the apple logo appears.  If that does not bring it back, take it to an Apple store genius bar and have the technicians test it.

  • Problem in executin unix comman from java

    import java.io.File; // is java code
    public class RunSystemCommand {
    public static void main(String args[]) {
    String s = null;
    // system command to run
    String cmd = "ls ";
    // set the working directory for the OS command processor
    File workDir = new File("c:/cygwin/cygwin");
    Process p = Runtime.getRuntime().exec(cmd, null, workDir);
    p.waitFor();
    I[b] am tryiing to excute above code to run unix command on cygwin but gave folllowing error...... but works well to open a note pad..
    Exception in thread "main" java.io.IOException: CreateProcess: C:/cygwin/bin err
    or=5
    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 java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at d.main(d.java:19)

    Crossposted:
    http://forum.java.sun.com/thread.jspa?threadID=655902

  • Interfacing Java with the command prompt

    Hi everyone,
    I'm very new to java and wanted to see if anyone had any advice before i started getting too far into this project. I want to write a java program which allows the user to draw lines on the screen, and move them around, and then the program will compute the equations of these lines and feed them into another program to study the algebra behind the geometry.
    I've written an applet which is a start towards what I want: http://math.berkeley.edu/~aboocher/Mouse2.html but I'm encountering problems since it seems very difficult to have an applet write to a file, so I started trying to just create a self-contained java program. Before I move further I was hoping someone could point me in the right direction.
    Ultimately I would like a window where the user can draw some geometric objects and the computer will write the equations to a file and then when I click "compute" say, it will run my other program (which can be done from the command line) and display "true or false"
    In case it matters, I'm on a Mac and the exterior program is called Macaulay 2.
    Thanks for your help!

    That seems highly reasonable.
    If your going to be writing to a file, it would probably be a better approach to create an application.
    As for the arithmetic part of it, you'll want to save the points that the lines dropped, to use for future calculations. Using arrays would probably be a good idea.
    You'll also want to reduce the flickering problem with your applet on the website you linked to. Maybe double buffer? Along with using arrays to recall previous lines

  • When I open firefox (note: I got firefox version 28.0 and Karspersky security 2014) I get a black screen, looking like a command prompt window, in firefox.

    Hi,
    When I open firefox (note: I got firefox version 28.0 and Karspersky security 2014) I get a black screen covering the whole firefox window and it looks more lika a big command prompt window, in firefox. What is it?
    Regards
    Jean

    Huh, that's a new one...
    Can you try Firefox in [[Safe Mode | Safe Mode]] to see if the problem goes away. I'm thinking it's an extension.
    *Run ''firefox.exe -safe-mode'' in the search bar on the Start Menu. (Make sure Firefox is closed)
    Have you added any new extensions recently around the time this started happening? Your system details shows the following:
    *Adobe Acrobat - Create PDF 1.2 ([email protected])
    *Anti-Banner 14.0.0.4917 ([email protected])
    *Dangerous Websites Blocker 14.0.0.4917 ([email protected])
    *Kaspersky URL Advisor 14.0.0.4917 ([email protected])
    *Troubleshooter 1.1a ([email protected]) '''This is default so this isn't the problem.'''
    * Virtual Keyboard 14.0.0.4917 ([email protected])

  • Running a plain java class in command prompt which uses third party jars

    i have to run a simple java class. its actually a process which is running in the background. Now to run this java file i have created a batch file. my problem is that this java file uses around 100 jar files. when i try to run this java file (actually .class file) it gives me no class defination found error for this java(class) file. What can be the problem. My java home is set....how to solve this problem

    i have to run a simple java class
    my problem is that this java file uses around 100 jar filesThese two statements are contradictory.
    it gives me no class defination found error for this java(class) file. What can be the problemThe class is not on the classpath.
    how to solve this problemEnsure all classes are on the classpath.
    I bet if your searched this forum (or even read the java tutorial) you'd find something .

  • 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

  • Java with Windows Commands

    Ok, this is a pretty tricky one. Is there a way where I can tell java to execute windows commands? I mean, I would want to develop an app that when the user quits the java app, the machine would log out the current user using code. If somebody could give me any ideas how this can be possible, I would really appreciate it. The java app is going to be run from a JScript file that is going to be loaded as the user logs on to the machine. If anyone know of any way to do this with JScript as well, I would really aprreciate it. Thanks.
    Jose Bravo

    Maybe this is it, I'm not to windows savy but if you know the command to execute it should work. If it is a series of commands I recomend you create a batch file:
    (for java):
    import java.io.*;
    try {
    Process p = Process.getRuntime().exec("dir");
    // if you want to get the shell output //
    BufferedReader = new BufferedReader(p.getInputStream());
    } catch(Exception e) { }
    maybe this will work,
         --Ian                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to run a java program in command prompt

    hi i want to run a java program from in command prompt from another directory
    i want to run a file named First in C:\Program Files\Java\jdk1.6.0_07\bin
    so when i give the command
    java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    it doesnt works it shows
    C:\>java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\Program Files\Java
    \jdk1/6/0_07\bin\First
    Caused by: java.lang.ClassNotFoundException: C:\Program Files\Java\jdk1.6.0_07\b
    in\First
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: C:\Program Files\Java\jdk1.6.0_07\bin\First. Pro
    gram will exit.

    but it prints
    C:\>java -cp "C:\Program Files\Java\jdk1.6.0_07\bin\" First
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    C:\>

  • How to get no. of rows of Windows Command Prompt in java

    hi all,
    can anybody tell me that is there any java utility avalilable throght I can find the how many rows avalilbe on currently executing command prompt, and also how can i clear the content of command prompt (result of 'cls' command).
    Currently execting command prompt means from where I have run my java program.
    any reference is also welcome.
    thanks in advance.

    Clearing the screen is trivial, as long as you're OK with making your program specific to Windows only (i.e. you never hope to run it on any other OS ever):
    Runtime.getRuntime().exec("cmd /c cls");As to figuring out how many lines your command window's screen buffer has - good luck with that. I'm not familiar enough with the Win32 API to get this info, but you'll have to figure out what that is, and call it via JNI.

Maybe you are looking for

  • IIOP Connection Problem to 8i on Linux

    Hi, I have installed Oracle 8.1.5 on Linux (Red Hat 6.1 -Kernel 2.2.12) Listener is configured for IIOP connection. When I issue the command sess_sh -u scott/tiger -s sess_iiop://192.168.6.121:2481:eswap from the linux box it connects to the orb shel

  • Command line to create a group

    Hi, I would like to create a group using command line. But the weblogic document states that only mbeans under weblogic.management.configuration and weblogic.management.runtime can be used in weblogic.Admin command line. Is there a way to use comand

  • Error using JsplitPane in JInternalFrame...help...

    Hi, If I am adding JSplitPane to JInternalFrame, I am getting the following run time error: Any suggestions.. appreciated. Thanks.... java.lang.NullPointerException: peer at sun.awt.windows.WCanvasPeer.create(Native Method) at sun.awt.windows.WCompon

  • Different pricing procedure

    Hi gurus,               I have entered two items in document type MV with two item categories MVN and TAO. while doing billing this rental contract, For the first item(MVN), system picks the same pricing procedure as of contract(PSER01) and whereas f

  • IDOC and BD87

    Hello everybody Is it possible to delete whole IDOC segment in DB87? I can't find such possibility... Ore maybe someone know different transaction, which allow to delete segment and read IDOC again, but not create new IDOC number (similar to WE19, bu