Why IE5 could not find applet class but Netscape can ?
Hi,
I have an applet which is running fine on Netscripts6,
But not on IE5.
<APPLET codebase="http://10.1.1.1/demo/" code="ClientApplet.class" HEIGHT=300 WIDTH=300>
<PARAM NAME="relay" VALUE="1">
I have all class files under demo directory(the same directory as html file).
IE5.0 still could not find applet class but Netscript can.
are you sure its failing to load your classes or is it failing to load a class you are using?
Remember IE only uses things from 1.1 so simple things like component.getHeight() does not work you have to use size().height
Its woth enabling the java console and viewing the exact problem.
Similar Messages
-
Jar file could not find main class.. I cant see why?
I have read loads of tutorials on this and it should be very straight forward but i STILL cant make a working jar file of my program.. please see if you can see anything wrong with what im doing..
my program is one .java file that compiles perfectly, and is runnable both through eclipse and by using the command prompt.. i made a jar file using both eclipse and the command prompt, and neither worked.. every time i run it by double clicking it i get the error "could not find main class, program will exit". here is the contents of my jar:
CorePackage\IPEmailer.class
CorePackage\IPEmailer$1.class
CorePackage\IPEmailer$SMTPAuthenticator.class
META-INF\MANIFEST.MF
the MANIFEST.MF file contains:
Manifest-Version: 1.0
Class-path: .
Created-By: 1.6.0_02 (Sun Microsystems Inc.)
Main-Class: CorePackage.IPEmailer
(yes there is a blank line at the end)
the class mentioned in 'Main-Class' has a main method that looks like this:
public static void main(String[] args) {
// TODO Auto-generated method stub
new IPEmailer();
}the program uses 2 external jar files:
activation.jar
mail.jar
and reads a file called:
ipemailer.ini
and writes a file called:
ip.txt
the program has no GUI and is intended to run 'silently' in the background
please help me understand what is wrong with thispackage CorePackage;
import javax.mail.*;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import java.net.*;
public class IPEmailer implements Runnable{
* @param args
String recipientsinput[]={""};
String subject;
String body;
String server;
String user;
String pass;
String from;
String urlString = "http://www.whatismyip.org";
String currentIP;
String ipFromFile;
boolean webFailed;
long interval = 900000; //15 mins
long oldInterval;
Thread t = new Thread(this);
public static void main(String[] args) {
// TODO Auto-generated method stub
new IPEmailer();
public IPEmailer(){
..........etccould the problem be that the class is a thread? i cant see why it would be, but ive never made a jar where the main class also 'implements runnable' -
JAR: - Could not find main class
I'm sorry, I know this issue has been posted before but I am a bit confused with my situation.
After making a jar on my computer, I run it, and the program loads and runs perfectly.
However, when I try the jar on someone else's computer, it doesn't work, and gives the "could not find main class" message. The other computer has JRE but not JDK, so I don't know if that makes a difference.
Anyways, my main class file is located in a package called hw2, and the whole project is located in a folder called HW2. So my class file is located in something like C:\School\HW2\hw2\Main.class.
My Manifest.txt file is located in the \School\HW2 directory and has the following with a new line at the end:
Main-Class: hw2.Main
At the command prompt, I go to my C:\School\HW2 directory and I type the following to create the jar:
jar cvmf Manifest.txt test.jar hw2\*.class
My jar file has the following contents:
META-INF/
META-INF/MANIFEST.MF
hw2/Bank.class
hw2/GUIInterface.class
hw2/Main.class
Did I write the manifest.txt file correctly? Am I in the right directory when creating the jar file? Am I executing the jar command wrong? How come it works on my computer but not on someone else's?Are you certain you're executing the jar in the same way on both machines?
For example, are you sure you're not executing the unjarred class files when you run on your local machine? -
Hi Experts,
When I am installing Oracle client 32 bit software on Windows 7 32 bit I am getting error as "could not find main class program will exit"
I have tried installing latest Java software 7 also JDK 1.6.0_34 still I am getting the same problem below is my " oraparam.ini " details
[Oracle]
DISTRIBUTION=TRUE
SOURCE=../stage/products.xml
LICENSE_LOCATION=
BOOTSTRAP_COMPS="oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1"
JRE_SCRATCH_LOC=jdk/jre
JRE_MEMORY_OPTIONS=" -mx96m"
DEFAULT_HOME_LOCATION=product\11.1.0\client
DEFAULT_HOME_NAME=OraClient11g_home
NO_BROWSE=/net
NLS_ENABLED=TRUE
BOOTSTRAP=TRUE
EXT_JLIB=../stage/ext/jlib
OUI_VERSION=11.1.0.6.0
## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
JRE_VERSION=1.4.2
ACCESS_DIR=../install/access
#SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
#SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
#SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
SHOW_HOSTNAME=NEVER_SHOW
#THIN_JDBC_FILENAME is optional and defaults to classes12.jar
#The value specified for this should be packaged with OUI, and should
#be relative to <OUI expanded stagedir>/jlib/
THIN_JDBC_FILENAME=classes12.jar
#RUN_OUICA specifies the batch script name that needs to be run
#The script is ouica.bat for win32, and ouica.sh for solaris.
#If the value is not specified, then the OUICA script is not run
RUN_OUICA=ouica.bat
CLUSTERWARE={"oracle.crs","10.1.0.2.0"}
SILENT_VARIABLE_VALIDATION=TRUE
[Generic Prereqs]
MIN_DISPLAY_COLORS=256
[IMAGES]
FILE1=images/billboards.gif
LICENSE_LOCATION=license.txtDuplicates of the other two times you asked this question:
https://forums.oracle.com/thread/2559093
https://forums.oracle.com/thread/2558027
(and this time, your question does not appear to have anything to do with this particular forum space, either)
Duplicate is locked.
Do not EVER multi--post. That is extremely bad forum etiquette. -
Hello Everyone,
I want to change my security information so I went to "Manage your Apple ID" but I could not find "Reset your security information" can someone help me to change my security answers.
Thanks in advancecall 1-800-275-2273 (1-800-MY-APPLE)
-
Hello Friends,
I've two iPod Nanos (4th gen - 8GB). I'm facing a severe problem with both of them. For both iPods, I tried to do this method Simultaneously press the top button + home (central) button. But of no use.
1. My first iPod is showing a white screen. I could not see anything. But I can listen to songs by blindly pressing the play button twice. The battery comes only for an hour.? How do I get the display and longer battery?
2. My second iPod is facing more severe problem. None of the buttons are working. When I connect it my PC it showing "CONNECTED- eject before disconnecting". But it is not ejecting with all the usual methods. When I manually and physically disconnect it from the PC the same "CONNECTED- eject before disconnecting" is still showing till the battery goes off. After that if i press any button it is showing low battery signal. And when i re-connect it to the PC the same process is repeating. When I tied to restore it to the factory settings I'm getting "Error" report.
(I'm using windows 7)
Friends, Please help me with the above problems. It will be a great help.
Thank You.
R.SAMALASounds like some hardware issues, meaning you'll want to take or send the iPods in for service or repairs. You can choose to have Apple do an out of warranty exchange for the prices indicated in the link below or find another third party service perhaps even local to your area.
http://www.apple.com/support/ipod/service/prices/
B-rock -
Another "could not find main class" thread
Hello everybody
I know there's tons of threads on this subject but none of them seem to be quite like mine.
I'm trying to deploy an application that I developped with Jbuilder 2006 Enterprise (trial version). It automatically created the "ServerApp.jar" file and the manifest but when I try to run it I get the famous message: "Could not find the main class. Program will exit." My main class is "Application" and it's in a package called "serverapp".
here's a copy of my manifest:
Manifest-Version: 1.0
Main-Class: serverapp.Application
it has two extra lines at the end.
I read on the other threads that I also needed a .bat file (don't know quite why) so I created one. It looks like this:
@ECHO ON
Set Path = C:\Program Files\Java\jre1.5.0_04\bin
cd C:\Documents and Settings\Naby\My Documents\Travail\Synapco\BlackeBerry\ServerApp
javaw -jar ServerApp.jar
EXIT
One last thing: when I run the .jar file from the command line using the syntax
java -jar serverapp.jar
I get this more detailled error message:
C:\Documents and Settings\Naby\My Documents\Travail\Synapco\BlackeBerry\ServerAp
p>java -jar serverapp.jar
Exception in thread "main" java.lang.SecurityException: no manifiest section for
signature file entry javax/mail/internet/AsciiOutputStream.class
at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVe
rifier.java:377)
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVeri
fier.java:231)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier
.java:176)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:233)
at java.util.jar.JarVerifier.update(JarVerifier.java:188)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:318)
at java.util.jar.JarFile.getInputStream(JarFile.java:383)
at sun.misc.URLClassPath$JarLoader$1.getInputStream(URLClassPath.java:62
0)
at sun.misc.Resource.cachedInputStream(Resource.java:58)
at sun.misc.Resource.getByteBuffer(Resource.java:113)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I don't know what is going on here.
Any help would be really appreciated
Thanks.Thanks for the reply martin
what jar file are you refering to? I only have one jar file wich is "serverapp.jar" and that's the one I want to run. -
At first I thought it was just my own programs that I created with netbeans that had this problem; however, even the demo programs under the sdk folder give me this problem when i try to run them. Virtual Machine Loader will just come up with pop up saying "Could not find the main class. Program will not exit"
I am a fairly competent programmer, not new to java. But I am new to guis in java, and using netbeans to create them. The program I am creating gives me this error with javaw and with java it will tell me NoClassDef for grouplayout. I checked the manifest file it looks alright:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 10.0-b19 (Sun Microsystems Inc.)
Main-Class: desktopapplication2.DesktopApplication2
Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/swing-layout-1.0.1.jar lib/ant-swing.jar lib/SwingSet2.jar lib/swing-layout-1.0.3.jar
X-COMMENT: Main-Class will be added automatically by build
}(brackets not included)
I am sort of lost.... Do I need to install ant separately?
I feel like there may be some classpath issues?
I have java 1.6 update 4 and netbeans 6.0
I am completely lost I have been working on fixing this for the past 2 or 3 days now, and reading up all the information.
Note: This is just a standard desktop application.
Also I just thought of something. If I have install the development kit do I also need to install the framework or whatever for 6.0 separately? Meaning installing the latest version of jvm. Sorry if this isn't clear i forgot what it is called.
Sorry if this sounds like a beginner question or something, but I am going crazy. If i am having this much trouble running my own program i really hope distributing files won't be this much of a nightmare....Please become familar with resources at the NetBeans site. There are tutorials and FAQs that cover usage of NB, and how to do things like you're asking.
See my reply in this thread for more information
http://forum.java.sun.com/thread.jspa?threadID=5270931&tstart=0 -
Jar file error: could not find main class. program will exit
I have created a jar file using following command
jar cfm MyProj.jar Manifest.txt richa\*.class
and I have included main class header in the Manifest.txt. The executable jar file is created but when I double click on it, it prompts an error Could not find the main class. program will exit.
Please help. Its urgent..
Thanks in advanceThis simply state that jvm was unable to fine Main Class file.
I hope you have configured manifest file including your main file information and class path used by the project with proper package hierarchy,
as described in article
[https://java.sun.com/docs/books/tutorial/deployment/jar|https://java.sun.com/docs/books/tutorial/deployment/jar]
Edited by: Deepesh on Jul 13, 2008 4:58 AM -
Could not find main class!
I tried some code I got from a book I recently bought it compiled ok but when I tried to run it in JPadPro I got the Java Virtual Machine Launcher warning saying 'Could not find the main class. Program will exit!' As far as I can see there is a main method so I am not to sure what the actual problem is. I pasted the code below hopefully someone can help, Dave.
* Copyright (c) 2000 David Flanagan. All rights reserved.
* This code is from the book Java Examples in a Nutshell, 2nd Edition.
* It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied.
* You may study, use, and modify it for any non-commercial purpose.
* You may distribute it non-commercially as long as you retain this notice.
* For a commercial use license, or to purchase the book (recommended),
* visit http://www.davidflanagan.com/javaexamples2.
package com.davidflanagan.examples.datatransfer;
import java.awt.*;
import java.awt.event.*;
import java.awt.datatransfer.*;
* This program demonstrates how to add simple copy-and-paste capabilities
* to an application.
public class SimpleCutAndPaste extends Frame implements ClipboardOwner
/** The main method creates a frame and pops it up. */
public static void main(String[] args) {
Frame f = new SimpleCutAndPaste();
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) { System.exit(0); }
f.pack();
f.setVisible(true);
/** The text field that holds the text that is cut or pasted */
TextField field;
* The constructor builds a very simple test GUI, and registers this object
* as the ActionListener for the buttons
public SimpleCutAndPaste() {
super("SimpleCutAndPaste"); // Window title
this.setFont(new Font("SansSerif", Font.PLAIN, 18)); // Use a big font
// Set up the Cut button
Button copy = new Button("Copy");
copy.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { copy(); }
this.add(copy, "West");
// Set up the Paste button
Button paste = new Button("Paste");
paste.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { paste(); }
this.add(paste, "East");
// Set up the text field that they both operate on
field = new TextField();
this.add(field, "North");
* This method takes the current contents of the text field, creates a
* StringSelection object to represent that string, and puts the
* StringSelection onto the clipboard
public void copy() {
// Get the currently displayed value
String s = field.getText();
// Create a StringSelection object to represent the text.
// StringSelection is a pre-defined class that implements
// Transferable and ClipboardOwner for us.
StringSelection ss = new StringSelection(s);
// Now set the StringSelection object as the contents of the clipboard
// Also specify that we're the clipboard owner
this.getToolkit().getSystemClipboard().setContents(ss, this);
// Highlight the text to indicate it is on the clipboard.
field.selectAll();
* Get the contents of the clipboard, and, if we understand the type,
* display the contents. This method understands strings and file lists.
public void paste() {
// Get the clipboard
Clipboard c = this.getToolkit().getSystemClipboard();
// Get the contents of the clipboard, as a Transferable object
Transferable t = c.getContents(this);
// Find out what kind of data is on the clipboard
try {
if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
// If it is a string, then get and display the string
String s = (String) t.getTransferData(DataFlavor.stringFlavor);
field.setText(s);
else if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
// If it is a list of File objects, get the list and display
// the name of the first file on the list
java.util.List files = (java.util.List)
t.getTransferData(DataFlavor.javaFileListFlavor);
java.io.File file = (java.io.File)files.get(0);
field.setText(file.getName());
// If anything goes wrong with the transfer, just beep and do nothing.
catch (Exception e) { this.getToolkit().beep(); }
* This method implements the ClipboardOwner interface. It is called when
* something else is placed on the clipboard.
public void lostOwnership(Clipboard c, Transferable t) {
// Un-highlight the text field, since we don't "own" the clipboard
// anymore, and the text is no longer available to be pasted.
field.select(0,0);
}Oh, no wonder I have such low "reading for comprehension" scores - that was a "package" statement, not an "import".
Thing is, your class would compile with this package statement there - but, the interpreter wouldn't be able to find it, 'cause the compiled class would be in a package called com.davidflanagan.examples.datatransfer accoding to the class file, but your interpreter would be looking for the class in the default package (if that makes sense). If executed on the command line you would likely see something like:
Exception in thread "main" java.lang.NoClassDefFoundError: SimpleCutAndPaste (wrong name: com/davidflanagan/examples/datatransfer/SimpleCutAndPaste)
[pre]
Lee -
Could not find Main Class while executing JAR
Hello all,
I am having a simple Jar file that contains one java class that merely displays a window. I am using NetBeans IDE to create the JAR file. When i execute this JAR file by double clicking on the file, it works fine on the machine. However, if i try to execute this same file on any other windows computer, it gives an error "Could not find the main class. Program will exit."
In other words, the JAR file is only working on the computer that has NetBeans and JDK installed on. Not on any other machine. Although the other machines have the JAVA Virtual Machine installed.
I would appreciated any help on this topic.I had the same problem (i.e. Message-Box with "Could not find the main class. Program will exit.")
After insuring that the manifest contained a Main-Class: argument and that the argument pointed to the right class, I started the jar via java -jar myjar.jar and read the stacktrace, which is much better than the popup-window.
In my case the error was, that the Main-Class could not be loaded due to another referenced class, which was not on the classpath. (i.e. it was not in the same jar-File and the manifest didn't include a Class-Path: argument.)
After adding the correct Class-Path: argument in the manifest, the problem went away.
I now have the following setup:
myjar.jar and somethirdparty.jar in the same directory.
myjar.jar contains a manifest which includes the lines
Class-Path: somethirdparty.jar
Main-Class: my.package.and.MainClassafter the normal Manifest-header. -
Java Virtual Machine. Could not find main class
I am trying to install Oracle Data Access Components ODAC 11g 11.1.0.6.21
on windows 2008. I get the dreaded could not find the main class. Program will ext.
I have seen all the post, tried installing every conceivable Java version, removed all java version.
Nothing works. Does anyone have THE solution for this on-going error?
ThanksI fixed my problem by installed Oracle 11g ODAC and Oracle Developer Tools for Visual Studio 11.1.0.7.20
-
The story is:
I have alot java class files under directory: c:\myproj\com\pin\sa
in each of the file, the package signature is: package com.pin.sa
Then I set the JavaVMInitArgs fVM_args; by setting the classpath to:c:\myproj
then I use: cls = (*fEnv).FindClass("com/pin/sa/frameWork") to find a class file called frameWork, but failed.
then i build a test file called test.class (it is just a simple file pls see below for the code)and put package com.pin.sa in it and put it in directory : c:\myproj\com\pin\sa, this means the test.class is under the same directory as the frameWork.class,
then I use cls = (*fEnv).FindClass("com/pin/sa/test"), and it SUCCEEDED!!!
I really don't understand why like this, they have same package signature and under same directory why different results.
In frameWork file, there are some imported packages, does this matter? And there is a static main() in it.
if you can give an example of how to set the classpath in JavaVMInitArgs fVM_args, and how to deal with the package signature, I will appreciate it very much
==test.java==
package com.pin.sa;
public class test
public void printHello()
System.out.println("Hello World from Java!");
cls = (*fEnv).FindClass("com/pin/sa/test");
cls = (*fEnv).FindClass("com/pin/sa/test");
C:\\myProj\\resiprocate\\myAnalysis\\sipphone\\sipXphone\\main\\softphone\\lib");Hi Hufuman,
What are the packages that you are using in frameWork Class. Add the class path to those classes also. Also check the name of the .class file is exactly the same as frameWork and not FrameWork or framework etc.
Check whether you have correctly given the package declaration in the frameWork class.
If you dont have any problem, post the frameWork class definition also here or atleast the packages imported and the classpath set for those referred packages.
Dhamo. -
Could not find "Attachment" class (DeliveryManager)
Hello,
I was trying to send email using Delivery Manager (java program) but getting error compiling the source code when adding sample line "Attachment m = new Attachment();". Below is an excerpt of the source code. I could not add "Attachment" function.
// create delivery manager instance
DeliveryManager delMgr = new DeliveryManager();
// create a delivery request
DeliveryRequest delReq = delMgr.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
// set email subject
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT, "test");
// set SMTP server host
delReq.addProperty(
DeliveryPropertyDefinitions.SMTP_HOST, "xxxx.mail.com");
// set the sender email address
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_FROM, "[email protected]");
// set the destination TO email address (required)
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS, getReportNotify(repID,"TO") );
// set the destination CC email address (optional)
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CC_RECIPIENTS, getReportNotify(repID,"CC") );
// set the content type of the email body
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE, "text/plain");
// set the document file name appeared in the email
//delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME, getReportTitle(repID)+rRequestID+".pdf");
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME, repID+".txt");
// set the document to deliver
//delReq.setDocument(OutFileName);
delReq.setDocument(msgDir+repID+".txt");
//create Attachment instance
Attachment m = new Attachment();
// pdf
m.addAttachment(OutFileName,getReportTitle(repID)+rRequestID+".pdf","application/pdf");
// attaching step
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_ATTACHMENT, m);
// submit the request
delReq.submit();
// close the request
delReq.close();
Here's the compilation error:
EBSEmailDelivery.java:33: cannot resolve symbol
symbol : class Attachment
location: class oracle.apps.xdo.ebsdelivery.EBSEmailDelivery
Attachment m = new Attachment();
^
Thanks in advance.Also, here's the list of classes imported in my java code:
import oracle.apps.xdo.delivery.DeliveryManager;
import oracle.apps.xdo.delivery.DeliveryRequest;
import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
import oracle.apps.fnd.common.AppsContext;
Not sure where to refer the "Attachment" class. Thanks. -
Used adobe uninst tool-error "could not find or admin priv needed" can anyone help?
cannot find any working sign of adobe reader, have tried several traditional ways of removal all end in same or similiar error mssg "could not locate, verify installation util or must be admin to perform. seeking solution
Try using the Windows Installer CleanUp Utility to remove it.
Maybe you are looking for
-
How do I set a breakpoint in a Java Server page (.jsp)?
I have set up an application for remote debugging and am able to connect to it from JDeveloper. When the code execution comes to breakpoints that I have set in java (.java) files they work and the application stops so I can debug etc. This also appli
-
HT3775 after installing Lion Mountain Plug-in is missing
After I installed Lion Mountain in my MacBook Pro my Plug-in is missing ? I have tryed the install defult thing but it did not work out.
-
How can i install two copies of bejewelled hd onto my iPad
How can i install two copies of Bejewelled HD onto my iPad
-
Disable data rate to a specific AP only?
Hello everyone, Im using Cisco 5508 with 7.0.220.0 code and I just wanted to know if its possible to disable some data rates to a specific group of APs and not affect the rest of the APs Another question is about almost the same thing but related to
-
I am running a test on multiple devices, I have created a program and it print the frontpage of labview automaticlly using a PDF printer. CutePDF I have a copy of the report i made in EXCEL or .csv form. It doesnt look like the same pdf page i print