Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Noob question about jars

Featured Replies

Once I've got a jar loaded, is there a way to list its classes, etc. so I know what I can do with it?

The JAR file is just a ZIP file, so if you have, say, 7-zip installed, you can right click it an unzip it. Alternately, if the Java SDK is installed you can use the jar command to list the classes per Link

You can list the classes in Scriptmaster by reading the jar file and parsing it. Below example shows classes in javax.mail, assuming you have a copy in c:mail.jar

Most jars have a javadoc on the internet that lists all the classes.

import java.util.jar.*;

import java.util.*;

import java.io.*;

public static String getClasseNamesInPackage (String jarName, String packageName)

{

String classes = "";

packageName = packageName.replaceAll("." , "/");

try{

JarInputStream jarFile = new JarInputStream (new FileInputStream (jarName));

JarEntry jarEntry;

while(true) {

jarEntry=jarFile.getNextJarEntry ();

if(jarEntry == null){

break;

}

if((jarEntry.getName ().startsWith (packageName)) && (jarEntry.getName ().endsWith (".class")) ) {

classes = classes + (jarEntry.getName().replaceAll("/", ".")) + "n";

}

}

}

catch( Exception e){

return e ;

}

return classes;

}

String Class_list = getClasseNamesInPackage ("C:/mail.jar", "javax.mail");

return Class_list;

jar tf bundle.jar
 to list contents of 
bundle.jar

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.