eldeo 0 Report post Posted November 7, 2004 You can also run java program as a windows service. Use javaservice free tool Share this post Link to post Share on other sites
cse-icons 0 Report post Posted November 8, 2004 hi eldeo,can you give more specific info regarding the javaservice free tool.have u tried it?Is there a similar solution for *nix? Share this post Link to post Share on other sites
jacksonicson 0 Report post Posted November 12, 2004 If you want to run your Programm under Windows, you should try JSmothGen! Its open source and it generates an exe file whitch then locates the JVM in the system and starts teh specific class file which inherits the main method! Share this post Link to post Share on other sites
cse-icons 0 Report post Posted November 13, 2004 If you want to run your Programm under Windows, you should try JSmothGen! Its open source and it generates an exe file whitch then locates the JVM in the system and starts teh specific class file which inherits the main method! <{POST_SNAPBACK}> Â Is it spelt "JSmothGen"? I tried to search on google with the same keyword but did not find any matches... If possible pls give me the website address where I can download the tool. Share this post Link to post Share on other sites
arunkumarhg 0 Report post Posted November 29, 2004 Is it spelt "JSmothGen"? I tried to search on google with the same keyword but did not find any matches... If possible pls give me the website address where I can download the tool. <{POST_SNAPBACK}> Hi buddy it not "JSMOOTHGEN" but it is "JSMOOTH" .exe converter of java application for MS windows its an open source project you can get it at "jsmooth.sourceforge.net" and if you want more information or more tools just give these key words in google you will get lots of links ,  KEY WORDS 1) java application installer 2) Java to exe  what else do you wanna know  Cheers Arunkumar.H.G Share this post Link to post Share on other sites
khmerneed 0 Report post Posted December 7, 2004 Dear Friend!I am new to java. and i have tried the below problem. as a usual time i use ms-dos to command java, javac it look like thisc:>\java\bin\javac test.java (this i do a compile for my java file)c:>\java\bin\java test (this i do a run for my class file)I wonder if anyway just double click on test.java then it compile for me without going to ms-dos and run javac?I also wonder if anyway just double cick on test.class then it will run to let me see the work?I hope everyone may response to these two problems.Thanks & Best Regards,Dorei Share this post Link to post Share on other sites
cse-icons 0 Report post Posted December 9, 2004 Yeah, I think that is possible...Just right click on .java file and select open with...from the list select javac.exe (if it exists) or browse to it and select it.chek the box.. always open with... and there u r....double click and it should compile... I have not tried it yet.. but should def work...similarly for class files.. associate it with java.exeIf these dont work... i suppose u can write a batch file.. which compiles and runs both...There is sthg u can do in the registry so that in the context menu u get compile and it would compile with javac.exe wud try out and let u know.. Share this post Link to post Share on other sites
khmerneed 0 Report post Posted December 15, 2004 Hi, I have tried so many times, but it is not run that way. when i double click on it, it gone to be open the dos then exit. I wonder if i have another way.Thanks & Best Regards,Dorei Share this post Link to post Share on other sites
spirit_valley 0 Report post Posted December 20, 2004 Yeah, I think that is possible...  Just right click on .java file and select open with... from the list select javac.exe (if it exists) or browse to it and select it. chek the box.. always open with... and there u r.... double click and it should compile...  I have not tried it yet.. but should def work... similarly for class files.. associate it with java.exe  If these dont work... i suppose u can write a batch file.. which compiles and runs both...  There is sthg u can do in the registry so that in the context menu u get compile and it would compile with javac.exe wud try out and let u know.. <{POST_SNAPBACK}> I've tried this method...It's normal when the DOS window open and exit. Once the DOS command finishes the window will be closed automatically. And in fact I don't recommend this method since you won't be able to read the error messages from the compiler, although you will still be able to compile the program. Also note that you won't be able to run the program just by "associating it with java.exe". Reason? Do you remember after you compiled the program successfully (e.g. javac testprog.java), what's the command you need to type in order to interpret (execute) the program? It's (javac testprog). You can't include the ".class" when executing the program, or you'll get an error message. And when you associate a file with a program, Windows just append the filename to the end of the program. So when you associate that *.class file to java.exe and you run testprog.class, you will get "java testprog.class" - it won't work. Try it on your own.  Hi, I have tried so many times, but it is not run that way. when i double click on it, it gone to be open the dos then exit.  I wonder if i have another way.  Thanks & Best Regards, Dorei <{POST_SNAPBACK}> Like cse-icons said, create a batch file to handle the task. But the easiest way may be to simply use an IDE to write and compile the program.  ** Edit Create a batch file to do the task: Save the following code to runjava.bat under folder C:\j2sdk1.4.2_04\bin @echo off[br]title Java Compiler[/br]if "%1" == "" goto Help[br]echo Compiling...[/br]javac %1.java[br]if ERRORLEVEL 1 goto Error[/br]echo Compile successful. Running program...[br]java %1[/br]goto End[br]:Help[/br]echo Compiles and run a java program.[br]echo.[/br]echo RUNJAVA [filename][br]echo.[/br]echo  [filename]  File name of the java source code (without .java extension)[br]goto End[/br]:Error[br]echo *** Compile failed ***[/br]:End[br][/br]What a long post... Share this post Link to post Share on other sites
jordanliuhao 0 Report post Posted January 30, 2005 If you system is linux, you can use cron job to do the same thing. It is a tool to start specified program at specified time continuouly.  You can use  crontab -l  to show the existing cron job.  You can also use  crontab -e  to configure it.  the job definition can be divided into two part. One part is the time schedule definition. You can specify the year/month/day/weekday/hour/minute/second. One part is program definition. It is same as your command line, such as java -jar run.jar.   You can also run java program as a windows service. Use javaservice free tool 27108[/snapback] Share this post Link to post Share on other sites
iGuest 3 Report post Posted July 12, 2008 About jar Auto Run Java Program  While creating jar file I faced a problem that is could not find main class ,the program will exit  -reply by Giri Share this post Link to post Share on other sites
SoundStorm 0 Report post Posted March 10, 2010 There are also some tools that help you convert a jar to an exe. Although it isn't indicated ... But still... nice to know :angel: Share this post Link to post Share on other sites
T X 0 Report post Posted March 28, 2010 May I also recommend JARMaker?http://forums.xisto.com/no_longer_exists/And Jar2Exe?http://www.jar2exe.com/Of course, if you're talking about hiding the window while you're running it just use javaw: @echo offstart javaw Main Otherwise you can do:@echo offtitle Runjava -Xmx256m Mainpause I don't understand the point of jarring it unless you're going to be distributing it. Share this post Link to post Share on other sites