Results 1 to 10 of 10
- 11-14-2009, 03:50 PM #1
is there a way to tell how to execute a java program in the jar
Myself am a java user so I know after I have jarred my application i can use the command prompt to do something like
this: java -Xms10m -Xmx1024m -jar aaron1.jar
but if I give my average computer user my jarred program they won't be able to do that, they will just double click it and it will automatically use javaw.exe
because i have certain things that I want to come on the command shell it is insufficient, plus, if they close my program that they double clicked, there will still be a javaw.exe process running in their task manager (the process that was supposed to be in the command shell) it will bog there cpu and they won't know why there is a problem and if they don't know how to go unto the tskmmanager and end their javaw.exe process they won't be able to stop it until they restart their computer.Last edited by aaroncarpet; 11-14-2009 at 03:51 PM. Reason: typos
- 11-14-2009, 03:59 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you want to execute your application on command prompt, then use a bat file for the execution.
- 11-14-2009, 05:05 PM #3
Batch files
I will have to do my research but from what I hear you are saying i can use a dos batch file to execute the command line but the user won't be able to click the bat file(will they?). I have been searching manifest stuff up and down and it doesn't look possible to do it that way.
- 11-14-2009, 05:23 PM #4
does vista have an autoexec.bat
i am going through a tutorial but i think i don't need to modify autoexec.bat
- 11-14-2009, 10:46 PM #5
Eranga is right the batch file can control the command path so the end user doesn't have to think...a smart lady she is
I am using Vista and there is no autoexec.bat and YES you Can double click a batch file and it will executeLast edited by aaroncarpet; 11-14-2009 at 10:48 PM. Reason: forgot something
- 11-15-2009, 02:15 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 11-15-2009, 02:18 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
That's the power of bat files. You can edit AUTOEXEC.bat file, which is heavily use by the OS, through your bat files. But you have to really care about that. You are going to do changes on client machines, and different users have different settings on there bat files. So if something is going wrong they will blame on you. :p
- 11-15-2009, 02:23 AM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
In Vista they are no longer use AUTOEXEC.bat, all the settings passes to the environment variables. May be there is a single dummy entries/settings in the initial installation.
That means you can see a AUTOEXEC.bat file in vista, but write protected. And also it's hidden as in previous Windows OSs. Again it's NOT a good idea to change system protected files.
- 11-16-2009, 04:33 AM #9
dummy bat
yeah I got the dummy bat in vista which means that i can create an executeable bat without touching the os....pretty much the bat does the command line...but Eranga? I have j2se installed...what about clients with just the jre do they have java and javaw?
the original tutorial was for dos based and they wanted the user to modify the autoexec.bat to include the directory of their bat
so now the question is ....I specified my folder allocation in my bat so how do i control folder allocation when deploying on a client computerLast edited by aaroncarpet; 11-16-2009 at 04:38 AM. Reason: explanation
- 11-19-2009, 04:31 PM #10
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Execute external program from java
By ankitmcgill in forum New To JavaReplies: 1Last Post: 06-01-2009, 03:58 AM -
Execute a jar command from a java program
By apremanandh in forum New To JavaReplies: 3Last Post: 05-21-2008, 02:04 PM -
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM -
Execute a new program in java
By mathias in forum Advanced JavaReplies: 1Last Post: 07-31-2007, 05:42 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks