How to make jar files run using java.exe and not javaw.exe

Hi ,
I am developing a project in which there is an GUI which inturn will call a console . I have made it into an jar file now.
Here comes the problem. When i run the jar files , i don't get a console. While going through this forum, i came to know that jar runs using javaw.exe and this stops it from bring the console up.
Please suggest me a way of running the jar file through java.exe or any other method by which i can get an new console poping up.
PS : i cannot start the application itself in a system console , because the Console mode is an added feature and it is not to be displayed every time but only when the user intends to.

Thanks for the reply pbrockway2. But i think, i was not able to convey my problem properly.
I am supposed to start my application in a GUI mode ( No console are should be present at this point of time). Within the GUI , i have a option for working in the console ( i.e if console is choosen, then i start giving my output and take inputs from the console. I am trying to do this by just calling the "System.out "and "System.in" methods. )
Here is the problem. As i have started it through " jar " it would not have a associated console with it.
PS: i cannot have launching .bat file because that would result in my application having a console displayed at the very start of the application. I want the console to be displayed only when the user wants to start in console mode.
Please suggest me some ways of doing this. Can i create a console from my java program and then exit it.

Similar Messages

  • How to make Jar files in JBuilder

    I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
    Any body with an answer, please help
    Abhi

    It sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
    http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • How to make jar file for this compilation method ?

    can any one tell me how to make jar file for this compilation
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
    *this is a compile code:-*
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    *and this is a run code:-*
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?

    Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • Determining the name of the jar file running from JAVA

    Hi everyone,
    This is probably a silly question, but how do you determine the name of the jar file running from within the jar file.
    E.g. If I'm running the jar file "Test.jar", then how can I get the String value "Test.jar" from within my program?
    Any help would be appreciated! Thanks:)

    I think that you can use the solution above to get the jar file resources associated with a particular jar file, and then use the JarFile class to get a manifest of whats in there, and then find your class?
    This is only off of the top of my head, and I haven't tested it. Let me know if it works

  • How to make audio file to use as ringtone on iPhone 5

    Does anyone know how to make a file and then make it a ringtone?

    Make sure iTunes prefs > Import settings is set to AAC.
    In iTunes, find the song you want and note the start/stop time you want the ring tone.
    Right click - get info, click the Options tab and set the start/stop times as above. (Note a 30 second max for ringtones)
    Right click - Create AAC version. This creates a new file.
    Drag this new file from the iTunes window to the desktop.
    Delete the new file from iTunes and also select Delete from hard drive.
    On the desktop, rename the file to what_ever_you_want.m4r (first part you can change to whatever you want & change the extension to .m4r).
    Drag the file back to the iTunes library at top left.
    Make sure iTunes prefs > General has Tones ticked.

  • How to make jar file?

    hi
    i want to make my jar file of my own package name "practise".
    can u help me in making jar file.
    what is the command to make jar file?
    expected name of jar--> runner
    package for which i want to make jar----> practise
    plz help me in this regard.
    i m very greatfull to your precious comments and suggestions.

    hi
    if u r creating first time means...
    jar cf filename.jar *.*
    u want to update jar
    jar uf filename.jar *.*
    extract
    jar xfv filename.jar
    (filename is ur package name)
    do this...
    .

  • How to make bank management system using java file system

    Hi, I have some fields
    1.ID
    2. Deposite
    3. Withdraw
    4. Balance
    Now how can i manage this Bank Management System using java file system.
    Thanks in advance.

    Then we're back to (1): Do your own homework. Google has zillions of links on handling files in Java. When you have written some code and have an actual problem, we'll be happy to help you with it.
    (edit) Incidentally, this sounds suspiciously like the sort of problem they set for the certification programs. In which case, don't bother; they're not worth the virtual paper they're printed on.

  • How to make jar file of application using JMF

    Hi
    i developed an application which uses JMF it works well during compilation and displays audio and video too.
    but after builting jar file it doesn't works.
    abdul

    Well you've found the root of your problem. It's not necessary the JMF. It's when you make a jar file, you need to include the dependencies. I don't think it' legal to include the JMF in a program you sell or distribute, so be careful there.
    However, to include dependencies in jar files is not a hard task. The simplest method is to unjar the dependency and place it at the top or your classpath; then make a jar that includes both your program, and the dependency.
    A more long term solution is to use a build system such as ant or maven to create the package using available scripts or plugins. The "Uberjar" plugin for maven comes to mind.
    -vito

  • How To make jar file through Command Promt and run it through Command Promp

    Now i am using Netbeans to create jar file but i want to create jar file for my project through command line and also want to run through command line

    Note: This thread was originally posted in the [JDK's Monitoring & Troubleshooting Tools|http://forums.sun.com/forum.jspa?forumID=538] forum, but moved to this forum for closer topic alignment.

  • How to make .jar file for a multiple class program

    I have a code for a chat room that contains two folders , one for Server and one for Client
    What I need is to create a jar file for the server and a jar file for the clients
    but here the first problem , I have a file that named (SocketMessengerConstants.class) that is located outside the two folders and is being read by the two projects .
    I mean the server uses it while running and the client uses it too .
    the second problem is : I don't know how to create a jar file at all !
    please tell me how to do it in detail
    Thank you

    ChuckBing wrote:[Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
    I tried to read this tutorials before I come here but I couldn't understand it
    can you please tell me a specific steps to follow instead of the explaining .. because I understand the explanation but I can't apply it

  • How to upload the file without using java components?

    Hello,
    I need to upload the file using JSP, but I don't want to use java componets(such as
    jspsmart).
    Who can tell me how to realize it? This issue is very important to me,
    thanks all in advance!

    make you're own servlet using the multipartrequest from o'reilly.
    easy and simple, no jspsmart, only 1 jar file and some descent programming.
    I use it like that...

  • How to deploy jar file for use within mapping user-defined fcn

    Hi all,
    I have a java class I'd like to called from a mapping user-defined function.
    Here's what I've done (but hasn't worked)
    1. Added 'package com.<mycompany>.xi.util.base64 to the source class file and compiled it.
    2. Created a sda with a plain provider.xml file, i.e. no references were made to any other library files.
    3.  Deployed the sda to the xi 3.0 j2ee server successfully using SDM.
    4.  Under the Visual Admin tool, I see that the library was deployed successfully.
    5.  In the import text box in the user-defined function (design time), I enter com.<mycompany>.xi.util.base64.*.
    A syntax check returns an error indicating the package could not be found. 
    Can anyone give me pointers as to how I can get this working?
    Thanks,
    --jtb

    Hey James,
    No! That's not the right way!
    What you have done is for accessing external JMS & JDBC drivers in their corresponding adapters. For the access inside a mapping user defined function, it's enough if you import the jar files.
    Look at this blog and you will be very clear!
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    regards,
    Felix

  • How to make jar files at runtime in a server application

    I am using Jung API and i need to load the class files in this JAR file for my application at runtime.
    I am using an applet which uses this API which is loaded with the help of a Servlet.
    The code is getting compiled but the JAR files and associated classes are not available at the runtime
    How to make themk avalable.
    I have tried various options like placing jar files in
    WEB-INF/lib
    $Catlina_Home/commons/lib
    But it is not working can anyone help me it is of high urgency to me
    How to make that classes in the JAR file available to my applet at runtime

    SuperJavaHello wrote:
    How to make that classes in the JAR file available to my applet at runtimeAhh! The runtime is an appler! The applet is on the Client, and the Client does not have access to the Server's classpath. You need to un-pack the JAR, then re-pack the classes into the JAR used to pack your Applet, the one that you are using as the code source in the applet tag.

  • How to reference JAR files in stored java class ?

    I don't know if it's exactly the right place to post this, I hope it could be :-)
    Here is the problem :
    I developped a Java class with some public static functions.
    To store this class in Oracle, I use the SQL below :
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "SYSTEM"."MYCLASS" AS
    // ... (Java source code) ...
    This works pretty well with simple functions, but we need to import specific class. Here is for MQSeries : import com.ibm.mq.*;
    When using the SQL to put the Java class, we get an error message saying that the class wasn't correctly compiled. It seems it's about the import.
    The question is : how to proceed to reference the JAR files needed so that my class can correctly import the needed packages ?
    Thanks in advance,

    Here is a simple example of code :
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "SYSTEM"."TEST" AS
    import com.ibm.mq.*;
    public class Test {
    public Test() {
    try{
    MQQueueManager manager = new MQQueueManager("");
    catch(Exception e){
    In this way, I get message "Warning : Java create with compilation errors".
    When I comment the line of the MQQueueManager object creation, it is well created.
    Any ideas ?

Maybe you are looking for

  • Blue & White will not Boot into OS 9

    My son has a 400Mhz Rev. 2 Blue & White. Recently the Power Supply died, which I replaced, but when it died it also took one of the hard drives with it, before that it was working flawlessly. He had two ATA drives, both Maxtor, one the original 6 gig

  • High-pitched hiss at the beginning of p

    Hi, I recently bought a Zen Micro. Everytime I press the play/pause button (or if a skip forward/backward) to start playing a song, I hear a whine hiss for about seven seconds on the top of the beginning of the song. I noticed also, when I am using o

  • Problem with an exported Mov file

    I used Quicktime pro to "export for web" a video file. The problem I'm having is that when I open the file It only plays a small portion of the video, about 5mins of a 30min video. The video length shows 30min and after the video stops the counter an

  • Noisy Video Exports

    Hey When I export dnxhd or cineform, anything it is always noisier than what is displayed in premiere. Im on a pc have you experienced anything similar here are some pictures it is hard to see in compressed pictures but it looks like noise and bandin

  • Text retrieval in user exit

    Hi, Is there any way to retrieve the header text and operation text (if exists) in the user exit 'USER_EXIT_SAVE'  before the work order ( in plant maintenance ) gets saved to the database. i.e. we don't have the actual work order number and SAP repr