Problem accessing classes when moved into another jar

Hi,
I have written some classes and want to put them in an external jar
as a library. However, when I do this, I have to include the full path
for them to work- what am I doing wrong? I am using JBuilder6
Example:-
I have a class called LogWriter in package org.MyClasses.utils which I
am using in a class in another package (com.MyCode). If they are all in
my src directory it works fine and I import org.MyClasses.utils
If I compile org.MyClasses into a jar and add the jar as a library, I can
see the classes with CodeInsight (so I know they are there). However, the line
Logwriter.writeLog() ; (call to static method), which used to work, now only works
if I change it to org.MyClasses.utils.Logwriter.writeLog() ;
Any advice?
MArk

If the class was called MyWriter and is in org.MyClasses.utils, I have to replace all instances of MyWriter with org.MyClasses.utils.MyWriter.
MyWriter has not altered in any way. It's now compiled separately and put into another jar rather than all classes being comipled at the same time.
MArk

Similar Messages

  • [svn] 4492: Simplified how an accessibility class gets hooked into its corresponding component class .

    Revision: 4492
    Author: [email protected]
    Date: 2009-01-12 14:47:10 -0800 (Mon, 12 Jan 2009)
    Log Message:
    Simplified how an accessibility class gets hooked into its corresponding component class.
    We now do the hooking in the static method enableAccessibility(), which is called by code that is autogenerated by the compiler. Previously this method did nothing and the hooking happened at static initialization time. This allows us to remove the static var accessibilityHooked and the static method hookAccessibility() in each accessibility class.
    QE Notes: None
    Doc Notes: None
    Bugs: None
    Reviewer: Deepa and Alex
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl. as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBoxAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as

    Was it really necessary to post the whole API description?!?
    Locale[] locales = Locale.ENGLISH();ENGLISH is not a method in class Locale, so do not add the braces "( );".
    Also, the constant ENGLISH is not an array, but just a single Locale object.
    You didn't say what your problem was. What do you want to achieve with your program and what is it that you don't understand?

  • Stop Video when moving to another "state"?

    Hello,
    I am not sure if this is a Flash Builder topic or a Flash Catalyst topic or I am guessing it is both.
    I  have a Catalyst that contains multiple flv clips. I am discovering that  when you play a video and then you decide to navigate to another  "state" or "location" in my case, that the video pauses. If you then  return to that state the video will start back up where it was paused.
    I am trying to figure out how to tell the program to stop all or any flv when moving to another state.
    Any help here would be great.
    Thank you.

     

  • 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

  • Weird: Backup file works fine from the network but not when moved into sandbox environment

    We have a valid full backup of a database. We know it is valid, we have restored it twice from the network with no problems, but we do not have access to the network location from our sandbox environment.
    The .bak file is sizable at about 9GB. The .bak file resides on our internal network, in a SAN drive. No problems there. When we copy the file from there into a sandbox environment to attempt the restore in the sandbox environment it gets corrupted. We've
    tried three different times and all three different times it gets corrupted. First time we copied the file over to the sandbox the restore went up to 50% and failed. The second time we copied the file again and attempted the restore again it failed at 70%.
    The third time it failed at 60%. The error message we get during the restore is "...Read on ... failed: 13(The data is invalid) Msg 3013, Level 16, State 1, Line 1 Restore database is terminating abnormally."
    Now some background here. To move the file our network team is doing this: they have this .vmdk file that they mount out in our production environment (which has access to the network location where the .bak file is), copy the file into the drive, then move
    the .vmdk file into the sandbox environment(which does not have access to the network location), mount the drive in the sandbox environment, and then I have access to the .bak file from within the sandbox environment.
    Something in the process of using the .vmdk file to move the .bak file from production into the sandbox is causing the file to get corrupted.
    Any thoughts? Has anyone seen this before? Any idea? TIA,
    Raphael
    rferreira

    Original server that generated the .bak file:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) 
    Jun 11 2012 16:41:53 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    Server where I CAN restore the .bak file from the network location (not inside the sandbox):
    Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) 
    Dec 28 2012 20:23:12 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    Server inside the sandbox where I get the error when attempting to restore the backup:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64)   Jun 11 2012 16:41:53   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 
    rferreira

  • Textbox shows xml text in working file but now when loaded into another SWF

    Hi all,
    I have downloaded an xml gallery (as2) as we needed one for an old as2 file. Now I mostly use as3 but thought as I only needed to tweak it there would be no probs. Of course, it rarely works out that way. The problem is, text loaded from the xml file is displayed with its corresponding image. This works fine in the file. When I load the SWF into another SWF however, it all works EXCEPT the text doesn't show at all?? Whoever made the gallery used 'device fonts' in the textbox, I don't know if this has anything to do with it. I tried changing the textbox to dynamic and embedding characters but still nothing.
    This seems the key line -
    _root.descmc.desc.htmlText = XMLdaten[number];
    I have also tried
    _root.descmc.desc.htmlText = XMLdaten[number].firstChild;
    This traces out the correct xml data when tested so it is finding it okay.
    Any help would be much appreciated.
    Thanks

    The problem might be in the use of the "_root"  You probably need to set _lockroot = true; in the loaded swf, otherwise the _root is that of the loading swf, not the loaded one.

  • E-mail changes to unreadable text when moved to another mailbox folder

    Hi,
    when moving a correct received e-mail to another mailbox folder, the mail and the attachment will change to unreadable text and it looks like the column below.
    On my iPad and iPhone the mail and the attachment is shown correct. If I forward it to my own account again, the mail is also correct shown an my imac27, as long as it resides in the in-box.
    On the other hand, there are lots of mails+attachments with "normal" behavier when moved.
    Any idea about that?
    mackliko
    ------=_NextPart_000_0001_01CCF256.3C7DD310
    Content-Type: multipart/alternative;
              boundary="----=_NextPart_001_0002_01CCF256.3C7DD310"
    ------=_NextPart_001_0002_01CCF256.3C7DD310
    Content-Type: text/plain;
              charset="us-ascii"
    Content-Transfer-Encoding: 7bit
    ------=_NextPart_001_0002_01CCF256.3C7DD310
    Content-Type: text/html;
              charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable
    <html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
    xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
    xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
    xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
    xmlns=3D"http://www.w3.org/TR/REC-html40">
    <head>
    <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
    charset=3Dus-ascii">
    <meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
    <style>
    <!--
    /* Font Definitions */
    @font-face
              {font-family:"Cambria Math";
              panose-1:2 4 5 3 5 4 6 3 2 4;}
    @font-face
              {font-family:Calibri;
              panose-1:2 15 5 2 2 2 4 3 2 4;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
              {margin:0cm;
              margin-bottom:.0001pt;
              font-size:11.0pt;
              font-family:"Calibri","sans-serif";}
    a:link, span.MsoHyperlink
              {mso-style-priority:99;
              color:blue;
              text-decoration:underline;}
    a:visited, span.MsoHyperlinkFollowed
              {mso-style-priority:99;
              color:purple;
              text-decoration:underline;}
    span.E-MailFormatvorlage17
              {mso-style-type:personal-compose;
              font-family:"Calibri","sans-serif";
              color:windowtext;}
    .MsoChpDefault
              {mso-style-type:export-only;}
    @page Section1
              {size:612.0pt 792.0pt;
              margin:70.85pt 70.85pt 2.0cm 70.85pt;}
    div.Section1
              {page:Section1;}
    -->
    </style>
    <!--[if gte mso 9]><xml>
    <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <o:shapelayout v:ext=3D"edit">
    <o:idmap v:ext=3D"edit" data=3D"1" />
    </o:shapelayout></xml><![endif]-->
    </head>
    <body lang=3DDE-AT link=3Dblue vlink=3Dpurple>
    <div class="3DSection1">
    <p class="3DMsoNormal">Mfg<o:p></o:p></p>
    <p class="3DMsoNormal">Martin lanzinger<o:p></o:p></p>
    <p class="3DMsoNormal"><o:p> </o:p></p>
    </div>
    </body>
    </html>
    ------=_NextPart_001_0002_01CCF256.3C7DD310--
    ------=_NextPart_000_0001_01CCF256.3C7DD310
    Content-Type: application/pdf;
              name="Test.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
              filename="Test.pdf"

    Please run /cleanviews switch to check the result.
    (Type "Outlook.exe /cleanviews in Windows search bar and press ENTER.)
    Please also create a new Outlook profile to check if the issue still persists. Thanks.
    Tony Chen
    TechNet Community Support

  • Problem in include library files into my jar file

    i am new to this jar archiving...I have created a GUI with java swings..and i also use mysql driver to connect my database now i want to make an executable jar file for my GUI..with coonector i have done the following
    I have compiled my program and placed all the .java and .class files in
    c:\ java\ bin\ jarexample
    next i created a manifest file called mainClass.txt which contains
    Main-Class: AppletMain (where AppletMain is my mainclass).. I placed this txt file also in c:\ java\ bin\ jarexample
    i m also set Class-path in manifest file Class-Path: mysql-connector-java-3.1.10-bin.jar
    next i ran jar cmf mainClass.txt example.jar *.class mysql-connector-java-3.1.10-bin
    With this line, I told jar to create a JAR file (option c) with modifications to the manifest file (option m) as specified within mainClass.txt, naming the JAR file (option f) as example.jar and including everything that matches the pattern *Class and mysql connector
    now my problem is ...my MYSQL connection need some Library files from a package called org and class Driver.class to generate connection I include this library files also in my example.jar....
    But when i execute this jar file using :java -jar example.jar
    this is executed BCOZ tha example.jar file use mysql-connector-java-3.1.10-bin.jar file from system.
    If i m this mysql-connector-java-3.1.10-bin.jar file from system from system then it is not run.
    Can anyone please tell me how can i include this library file to my jar file( ie example.jar)
    Thankyou

    Double post. Please post replies on the other thread.
    http://forum.java.sun.com/thread.jspa?threadID=656781&tstart=0

  • How to ensure I don't lose songs on iPhone (Match music) when logging into another account

    Hi all,
    I hope I get some answers here, I'm struggling with an issue I've been having.
    I have my songs set up through iTunes match, which is fine.
    However the issue I have had is when I sign OUT of my account and into another (to update an app or such) I've had issues where the songs that were previously on my phone get deleted.
    While I sort of understand that, at the same time when I'm just signing out for a few minutes, to lose that and have to download multiple gigs of music AGAIN and AGAIN is beyond irritating. I know the easy answer Is to just not sign out, but I want to have that flexibility if I need to.
    Is there anything I can do here?  Any help would be greatly appreciated.
    Nick

    Oka, another question I have then, which is frustrating me beyond belief, is why, if is Tay logged into my match account, songs are oftentimes deleted from my phone?
    I have a playlist of "new" music that has about 600 songs in it. That playlist will randomly dump hundreds of songs, leaving them to show available for download from match, but they are removed without me having deleted them.
    Now, 2 things happen on my main PC where I set up match. The first is that randomly, with little fanfare, match will just shut itself off. No explanation, just stops.
    The next is that I have multiple iTunes accounts and in order to update the apps in those accounts, I have to sign into another account, update, and then sign back in. Each time I have to turn match back on, which I do. It takes all of 2 minutes and according to a less than scientific test I just did, it doesn't seem to cause song deletion from my phone by doing this.
    I'm getting very frustrated that a service I pay for, while being somewhat convenient from time to time, is causing nothing but problem upon problem. I can't be the only person juggling multiple iTunes accounts on each device, can I? =\

  • Java can't find main class when manifest has certain JARs on it

    I recently wrote an Ant script that builds my application and jars it up, creating a manifest in the process. The manifest specifies the main class and a classpath that mentions other jars that exist in the same directory. Everything works as expected and I am able to run the program using "java -jar abc.jar".
    However, I recently started using classes in my program that come from a jar that should (according to the company I work for) reside in a central location rather than each application having its own copy. So, I changed my build script to reference those shared jars in a common location. But now when I run "java -jar abc.jar", I get a java.lang.ClassNotFoundException: com.example.Main. If I edit the jar's manifest and manually remove the new jars from the classpath, the ClassNotFoundException error goes away (although obviously that causes other problems.) Is there something about adding those new jars to the manifest classpath that would prevent Java from finding my main class? My manifest looks something like this and the last two jars (the ones with the absolute paths) are the jars that seem to be the root of the problem.
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_04-b05 (Sun Microsystems Inc.)
    Main-Class: com.uprr.app.rsa.Main
    Class-Path: acegi-security-1.0.6.jar commons-codec-1.4.jar commons-htt
    pclient-3.1.jar commons-lang-2.4.jar commons-logging-1.1.1.jar common
    s-pool-1.5.4.jar dom4j-1.6.1.jar jakarta-oro-2.0.8.jar jaxen-1.1.1.ja
    r jibx-run-1.2.1.jar joda-time-1.6.jar jsr173_1.0_api.jar log4j-1.2.1
    5.jar opensaml-1.1.jar spring-2.5.2.jar stax-api-1.0.1.jar wstx-asl-3
    .2.9.jar xmf-3.0.2.jar xmlsec-1.4.1.jar C:\software\tibco\ems\clients
    \java\jms.jar C:\software\tibco\ems\clients\java\tibjms.jarAny ideas?
    Brandon

    I still don't know why giving the absolute classpath entry like that would cause Java to be unable to find the jar's main class, but I did make an interesting discovery. If I give the absolute path without the drive letter, is able to find the main class again. Something like this won't work...
    Class-Path: C:\software\tibco\ems\clients\java\tibjms.jarBut something like this will...
    Class-Path: \software\tibco\ems\clients\java\tibjms.jarBut I'd still like to know why Java doesn't accept drive letters when running on a Windows machine. After all, what if my manifest needed to reference a jar that was on a different drive, like a network drive (since this whole problem came up as a result of shared common jars that need to exist outside of the project.)

  • I have lost my facetime option when moved to another country. pls suggest how can i get it back

    Hi ,
    Recenlty i have bouhgt  new iphone5s from middle east . When i was using the phone over there the facetime was working perfect for me .
    Now when i moved to another country i can not see the facetime option in the iphone .
    Could you pls suggest how can i get it back .

    Hi Stedman ,
    Thanks for the information !!
    I have checked the article and i can clear see that my Wireless carrier support the facetime feature
    so what could be the reason am not able to use the facetime option .

  • 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 advance

    Dear 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

  • HT1365 just installed a new wireless router (cisco linkseys E1200) and our apple laptops connect fine on one floor but lose connectivity when moved to another.  Other non apple laptops & Ipad connect with no problem no matter what floor they are on

    We just installed a new wireless router to our main PC.  It's a Cisco Linkseys E1200.  All other wireless devices were able to connect without a problem, including my Ipad.  We have 2 Macbook Pro laptops.  They both connect just fine when on the same floor of our house as the router, but when we take them upstairs to the 2nd floor of the house, they lose connectivity and it states the wireless password is not the correct password.  All other 2nd floor laptops have no problem at all with connectivity no matter where they are in the house.  Please help- my husband is on the verge of selling Apple if that cannot be remedied. 

    This would not be a security issue symptom. I would consider checking for sources of wireless interference HT1365
    Trying changing the radio channel on your wireless network.

  • Java.security.AccessControlException: access denied when loading from a jar

    Hello!
    I am trying to deploy an applet into a browser but I have encountered a security problem.
    The name of the applet is SWTInBrowser(not exactly mine, it's an example from the web).
    package my.applet;
    import org.eclipse.swt.awt.SWT_AWT;
    import java.applet.Applet;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.Canvas;
    import org.eclipse.swt.widgets.Shell;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.widgets.Listener;
    import org.eclipse.swt.widgets.Event;
    import org.eclipse.swt.graphics.Point;
    import org.eclipse.swt.layout.FillLayout;
    public class SWTInBrowser extends Applet implements Runnable{
         public void init () {
               /* Create Example AWT and Swing widgets */
               java.awt.Button awtButton = new java.awt.Button("AWT Button");
               add(awtButton);
               awtButton.addActionListener(new ActionListener () {
                public void actionPerformed (ActionEvent event) {
                 showStatus ("AWT Button Selected");
               javax.swing.JButton jButton = new javax.swing.JButton("Swing Button");
               add(jButton);
               jButton.addActionListener(new ActionListener () {
                public void actionPerformed (ActionEvent event) {
                 showStatus ("Swing Button Selected");
               Thread swtUIThread = new Thread (this);
               swtUIThread.start ();
              public void run() {
               /* Create an SWT Composite from an AWT canvas to be the parent of the SWT
              widgets.
                * The AWT Canvas will be layed out by the Applet layout manager.  The
              layout of the
                * SWT widgets is handled by the application (see below).
               Canvas awtParent = new Canvas();
               add(awtParent);
               Display display = new Display();
               Shell swtParent = SWT_AWT.new_Shell(display, awtParent);
    //           Display display = swtParent.getDisplay();
               swtParent.setLayout(new FillLayout());
               /* Create SWT widget */
               org.eclipse.swt.widgets.Button swtButton = new
              org.eclipse.swt.widgets.Button(swtParent, SWT.PUSH);
               swtButton.setText("SWT Button");
               swtButton.addListener(SWT.Selection, new Listener() {
                public void handleEvent(Event event){
                 showStatus("SWT Button selected.");
               swtButton.addListener(SWT.Dispose, new Listener() {
                public void handleEvent(Event event){
                 System.out.println("Button was disposed.");
               // Size AWT Panel so that it is big enough to hold the SWT widgets
               Point size = swtParent.computeSize (SWT.DEFAULT, SWT.DEFAULT);
               awtParent.setSize(size.x + 2, size.y + 2);
               // Need to invoke the AWT layout manager or AWT and Swing
               // widgets will not be visible
               validate();
               // The SWT widget(s) require an event loop
               while (!swtParent.isDisposed()) {
                if (!display.readAndDispatch()) display.sleep ();
    }It works perfectly in the Applet Viewer, but not in the browser. In the browser, I only get two buttons working, the SWT button doesn't appear, because of this error:
    Exception in thread "Thread-21" java.lang.ExceptionInInitializerError
         at org.eclipse.swt.widgets.Display.<clinit>(Display.java:130)
         at my.applet.SWTInBrowser.run(SWTInBrowser.java:52)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
         ... 3 moreI have exported the application in a jar, and in that jar I have put the swt.jar that the application need for the displaying of the third button, swt button.
    Here is also the HTML file:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
        <title>
          Test
        </title>
      </head>
      <body>
        <p>
              <applet code="my.applet.SWTInBrowser"
                        archive="Test.jar"
                        width="1400" height="800">
              </applet>
        </p>
      </body>
    </html>Could anyone please help me solve this problem?

    This is in reply to the first post. I don't know what happened after.
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    If you read the above trace from bottom to top, it shows none of you classes, only classes from that Eclipse library, which seems to loadLibrary() a native DLL. In order to do this, it needs to call System.getProperty( "sun.arch.data.model" ). This call is not allowed from un unsigned applet. So I guess you need to sign the applet and this problem will go away. Many other problems may follow. Just read very very carefully all the related documentation, which I did not.

  • Problem Accessing Class in my package from jsp file

    Hi,
    I am using Apache tomcat server and i have made package which contains a class for database connection. I have imported this package in my jsp file but when i run the jsp tomcat gives the class not found exception. i have placed the jsp file in /webapps/my_project/ folder and the package in the /webapps/my_project/WEB-INF/classes/ folder.
    Still its not working.
    Please help me out!!!!!!!!

    hi,
    Thanks for ur reply. You have guessed it right, i dont have a .jar file its a .class file in a package subfolder. I have tried out ur suggestion but it didnt work. The following error i shown when i run it.
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\Apache Tomcat 4.0\work\localhost\_\College\test$jsp.java:4: Package college_lib not found in import.
    import college_lib.*;
    ^
    1 error, 1 warning
    Here, College_lib is the package name which contains the class my class file
    Is there any problem with my Apache Tomcat4.0 or any other thing.
    Message was edited by:
    Despo

Maybe you are looking for