This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi, Does anybody know what is currently being done to get multiple Java applications to work in one JVM ? Sun should create a new jar extension that the operating system knows how to invoke direclty... maybe .jax ??? Seriously, java is platform independent, but you still have to set loads of classpath and other environment vars settings ... what are the alternatives to this ? and how could it be done that if a user clicks a java app it runs (i currently use the java -jar ***.jar with manifest in it and a setting in the operating system to execute it) what's your thoughts ?? Dave
I have very few java related variables set on my OS, I just have the JAVA_HOME system variable and JAVA_HOME\bin in my PATH. Whenever I write something that runs locally on my machine I start it with a .bat file that sets all the necessary environment variables and before starting the app. I'm not sure if this is the best way, but it works good for me. If I stop using something, I dont have a ridiculously long CLASSPATH and I dont have extra system variables either. [This message has been edited by BJ Grau (edited September 02, 2001).]
Dave Van Even
Joined: Jul 19, 2001
yeah, but that isn't a cross platform way to go about it Maybe ANT can help out in this situation... ( http://jakarta.apache.org/ant ) If you don't know ant yet, you should learn it!! With ant build.xml config you can launch java apps and set classpath variables .. but the problem remains, you still have to get ant to work and since ant is a java program it requires setting up of the JRE or JDK... grz
Joined: Jul 10, 2001
I took a look at ANT and it looks pretty cool. I've heard about it but I've been so busy that I just tucked it away in a corner of my mind. Another idea for distributing a Java app to users on different platforms is to offer different startup scripts depending on what OS they are using. Then you still have the problem of making sure they have an appropriate JVM available. You could go one step further and write an installer for several different platforms that made sure everything was in place to run the Java app, but that would require some more platform specific work. Seems like you would have a tough time writing and distributing app that is truly 100% platform independent. I havent given much thought to these issues because all of my work has been developing server side apps that folks access through a web browser. We jsut deploy the application once and then we are done with it for quite some time (hopefully). Any stand-alone apps I have written have been for myself. Which brings me to another thought, maybe Java is more of a server side language now, and not really a big language for writing client side apps because of the issues you have mentioned. Platform independence is great, but perhaps it is probably more help to developers that need to resue their code while writing enterprise apps for large companies on time and under budget, than it is for writing apps for the average computer user. And that carries me on to another thought in my ramble - maybe you really only need to do some hand-holding for Windows users. I mean, if you provide your app to some user running any flavor of Unix, I bet most of the time they are going to know enough to get the app up and running. So maybe developers just need to worry about writing a slick installer that automates everything for Windows users. I haven't really given any of this much thought before, but I find it a very interesting topic. Disclaimer: I don't claim that anything I have mentioned above is an illustration of the way things are. Its just me rambling on from my little corner. I would like to know what Dave and some other folks think. [This message has been edited by BJ Grau (edited September 03, 2001).]