jar files
is there any way of using the jar files in java without putting them in the classpath. I mean i want to use the files in the jar as a java file, is there ant way. would opening it with DJ decompiler help?
> is there any way of using the jar files in java
> without putting them in the classpath.
No.
> I mean i want to use the files in the jar as a java file, is there
> ant way. would opening it with DJ decompiler help?
Do I get you right: you want to include library classes into your project as source files? A decompiler would help, but for what reason?
if I understand right, you want to use the classes in a jar, without putting that jar in your classpath? yes, that can be done. load the classes yourself, not as daunting as it sounds: look up URLClassLoader, it should help you do this
although I may have misunderstood your question
> is there any way of using the jar files in java> without putting them in the classpath.>> No.depends how you define "in the classpath", of course :-)
> > is there any way of using the jar files in java> > without putting them in the classpath.> > >> No.> > depends how you define "in the classpath", of course :-)Strict :)
>> Strict :)then, no. by definition :-)usually, though, if someone is asking a question like this, by 'classpath' they mean the classpath environment variable, or the classpath as passed to the VM at startup.
see the problem is "I want to run my code on some server and they do not have the following jar file or124.jar", but i want to use it . Now could anyone suggest how to acieve this
> on some serverDon't you have access to the directory WEB-INF/lib?> suggest how to acieve thisHow do you upload class files to that server? What kind of server is it?
i have a unix server where i have to put my code then the client will run it from my acctn folder, he will not give classpath variable
javac 朿lasspath
.:$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/md/lib/sdoapi.zip myCode.java
this is how the code is supposed to work, the 2 zip files mentioned only will be run & then myCode, so now how can i access any other jar file .
Message was edited by:
nan20_libra
> i have a unix server where i have to put my codeEdit: (Ok, no web application ... question deleted)
> javac 朿lasspath .:$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/md/lib/sdoapi.zip myCode.javaThe current directory is part of the CLASSPATH, so both compiling and running should work if you simply unjar or124.jar into the same directory where myCode.java is placed.
am sorry but i did not understand, its actually a problem of web appln only where i want to run the appln without specifying the jar files name in classpath.
*Confused*So it is a web application? In htdocs, create a directory named "WEB-INF/lib" (if not already present) and place this or124.jar in there ... done.
hey quitte vat u said wont work according to me coz i am giving a java for compilation using javac, if u see the command line i had given before, thus where do i keep the unjarred folders , i am not directly running the class file of myCode.java. Please could u clarify
> vat u said wont work according to me coz i am giving
> a java for compilation using javac, if u see the
> command line i had given before, thus where do i keep
> the unjarred folders , i am not directly running the
> class file of myCode.java. Please could u clarify
I gv teh ans b4: if u wanna compile, unjar or124.jar in2 teh same folder. If u wanna run it, also. If u hav a Servlet engine running it, put or124.jar in2 teh lib folder. If nothing applies, plz give more details abt ur environment.