Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TSR in Java?


  • From: osito at intraweb.cl (Jose Gengler L.)
  • Subject: TSR in Java?
  • Date: Sat Nov 12 19:34:19 2005

Hi!

Lets start with a fact: to run a java program that is compiled in a .class file (lets 
say TSR.class) you need to somehow START THE JVM. One of the most 
important issues in this regard is the classpath setup. Once you do that you 
are almost done. One of the most direct ways of doing this is with a parameter 
in the command line when one executes the JVM. In my JVM the parameter is -
cp

So the complete command line would be:

java.exe -cp /java/lib;/java/jre;/java/bin TSR.class

This so if the case is that you have the lib, jre and bin directories aranged in 
this way. If you also have .jar files their complete path (including the file itself)
must be included in the classpath.

Once you have the correct command line, you have to write it in an apropiate 
way so the os can run it at startup. Maybe you can write a plataform 
independent C++ program that makes the os execute this command line.

In Windows I would write this command line in a .bat file and then I would 
include this .bat file in the startup file. This procedure changes in each os but 
at least once you have this command line apropiately executed, you have your 
plataform independent TSR. Anyway, remember to excecute the JVM in a 
minimized window so it doesn't bother the user. I would try not to invoke a 
second lauch of JVM, and I would recomend to excecute the whole program 
inside this unique JVM if possible. The only drawback of this is that there will 
allways be a JVM in the task bar and JVM uses up a significative ammount of 
system resources, so I don't know how it would influence the rest of the 
programs.

Hope this helps,


> Hello,
> 
> I need to write some sort of a TSR that'd call up a Java application upon
> certain keystrokes. Initially I was thinking about doing that TSR in C++ but
> now I am thinking about doing the whole thing in Java. Has anyone done
> something like this?
> 
> Denis Voitenko
> Internet Developer
> Qode.com
> Tel.: 954 484-3191
> Fax: 954 484-2933
> 


Jose Gengler
osito@xxxxxxxxxxx
jgengler@xxxxxxxxx

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx