Calling class or jar file location
I created one set of java api for third party application to call. How do I found out that the location of third party jar file or class file that call my api? Please advise.
If you don't know what called your program, then there is no way.
Similar Messages
-
How to call function in jar file?
First, I can't write english well.(I'm korean.. ) sorry about that.
I have known function in jar file.
but I don't know how to call function in jar file.
how can I this work?
My project and another project are respectively developing D-project with me and other man.
so i need it. or I can't do this work.
I will paste other's source code in my source code.
and then recomplie , build it.. but it is not my wish!
thanks for reading my sentence.If you have a jar file with a class that you wish to use, then you must add the jar file to your class path ($CLASSPATH on unix, linux, etc. and %CLASSPATH% on Windows).
Then you can use the class normally, just as you would if it were not in the jar.
If you meant something else, you'll need to explain what you meant. -
Can I increase heap memory without specify any class or jar file??
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
can I increase heap memory without specify any class or jar file??
thxchiara wrote:
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
What is it supposed to do with your request to use 256m of memory for heap
when you are not giving it a class or a jar to run? -
Where to put common classes and jar files
hi,
i want to put some classes and jar files in a common folder so that it can be accessed by other applications is there any way doing that.In tomcat server they have common and shared directories once any classes are into that folder they are being accessed easily ,but i am having problems with sun one .
Regards
Ameem SamiDid you find a solution for this? I'm having the same problem.
Thanks,
Tony -
Ojvmtc reports xy.jar is not a class or jar file
Hi
I am a little bit confuced because ojvmtc reports an error I can not imagine about:
oracle@cikic-desktop:~/Downloads/dom4j-1.6.1$ ojvmtc /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
/u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar is not a class or jar file
The set is closed
But jce.jar is a jar file and I can inflate it:
oracle@cikic-desktop:/tmp/fo$ jar -xf /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar
oracle@cikic-desktop:/tmp/fo$ ls -l
total 8
drwxr-xr-x 3 oracle oinstall 4096 2010-05-03 19:40 javax
drwxr-xr-x 2 oracle oinstall 4096 2010-05-03 19:40 META-INF
And if I do a ojvm on a class file everything is working like expected:
oracle@cikic-desktop:/tmp/fo$ ojvmtc javax/crypto/Mac.class
The set is not closed
96 classes are missing
So It must be a configuration mistake somewhere ...
Can you please help me out.
Thanks
Christian MaierCoole thanks, this works pretty well!
Chris
oracle@cikic-desktop:~$ cp /u01/app/oracle/product/11.1.0/mds/jdk/jre/lib/jce.jar /tmp/
oracle@cikic-desktop:~$ ojvmtc /tmp/jce.jar
The set is not closed
131 classes are missing -
Weblogic.jar file location in CC&B Media
Hi Guys
Can anyone let me know the weblogic.jar file location in CC&B 2.2 media.
Thanks
Aleemvinod hadlee wrote:
Hi,
We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
Gerald -
In PI 7.1 - Java UDF's Compiled Class files - Jar File location
Hi All,
In PI 7.1 Does anybody know where the compiled Java UDF's (which are used in Graphical mapping) class files stored in jar are located in integration server? I want to use this jar file in my XSLT mapping.Hi,
I guess it would be under
\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\temp\classpath_resolver
or
\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\.\temp\classpath_resolver
Where SID is your XI instance name.
Thanks,
Gujjeti
Edited by: Praveen Gujjeti on Jun 23, 2008 5:12 PM -
OC4J: Class not found for class in jar file placed in \j2ee\home\applib\
I have an ADF application which uses external libraries (jars), which works fine when running the application from within JDeveloper (TP4).
However if I deploy the application to the embedded OC4J server it won't find any classes imported in those external libraries at runtime (deploy does work). E.g. one library class imports oracle.jbo.server.DBTransaction. If a method of this class is called I get the following exception:
Unexpected exception caught: java.lang.NoClassDefFoundError, msg=oracle/classloader/util/AnnotatedNoClassDefFoundError
oracle/classloader/util/AnnotatedNoClassDefFoundErrorThe same exception, when using a german locale, explicitely states that it cannot find oracle.jbo.server.DBTransaction.
The jar files are placed in the \j2ee\home\applib\ directory and a <library> element to this path is present in application.xml.
Any further hints what could be wrong?Hi Edwin,
tried your suggestions but without success.
when I add this library to server.xml then following error occures when starting OC4J
17.09.2008 17:10:33 oracle.oc4j.util.SystemLog log
SCHWERWIEGEND: Server start failed processing configuration
java.lang.InstantiationException: Illegal tag, 'library': The library tag has moved from config/server.xml to config/application.xml, please update your configuration manually or reinstall.
at com.evermind.server.XMLApplicationServerConfig.parseDeploymentMainNode(XMLApplicationServerConfig.java:1227)
at com.evermind.xml.XMLConfig.parseRootNode(XMLConfig.java:342)
at com.evermind.xml.XMLConfig.init(XMLConfig.java:222)
at com.evermind.xml.XMLConfig.init(XMLConfig.java:154)
at com.evermind.server.XMLApplicationServerConfig.<init>(XMLApplicationServerConfig.java:237)
at com.evermind.server.ApplicationServer.createConfig(ApplicationServer.java:661)
at oracle.oc4j.server.ServerFactory$Worker.prepareConfig(ApplicationServerFactory.java:225)
at oracle.oc4j.server.ServerFactory$Worker.start(ApplicationServerFactory.java:244)
at oracle.oc4j.server.ServerFactory$Worker.run(ApplicationServerFactory.java:259)
at java.lang.Thread.run(Thread.java:619)
17.09.2008 17:10:33 oracle.oc4j.util.SystemLog logNoStack
SCHWERWIEGEND: Server exiting: ApplicationServer entered state EXITING--> I added this to application.xml
Than I enabled more logging of classloader "-Duser.country=US -Dclass.load.log.level=finest"
Here a snippet of the output at starttime of OC4J:
================================
08/09/18 10:17:07 Initial class loaders created. Uptime: 3156ms.
08/09/18 10:17:07 Loading main class com.evermind.server.OC4JServer...
08/09/18 10:17:07 com.evermind.server.OC4JServerMain class loaded. Uptime: 3344ms.
08/09/18 10:17:07 Transferring to com.evermind.server.OC4JServer.main()...
08/09/18 10:17:15 Ignoring non-existent code source: D:\oracle\jdevstudio1111_preview4_standalone\j2ee\home\config\..\..\..\BC4J\lib\jmxdc.jar(from <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml)
08/09/18 10:17:15 Ignoring <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml entry: code-source /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/lib/api-ext/adflogginghandler.jar (from system property api.ext.dirs) is already visible in the search path of adf.oracle.domain:11.1.4949.
08/09/18 10:17:15 Ignoring non-existent code source: D:\oracle\jdevstudio1111_preview4_standalone\j2ee\home\config\..\..\..\BC4J\lib\jmxdc.jar(from <code-source> (ignore manifest Class-Path) in /D:/oracle/jdevstudio1111_preview4_standalone/j2ee/home/config/server.xml)
08/09/18 10:17:15 Import was not resolved for adf.oracle.domain:11.1.4949: shared library "oracle.fabric.runtime" could not be found.
08/09/18 10:17:15 Import was not resolved for adf.generic.domain:11.1.4949: shared library "oracle.fabric.runtime" could not be found.Seems that oracle.fabric.runtime couldn't be found but the jar's are located in D:\oracle\jdevstudio1111_preview4_standalone\lib\java\shared\oracle.fabric.runtime\11.1.1.0.0
It's the same as with my jdeveloper installation where I don't have this problems.
regards
Peter -
How to convert .class into .jar file
Hi,
How to convert .class into .jar filejsf_VWP5.5.1 wrote:
Hi,
How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
If you want to compile all .class files in a directory into a jar, use *.class instead.
Now, I'm going to assume you want to create an executable jar... here's how to do that:
1) Create a blank text file; for this example, lets call it main.txt.
2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
4) Make sure you save this file in the same directory as your .class file(s).
5) Type: jar -cmf Whatever.jar main.txt Whatever.class
...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
Hope that helps. -
Java.lang.UnsatisfiedLinkError: when called from a jar file
I have a class that calls a custom dll file. If I dont package the class files and set my system PATH to the location of the DLL then the VM is able to find the dll and load it successfully.
However, when I package the class files into a jar file, I get "java.lang.UnsatisfiedLinkError: NetworkAdapters" eventhough the system PATH is set to the correct location.
I have also tried to packaging the dll with the class files but this has not made any difference.
Library is called from Java as follows:
static {
System.loadLibrary("NetworkAdapters");
When packaged the classes files exist in the following sub directories com\instem\hci\adapters
Any help appreciated.Is it an executable Jar file?
The the DLL needs to sit in the same folders as the Jar itself.
(works for us). -
Problems accessing class in JAR file [err = -4000]
Hi, my setup is as follows ....
I have a seq file that is accessing a Java class file, TestStandClient.java. something like
public class TestStandClient
public String test (String arg)
String returnVal = "";
try
TestClass testClass = new TestClass ();
returnVal = testClass .test (arg);
catch (Exception e)
returnVal = e .toString();
return returnVal;
TestClass.java is
public class TestClass
public String test (String arg)
return arg + " : [Jar object has modified string]";
Now. TestClass is in a seperate jar. When TestStandClient :: test is called i get a -4000 error. From the readme in the Java example file it is described as ....
Error
reading returned string
The
string returned from Java was corrupt. Verify that the return type of the Java
method is a string value.
I have noticed if I take out the call to the object in the jar file then everything works ok.
Could it be a classpath problem? the StartJVM has its classpath
pointing at the folder where the jar is and also at where the
TestStandClient class file is. I also set the classpath for the Java
step to be the same (location of jar and class file)
So, can someone inform me of what support TestStand has for java? Does it support communicating with a class file that itself depends on other JAR files? This is surely the case?
thanks in advanceDear PCR Barry,
I am afraid that I must agree with my colleague Kostas, who replied to your first teststand post. These are very tricky, indepth issues, and will require quite significant investigation. Furthermore, it will be very difficult for us to answer via the forums as we will likely need more input from yourself. As previously suggested, if you have a Standard Service Program (SSP), you can generate a Service Request by calling or e-mailing your local branch.
Thank you for your time, and I am sorry that I have been unable to help you further,
Best wishes,
Rich R
Applications Engineer
National Instruments UK & Ireland -
Errors generated while loading classes in jar file
Hello all,
I am attempting to install the xml parser using the loadjava utility. Here is my commandline call:
loadjava -user user/password -r -v xmlparserv2.jar
where user and password are the appropriate.
I made sure my CLASSPATH was not set to anything.
When I run this against Oracle 8.1.5 I get the following for quite a few of the classes in the JAR file.
resolving: oracle/xml/parser/v2/XMLExternalReader
Errors in oracle/xml/parser/v2/XMLExternalReader:
ORA-29534: referenced object XCOM.oracle/xml/parser/v2/XMLNode could not be resolved
ORA-29545: badly formed class: java.lang.NullPointerException
Some the classes compile without problems, but the majority report this error. Also it takes some time to compile and reach this conclusion.
On my first run loadjava reported 227 errors.
What am I doing wrong. Any and all feedback would be highly appreciated.
Thanks,
Bediako George
nullI have not been able to resolve this to date. Does anyone have half a clue as to what I might be doing wrong?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alison Stohrer ([email protected]):
Were you able to resolve this? I am having the same problem.<HR></BLOCKQUOTE>
null -
Problem accessing class in jar file
Hello. I am trying to create a jar file from my already compiled classes. I have around 5 packages, and my programs' entry point is in one of the packages, we'll call package A. Each package has its own purpose and package A calls any needed package to perform their task. This works well when I compile, run and all. However, when I create a jar file, it only works with the local package and any calls to another package do not work. How can I get around this? any help will be appreciated
This is the output..
05/05/2010 10:19 AM 10,946,787 MYJAR.jar
1 File(s) 10,946,787 bytes
0 Dir(s) 1,434,251,264 bytes freeMy manifest file contains
Manifest-Version: 1.0
Class-Path: .
Main-Class: Login.loginMain
AndrewThompson64 wrote:Is the code [swallowing exceptions|http://pscode.org/javafaq.html#stacktrace] at any point?
Nope..
AndrewThompson64 wrote:
How do you know that if there is absolutely no error output?The when I ran the code from my compiler, it has no errors, and it works smoothly. I have used a JAR for a single package program before and it worked well but this multiple package program is giving me the problem and I don't want to put all the files in a single package -
Create object for a class in jar file
Hi
I am using Oracle JDeveloper 10g. I have created a main application using Swing/JClient technologies. I am facing a problem for the past one week. I let u all people know my problem and I kindly request you to send a solution if known possibly confirmed.
Problem: I have created a main application using swing that class extends JFrame. This main application consists of two parts. One left side panel and one right side panel. Left side panel contains JTree component. Each item in that tree refers to a class file located in a separate jar file.i.e that acts as a separate application. If we are executing separately that jar file class, I am able to see that small application running. If I am selecting an item in JTree during runtime, I should place that small application from the respective jar file in the right side panel of the main application. I can locate the jar file and even I can create object to that particular class file. But I cannot execute the application even separately and also not able to place in the right side panel of the main application.
Note: The small application from the jar file contains one class file containing main method. That class file extends JPanel and implements JUPanel. i.e., with data binding. I am trying to create an object for this class file with data binding from my main application. Navigation bar is used in the main class file.
If possible can any provide me solution at the earliest. Waiting eagerly for the positive reply.
Regards,
s.senthilkumarCan you sure that there is only a A class in the classpath of Tomcat, I advise you to add
some statements into the A class so that you can be sure which classloader is used
to load the A class. -
Importing classes from Jar files..?
I've run into a problem that I am having some difficulty solving. I currently trying to port a two part Java UI project from Solaris to Windows. The first is a package of core classes out of which I (successfully) create a jar file. The second is a product-specific package that imports the core classes from the package created in the first. The problem is that the second package fails to build because javac says the package from part one does not exist. Here's what I know:
- This UI (built via a Makefile) builds successfully under Solaris
- The jar file that I created in the first part exists in the appropriate directory.
- When I view the contents of that jar it appears as though everything is there.
- The jar file is appropriately included in the classpath of the second build.
Any suggestions you could provide, or resources you could point me to would be greatly appreciatedjh.jar is a static, 3rd party component. Doesn't seem to be giving me any grief, at least not yet.
Correct on your second point.
This is interesting. When I open my "CoreConsole.jar"
file, I DO NOT see any reference to the
com.emc.avalon.core.server package, only a list of
class files that make up that package. You should see the .class files on the left and the relative path on the right.
Also, all of the class file listings have absolute paths according
to the location on my machine they were built, for example:
m:/xpe/CoreConsole/classes/com/emc/avalon/core/server/MessageLogUtility.class
Is this a problem..?Yes, that should be a relative path, with the first entry being the first name in the package statement. So you should see an entry MessageLogUtility.class, and the path should be com.emc.avalong.core.server.
If you can't see the class that's missing, that would explain why the class loader can't find it, either.
Maybe you are looking for
-
Using EE and XE in the same application?
After reading the license, it doesn't appear that there is any stipulation against using XE databases alongside an EE database within the same application. I have a business app which runs with a centralized database, but clients in many geographical
-
IPhone 3GS crashed, What can I do?
First of, yes I know, I still have an iPhone 3GS!!!! Anyway, today I just recently updated it to IOS 6(Which I love the new layout). After a few hours of using it, I turned on my music and started temple run. It crashed! I've played temple run and li
-
PLS-801 internal error when returnig rowtype in select clause
Hi, looks like the following case is not handled in version 11.1.0.6. I created a function which returns a ROWTYPE and when calling this function from a simple sql statement an internal error occurs. create table testing as select 1 id, 'A' val from
-
Tabs display on different line in XP than with Window7
With Firefox 4.0 (and the 'Tabs On Top' option selected): In XP the tabs are shown on the line BELOW the upper left FIREFOX button. In Windows7, they are displayed on the SAME line as the FIREFOX button (the very top line of the display) - thus using
-
i have torch 9810..it is touch plus type...but my type keypad has stopped working and my touch keypad is also giving problems...so i cannot type msgs and even the light fluctuates continuously...what should i do?