Locating a JAR file
Has this happened to you? You search the internet for some concept in Java and find a nice piece of code that illustrates perfectly what you want to do. So you do a little cut-n-pasting and off you go. But then you're suddenly stopped in your tracks due to an error in an import statement. Scratching your head, you stare at the import statement wondering where that particular package is located. You've got 6 million JAR files to search containg that illusive package. With nothing more to go on, you go looking for any JAR file on your system that might come even the slightest bit close to containing that package you desire - without luck. So there you sit, still sratching a bald spot on your head wondering how the heck you're going to find that JAR file. And here I sit too, slightly balder, and still searching.
This happens all too often I'm affraid. Where oh where is the JAR to package cross reference search engine web site tool thingy I so desire? Being president of the "procrastinators society for ..", I have no desire to take on such a dubious project. I'm hoping someone out there with a bit more energy than I to taken on such a task and someone else to have researched and found that gem of a utility web site I spoke of and would kindly educate me on such web site.
Thanks a bunch!
You've got 6 million JAR files to search containg that illusive package.
Load them all into your IDE's classpath. Then do a Java type search. Most IDE's will take you directly to the relevant JAR(s).
- Saish
Similar Messages
-
Setting the L&F located in jar files
Hi.
How can you set the L&F to a custom Look And Feel located inside a jar file?
I used the following to accomplish that:
java -classpath "C:\LookAndFeelSwaper\lf.jar;C:\LookAndFeelSwaper" LaFSwaperI have a class located in "C:\LookAndFeelSwaper" which uses the L&F in "C:\LookAndFeelSwaper\lf.jar".
I want to have the same effect by changing the source code and not in the java command as written above.
My goal is to give the user the option to switch from L&Fs, which have been downloaded.
Thanks in advance,
SIJPStep 1: Create a class loader
File file = getJarFile(); //The location of the jar with the look and feel
ClassLoader cl = new URLClassLoader(new URL[] { file.toURL() });
Step 2: Create an instance of the custom look and feel
Class clazz = cl.forName("plaf.MyLookAndFeel");
LookAndFeel laf = (LookAndFeel)clazz.getInstance();
Step 3: Use the UIManager class to set the look and feel.
UIManager.setLookAndFeel(laf);That should do it for you . -
Location of jar file for com.sapportals.wcm.service.IService
Hi,
Can somebody tell me that from where can I get the jar file for <b>com.sapportals.wcm.service.IService</b>
Regards,
ManishHi Manish,
I think you'll find it in <b>bc.sf.framework_api.jar</b>
located in <b>..j2eeclusterserver0appssap.comirjservlet_jspirj
ootWEB-INFportalportalappscom.sap.netweaver.bc.sflib</b>
I'd also recommend trying JAR class finder. More details here: JAR Class Finder
Cheers. -
Location JDBC jar file while building Jetspeed2
Hi,
At the moment I'm trying to get Jetspeed2 installed. Reading the manuals it seems soooo easy. I installed Jetspeed using the default installation method, and wanted to change the database from derby to MySQL.
To change the database from derby to MySQL I need to start an Ant script. As a result of running this script, I got the following error:
java.lang.IllegalStateException: -> Unable to start DBCPCDatasourceComponent: -> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
(tabs and -> added for readability)
There is a mysql-connector-java-5.1.6-bin.jar in Tomcat's shared/lib directory. This jar file is also part of my systems classpath.
Does anyone have a suggestion in which way I can look?
AbelFound it.
Place the jar files in
{jetspeed-home}/shared/libThat must be a hidden, undocumented feature. Mindreading and/or clairvoyance is an important ability. -
Locating a jar file into JDeveloper 11g
Hi there,
I'm looking for a easy way to find out which jar files are part of each predefined library on JDev. Is there an xml file inside JDev where it is defined?
Best regards,
GeorgeFor programmatic access to the library definitions, the libraries are defined in the shared-library definitions in the server.xml files in the following directories.
C:\JDeveloper\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config
C:\JDeveloper\jdev\extensions\oracle.adfp.seededoc4j.10.1.3\srcimage\j2ee\home\config
C:\JDeveloper\j2ee\home\config
The code-source path specifies the library jar fles. -
Deployment Rule Set Centrally Managed location of .jar file?
Hello,
We are currently looking at implementing the Deployment Rule Set in our company and I was wondering if there is a way to centrally manage the Deployment Rule Set?
Having to keep up with deploying the jar file for every change and expiring certificates isn't ideal
Thanks!And your OS doesn't have a file search feature, which might have given you the answer faster than waiting for a response on these columns?
db -
How can i run a jar file as EXE on mouse click..
*{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*
amrit_j2ee wrote:
*{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*Do you mean converting it from a jar file to an EXE file or do you mean that you would like to run the application by just double clicking it?
If it's the latter then you need to make the jar file including a manifest.
The manifest can be just a txt file with its content to be something like this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: Somebody
Main-Class: NameOfTheMainClass
Class-Path:
X-COMMENT: Main-Class will be added automatically by buildTo make the jar file including the manifest, use something like this in your command prompt (of course you must have compiled your java file(s) first):
jar cfm test.jar MANIFEST.txt NameOfTheMainClass.classAfter that you'd be able to run your application just by double clicking it.
If you're a NetBeans user, you can build your standalone application by right-clicking your project and then going to properties => run => and choosing a Main class. After that right click on that project and "Clean and Build", locate the jar file in the "dist" folder and double click it =]
Hope it helps,
LD -
Hello,
I am not able to locate the Jar files for using BRM API's. I have tried searching the forum and did not find the name or location from where I can get them. If they are available on the server I could ask the basis team to give me a copy. Any help would be greatly appreciated.
Regards
PreetamHi Adam,
I have created a New EJB Project for my proxy development. This is the usual way I develop proxies for any given service interface created in ESR. Now i am not sure how to create a dependency with the BRMS facade. If i find the jars i can add it as an external library when compiling.
Can you explain a bit more about what you ment by "developing the java proxy in a development component", how did you accomplish this when creating a proxy for a service interface?
http://help.sap.com/saphelp_nw73ehp1/helpdata/en/e2/3620cef55842cca4632664212f31b1/content.htm?frameset=%2Fen%2F81%2F097529e0e545e58bb2d7a34e4d0a2a%2Fframeset.htm -
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. -
Need help with classpath configuration for external jar files
We have coded our own JAAS login module, and it uses classes located in jar files, and these jar files were not created using SAP dev studio, e.g. they were provided by a third party vendor as a set of tools.
So, how do we deploy these jar files so that our SAP JAAS login module can find them ? We found we can run consoleconfig.sh to change the classpath which SAP J2EE engine uses, but we wondered if there was a better way to do this. Of course, if the jar files were created by us, we can include them in the dev studio project and they would be deployed using SDM, and this would not require any changes to classpath using consoleconfig.sh
Thankyou in advance for your help.I noticed nobody has sent any feedback on this yet, so I wondered if I have posted to the wrong forum ? Any thoughts on this ?
Thanks,
Tim -
How to automount jAR file in Linux!
hello,
I am create JAR file. I want to put this JAR file in CD and if an user in linux platform can ablet to locate this JAR file in /usr/bin/myjar folder and open through java -jar jarFile.jar cmd using shell script. Is it possible to uto mount and auto run that JAR file in Linux.
How can find whether JRE is already installed in a system or not.Hi,
Is the Linux your client Platcform? If you want to execute something in the client, you need to use Webutil.
You can use something like,
You can use Client_Host from webutil to invoke an editor (say gedit for linux).
HTH.
Regards,
Arun -
OpenScript/How to add .jar file to Java Code in relative path
Hi all,
I want to add a .jar file which can be executed separately (like "java -jar A.jar") to my recorded Java Code.I've read this wiki http://everest2.us.oracle.com/wiki/Generic_JAR_Project about how to add a .jar file to "Assets", however, I cannot figure out how to use the .jarr file in Java code,I mean , how to get this .jar file like the method the databank added in "Assets"?
Things I did are as followed:
1.Execute my .jar file in OpenScript Java code with absolute path like this:
String cmd = "C:\Users\A.jar";
Runtime.getRuntime().exec(cmd);
This does work, but must set a absolute path in Java code like "C:\User\A.jar" ,which is not the workaround I want (I need my scripts can be run on other machines).
2.Try to get its current path with following codes:
File directory = new File(".");
String currentPath=directory.getCanonicalPath();
However,though this can get its absolute path (which is the the project path) in Eclipse like "C:\Users\Workspace\testProject", this only gets "C:\OracleATS\openScript" in OpenScript.
I thought to copy my .jar file to the project path , got its current path in java code first,then can know the path of .jar file, but this workaround failed because of the above reason.
I notice that in the "Assets" there are "Databanks","Object Libraries","JAR Files","Scripts". Since the databanks and scripts that added to "Databanks" and "Scripts" can be got or run in Java Code like:
*getDatabank("DatabankName").getNextDatabankRecord(); String data = eval("{{db.DatabankName.data}}");*
*or getScript("ScriptName").run();*
*Is there a method to get and run the jar file added to "Assets\JAR Files" like the above?*
Thank you very much!
Regards,
AngyoungHi DM,
Thanks for your reply!
I've found a workaround,which is calling OpenScript's APIs ,such as this.getScriptPackage().getRepository() and this.getScriptPackage().getWorkspace(),etc to locate the .jar file.
And this workaround can still work even though the script is run on other machine.
Sorry to reply you so late!
Regards,
Angyoung -
Hello,
Can someone kindly provide me with the path to these 3 jar files on the server:
1. com.sap.portal.usermanagementapi.jar
2. com.sap.portal.pcd.glserviceapi.jar
3. com.sap.portal.pcmbuilderserviceapi.jar
Thanks,
EnasHi Enas
You can use jar class finder to locate the jar files.Check this blog.
Using JAR Class Finder
Also check these links.
Re: Is anyone using IBM's JAR Class Finder in NWDS/Eclipse? Help
Re: Where can we download the API jar files in SDN
Regards
Yoga -
Jar file from netbeans won't run when doubleclicked
Hello,
I've just completed my first java application using netbeans (just a simple "hello world"), it runs fine in the netbeans ide, but when I located the .jar file and double clicked it, nothing happens. I've already verified that the file extension .jar is associated with javaw.exe so that's not the problem.
Anyone how to fix this problem?
Thanks!
Edited by: b-rad311 on Jul 14, 2010 8:44 AMMy guess is he posted something and then edited it and put in nvm for NeVer Mind.
In NetBeans I would try this to make sure the main class setting is fully saved with new version of NetBeans
press Ctrl+1 to go to projects tab
Right click your project click Properties
on left click Run
Make sure you don't have anything in Arguments or VM Options because javaw will read use either of these settings.
Click Browse next to Main Class and click your class again and click Select Main Class. Then click OK to rewrite the settings.
Right click your project and do "Clean And Build".
Let us know if this works or not -
Well, now I'm pulling my hair out even more because I can't get it to resolve anything in jaxws-rt.jar at runtime. Note: compile-time still works FINE.
I was messing with classpaths and stuff (and the endorsed dirs option of course) and it was "working" to the extent I had posted before, but then I kept playing with it and at some point I said, this isn't working and I need to reset all this stuff back to the way it was.
... so I did that. And now it won't resolve "PolicyException:"
java.lang.NoClassDefFoundError: com/sun/xml/ws/policy/PolicyException
This doesn't mean anything to you guys I bet, but that happens when it FIRST gets inside the web service code, which references PolicyException (doesn't even use it at that point.. I'm assuming the import is screwing it up when it's in the constructor). So now it won't resolve at all. Before, it was getting past this point and telling me the "method not found" error on the next line or this same error for WSBindingProvider two lines down, when it's actually being used. AWESOME.
I downloaded the latest jaxws-rt.jar and all its dependencies, shoved that into my lib folder, and set the endorsed dir to that folder (There's kind of a web of dependencies here. jaxws-rt.jar expects all its dependencies to be in the same folder, it seems, so I don't know how it was "working" before when I just copied jaxws-rt.jar into my separate endorsed dir - but I can't move all of those files to endorsed because I need them in my project (which expects them to be in the lib folder)). What happened? It went back to my original "String" error (first error in the first post), which means it's not getting endorsed at all from that location.
What a mess.
Can someone tell me what the heck I'm supposed to do with this jar file?
Maybe you are looking for
-
How many usb drives to install windows 8.1
Hi! I hope that someone can help answer my question. I need to install windows on my laptop. It is an Air with 4gb ram and 256g drive from 2011. So, I tried to download windows to my mac but that didn't work. The windows store only allows downloadi
-
6085 video issue -- Video not in sync with sound
I have a Nokia 6085. Not the best phone, I know, but it's cheap. Anyway, I can convert video files to compatible MP4 or 3GP just fine. My phone will play them just fine, up to a point. After about a minute, the video starts lagging behind the sou
-
Userid/password in a popup dialog box?
When I sign on to the forums today either on an iPhone or Firefox in windows, I'm getting a popup box to enter userid/password instead of the usual Oracle single sign on page. Is this something new?
-
Error...NoSuchMethod: Main???
I am taking a course in Java Networking, but never had Java, and get my four classes to compile and build fine, but when I try to run my client program, I get this error. java.lang.NoSuchMethodError: main Exception in thread "main" No idea what Java
-
Steps - Install Oracle Fusion MiddleWare (R1) In Windows 7
Hi, After days i need to share my experience in install Oracle Fusion Middle Ware In Windows 7 (Home Basic) with a DataBase 10g (Windows Xp). Before any installation you have to be sure you have the following :- 1- Already have a static IP . 2- Enoug