How to execute java without a DOS console?
I'm running java in the Windows platform.
Every time when I run java program, there must be a
DOS window.
Is there any way that I can run java program without a DOS console window.
Check out "executable jar files" - http://java.sun.com/docs/books/tutorial/jar/basics/run.html
Similar Messages
-
How to execute java programs in xcode
I cannot execute Java program in XCode for Mountain Lion 10.8.2. Please help me how to execute a Java program.
Do you have a particular error or message or diagnostic or issue, or something that's particularly wrong with Xcode? If installed, Java does work, and Java applications can be invoked.
Background: Java was deprecated from OS X a while back, and Java itself was removed from the default OS X 10.8 installation.
Given that Java is now an add-on for OS X, you'll want to check with Oracle — the owner of Java — for OS X kits and tools.
I don't know off-hand if Xcode still particularly supports Java (it was pretty weak, when last I checked), but I'd expect you'll be using makefiles for the work, and I'd also suspect that whatever Java support remains in Xcode will probably be going away in some future version of Xcode. (If support hasn't already disappeared. You may be using bash build scripts and makefiles to deal with Java now, or going forward.)
If you don't have access to the Apple developer forums and the discussions of tools available there, then the archives of the Apple Java-Dev mailing list can be a good spot to look for existing discussions, and to post questions related to Java development on OS X.
As for IDEs other than Xcode, Eclipse or NetBeans or IntelliJ IDEA, and BlueJ all run on OS X, and any of these would probably be a better long-term choices for Java development on OS X. -
How to execute Java.exe on MAC, LINUX, UNIX...
okay, I know this is very stupid, but can anybody tell me how to run Java.exe on MAC, LINUX, UNIX?
I know how to run it from windows, I have a batch file created in windows, will it work on MAC, LINUX and UNIX as well? (I'm not sure if on other OS, there is such a file type call *.bat)See what I mean about probably wanting a beginner's book on Unix and/or shell scripting?
okay crackers, the only thing that I have to do is put
in the name of my program into "your program here".Not necessarily. There's the ClassPath, program parameters, etc. What you need to put in the "your program here" depends upon your program. What I did was allow the script to be invoked with command-line parameters and you could (depending upon your program) put "-jar myjar.jar" in the indicated spot, if your JAR file was runnable.
The rest no need to change. right?I don't know. What does your program need? Only you can answer that, not me. I just furnished an example. -
How to execute link without showing it on browser
Hi,
In my site iam implementing sms functionality through 3rd party tool.
In that, they gave me an url which will send the sms through their website.
For that, i have to execute the url.
Is it possible to execute the url without showing on the browser.
please suggest how to do that.
Thanks in advance.
Mohan
Edited by: mohanPaladi on Mar 18, 2008 11:03 AMFrom your description, it appears you want to do an AJAX call where a request is sent to a url without updating the browser window. There are many libraries that make it simple to do this type of thing. http://ajaxian.com/ is a good place to start to look at AJAX if you are unfamiliar with it. Some popular libraries include dojo and jmaki.
-
How to execute Java program in Solaris 8 (Intel Platform).
Hello All,
I have installed Solaris 8 on my Intel based PC. JDk 1.1 and JDK 1.2 is installed by default. When I compile any Java applet or Application, it successfull complies but when I try run that applet or application (java Appletname or applicationname), It gives the error message .... File not found...Check whether file exist in the directory or not.
Can someone tell me the reason of this error and how to correct it. Where to set the CLASSPATh etc. under Solaris 8 for successful compilation and run of programs. I do not have any problem under Windows/2000.
Thanks in advance,
Amoid[amoyeed],
Hello All,
I have installed Solaris 8 on my Intel based PC. JDk
1.1 and JDK 1.2 is installed by default. When I
compile any Java applet or Application, it successfull
compliesI will assume that you executed this command:
#javac <java source code filename>.java
In order to find out which version of the javac you are using to compile the program, execute the following:
#/usr/bin/which javac
The output will tell the exact path to the javac binary file.
but when I try run that applet or application
(java Appletname or applicationname), It gives the
error message .... File not found...Check whether file
exist in the directory or not.You probably have not set the current directory to your environment variable PATH for the Unix shell that you are using.
You can do the following:
#java ./<standalone application or applet name>
Can someone tell me the reason of this error and how
to correct it. Where to set the CLASSPATh etc. under
Solaris 8 for successful compilation and run of
programs.In the shell environment settings file. Which Unix shell are you using? Bourne, Korn or C?
I do not have any problem under Windows/2000.
Thanks in advance,
AmoidHTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
How to execute Java programs using Cygwin?
Ok, so I've installed Cygwin and Netbeans programs. I wrote my program on Netbeans, then tried to use the command javac with Cygwin to compile the main .java file. What next? How do I run the actual program in the Cygwin window?
Thanks!jverd wrote:
sharkura wrote:
I thought there was a "native cygwin" version of java available that would, e.g., accept paths like /mnt/c, handle the colon classpath separator, etc. I could be mistaken though. I know there are versions like that for other tools, like perforce and subversion.I'm not sure about a native cygwin port of java, but I use the reference compiler every day, and it handles / just fine (because the bash shell correctly translates it). Are you talking about the file separator? Because that would work fine anyway. Or are you talking about /mnt/c instead of C:? If the latter, I don't recall about Java specifically, but I know I have had problems in both directions in cygwin. For instance, tar can't handle C:, but some existing Windows tools can't handle /mnt/c.
Ahh, I misunderstood what you were saying. I was talking about a path separator (\ in windows, / in cygwin). The default mount points for drives is, for the version we are using, /cygdrive/c, and that is handled just fine.
However, it does not handle a colon as a classpath separator if you specify the classpath in the java command. This typically means that the classpath, it written out of the command line, must be "" wrapped (if more than one classpath element exists ... this prevents the bash shell from attempting to split the command at the ;) and must use ; as the path element separator.
I suppose you could specify the classpath like so, path/element/dir1\;path/element/dir2\;path/element/jar1.jar, without "".Doesn't really matter to me as I use ant to start all my non-trivial programs.As do I. I still write test drivers, and sometimes use nonstandard (wrt our project) classpaths.
{? -
How to execute java batch file in JSP
Kindly give a solution. I want execute a batch file which gives a preview window ,. I want call that batch file in my jsp, .I am using Tomcat 5.5, I have tried that using a Process object and Runtime.getRuntime().exec(path) , where path is location of my batch file. As a java class i could execute the batch file, but when i import the method in JSP nothing is happening (even no jsp error).
Is it possible to execute the batch file in JSP?
Can any one help me?itsdhanasaraa wrote:
But as this a web application ... By using Runtime i'm getting some probs ..
Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
Ain't gonna happen.
its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
1) it's not "taking more time to execute", whatever that's supposed to mean.
2) there's no other way to execute something. Not that you should every use even that way anyway
3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place. -
How to execute PL/SQL from DOS PROMPT?
Hello:
I've seen that executing an SQl script via DOS prompt involves @script name, however all this seems to do is open the line editor. A GET command displays my script and sets the cursor on the next available line with the last line of the script with an asterics beside it. as does using the @scriptname command. I cannot do any commands like SAVE, RUN, etc.
Any help is appreciated.Do you have a final / in your script to execute it (which is presumably an anon pl/sql block).
-
How to execute procedure without having extra connection
I am asking this question again, i want to execute the oracle database procedure from within the JDeveloper without getting any extra connection like JDBC connection. I tried this using dbaccess.executeretrieval()and executecommand() method, but not finding any solution. My procedure has two input parameters and four output parameters.
can anybody help on this??
vikas
nullthis can be done using the CallableStatement class.
typecast the reference of the application module that you have to applicationmoduleimpl. ApplicationModuleImpl class has a method PrepareCallableStatement that returns an object of type CallableStatement. the prepare method takes 2 parameters. one is the statement to execute and one is the number of expected return rows. inorder to call an SP, the statement should be call <name od sp in caps>.
to execute the statement, the callable statement class provides the execute() method. it has methods for specifying the IN OUT parameters also (go through jdeveloper help for details). -
How to execute java program remotely
Hi,
Could anybody tell me which technology is best suited for the following problem.
Here is the scenario :
I have a billing system (in form of a jar), IT people execute it on ad-hoc basis through a shell script from that same machine. Everything was fine until they came up with a new requirement which is that they want to execute it from a web-application, so that anybody who is authorize can execute ad-hoc billing from his own computer within a network or maybe from the outside.
Now there are two major technologies that came into my mind JMX and RMI. I just want somebody to tell me which is best suited for this kind of scenario. In addition to the above requirement I might need to ensure that there is only one instance of the billing system running at a given time. First cause it takes hours to complete billing secondly, I did not keep thread safety in my mind while designing the system.
NOTE : putting jar in a WAR and exposing through servlet or jsp is not an option. In other words only j2se is the option not app/web server.
Please suggest if you can come up with any other solution except (JMX or RMI).
Thanks in advance.
-AzharHi,
Could anybody tell me which technology is best suited for the following problem.
Here is the scenario :
I have a billing system (in form of a jar), IT people execute it on ad-hoc basis through a shell script from that same machine. Everything was fine until they came up with a new requirement which is that they want to execute it from a web-application, so that anybody who is authorize can execute ad-hoc billing from his own computer within a network or maybe from the outside.
Now there are two major technologies that came into my mind JMX and RMI. I just want somebody to tell me which is best suited for this kind of scenario. In addition to the above requirement I might need to ensure that there is only one instance of the billing system running at a given time. First cause it takes hours to complete billing secondly, I did not keep thread safety in my mind while designing the system.
NOTE : putting jar in a WAR and exposing through servlet or jsp is not an option. In other words only j2se is the option not app/web server.
Please suggest if you can come up with any other solution except (JMX or RMI).
Thanks in advance.
-Azhar -
How to run Java class application on mac
Hi to all !
I usually develop java applications on PC which are started by typing java >classname< into DOS-console.
Now one application has to be run on MAC OS 9.2 which shurely hasn�t that console. So how can I start it there ?
Thanx in advance
AlexThey have mrj you need to install it, and to launch an application or an applet, you have no console.
-
How can i execute excelsheet without giving path in java
Hi,
How can i execute excelsheet without giving path in java, through this code, you can open the notepad but
I want whereever the excel is installed in your machine , fine and open excelsheet without given absolute path.
class ExecuteCommand{
public static void main(String d[]){
Runtime r = Runtime.getRuntime();
Process p= null;
try{
p = r.exec("notepad");
catch(Exception e){
System.out.println("error");
If you know please send me your idea and code samples.
regards
Mohan kumarjust execute the exelfile with the Windows "start" command:
Runtime.exec("cmd /c start "+excelFileName);But this requires that Excel is the default application for the Excel file type (*.xls). You can test this by simply typing "start myTestExcel.xls" in a dos box. -
Hi All ,
How to execute a .exe file in Jsp without using a process ??? ...
Is it Possiable ????itsdhanasaraa wrote:
But as this a web application ... By using Runtime i'm getting some probs ..
Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
Ain't gonna happen.
its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
1) it's not "taking more time to execute", whatever that's supposed to mean.
2) there's no other way to execute something. Not that you should every use even that way anyway
3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place. -
How to execute Dos Command 'Pause' from Java ?
How to execute Dos Command 'Pause' from Java ?
I have read the article in javaworld for Runtime.exec() anomalies.
Can someone please give an insight on this?Thanks Buddy!
That was very useful. Even though its a simple
solution, I never thought about that.Bullshit! Reread reply #7 of http://forum.java.sun.com/thread.jspa?threadID=780193 -
How to execute a DOS PROGRAM as batch file in java
How to execute a DOS PROGRAM as batch file in java
pls help mewww.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Maybe you are looking for
-
hi! All i am making the following query to the MySQL database from a jsp page but I get error. please help. i am asking user to type in first few letters of person's first name and i use that string to find the match. String getName = request.getPara
-
Differnce between SAP-XI and SAP PI
hi can any body tell me what is the differnce between SAP-XI and SAP-PI
-
Setting a transient attr on the EO changes the state to modified.
Hi, Is this behaviour correct? How do i avoid this except to keep track of the state before and after setAttributeInternal() for this attribute?
-
I recently found several of my folders were emtpy. Out of desperation I looked in the Trash, and found that all my files are somewhat systematically being moved to the trash. All the files are MS (I use Office for Mac), including Adobe. Has anyone
-
TAbbed panel redirect to default tab
I have a tabbed panel . ON the first tab I have a drop down menu. What i need is once i click on the second tab if no selection was made on first tab display an error message and remains on the tab1. What i have is I am able to display a message and