Search Results

Search found 818 results on 33 pages for 'applet'.

Page 3/33 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Restrict file access from PHP -> Java Applet

    - by aliuy
    I'm writing a portal in PHP that allows users to upload DICOM images, and allow users of the same group to view those DICOM images through a Java Applet. The html code to display images through the viewer looks like this: <APPLET archive=radscaper.jar codebase=./ code=com.divinev.radscaper.Main.class width=100% height=100%> <PARAM NAME=Config VALUE=config.xml> <PARAM NAME=DicomImg1 VALUE="relative_path1/image1.dcm"> </APPLET> So the generated html passes in a file url to the java applet. The problem I'm facing is - files would be stored in a public directory and easily accessed by anyone knowing the file url. Is there a way I can restrict file access to a certain user group?

    Read the article

  • java applet communication port

    - by udhaya
    Communication ports: Change a given class in an applet in that way, that browser-defined proxy-configuration files can be used for applet communication with serve(upload method). i.e browser communicate via port 8080 or via ssl(443) - applet should also communicate by this port automatically. In the given method port 80 is hardcoded. -- please give some code or program for this..

    Read the article

  • Applet tag error

    - by Yvan JANSSENS
    Hi, I'm getting a FileNotFound error when I try to include my applet. It tries to include a .class file, while I provide a .jar file. Here's the java console output: at java.lang.Thread.run(Thread.java:637) Caused by: java.io.FileNotFoundException: /Users/yvanjanssens/NetBeansProjects/yBlackJack/yBlackJackApplet.class (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) And here's my Applet code: <applet code="yBlackJackApplet" archive="yBlackJack.jar" width="100%" height="100%" > </applet> Thanks! Yvan

    Read the article

  • export a JOGL applet and embedd into a html page

    - by nkint
    hi guys it is some time that i'm testing opengl with java and JOGL. now i have good result and i wanto to pubblish it on web. but i have some problem. i'm in eclipse, and i'm testing an Applet with JOGL. first of all i have this run time error (but the program works correctly): java.lang.IllegalArgumentException: adding a window to a container at java.awt.Container.checkNotAWindow(Container.java:431) at java.awt.Container.addImpl(Container.java:1039) at java.awt.Container.add(Container.java:365) at AppletHelloWorld.init(AppletHelloWorld.java:30) at sun.applet.AppletPanel.run(AppletPanel.java:424) at java.lang.Thread.run(Thread.java:619) then i found this incredibly clear page and i do what is said, i open html with the browser, the libs are downloaded but it stops at "Starting applet AppletHelloWorld" that is the name i gave to my applet. mayebe i miss something like main function or exporting well the jar? this is my main code: public class AppletHelloWorld extends Applet { public static void main(String[] args) { JFrame fr=new JFrame(); fr.setBounds(0,0,1015,600); fr.add(new AppletHelloWorld()); fr.setVisible(true); } public void init() { setLayout(null); MyJOGLProject canvas = new MyJOGLProject(); //MyJOGLProject extends JFrame canvas.run(); Container c = new Container(); c.add(canvas); add(c); } //....

    Read the article

  • Problem processing large data using Applet-Servlet communication

    - by Marquinio
    Hi everyone. I have an Applet that makes a request to a Servlet. On the servlet it's using the PrintWriter to write the response back to Applet: out.println("Field1|Field2|Field3|Field4|Field5......|Field10"); There are about 15000 records, so the out.println() gets executed about 15000 times. Problem is that when the Applet gets the response from Servlet it takes about 15 minutes to process the records. I placed System.out.println's and processing is paused at around 5000, then after 15 minutes it continues processing and then its done. Has anyone faced a similar problem? The servlet takes about 2 seconds to execute. So seems that the browser/Applet is too slow to process the records. Any ideas appreciated. Thanks.

    Read the article

  • Loading Java applet from WEB-INF/classes by JSP

    - by Bruce
    Hi guys, Ive got a problem with loading an applet from WEB-INF/classes directory. The main class of an applet (MainApplet.class) is there in the package aaa, but when loading I got the exception java.lang.ClassNotFoundException. Where am I wrong? My jsp is in Web Pages dir. < jsp:plugin type="applet" code="aaa/MainApplet.class" jreversion="1.6" width="700" height="500" Thanks in advance for the reply!

    Read the article

  • Can't read AppletViewer properties file - Applet

    - by White rose
    I have create a java applet program and compiled, it generates a class file. while running the applet viewer in command prompt it shows a following warning message. D:\Applets\Appletsappletviewer FirstApplet.java Warning: Can't read AppletViewer properties file: C:eswaran_s.VMSPL.hotjava\properties Using defaults. After I have run this command once again, it does not shows a warning messsage but the applet viewer is not running. How can I solve this issue?

    Read the article

  • protecting applet code against hackers

    - by CodeMed
    I have a Java application that I am considering releasing over the web as an applet. I am concerned about java-savvy end users being able to somehow view the source code, given that my web server would be sending the code to their remote jvm when they try to use the applet. What precautions can be taken to ensure that end users are never able to directly view source code of an applet? I am hoping that release as an applet might somehow protect the privacy of the code more than releasing an application with downloadable jars that the user could just unzip. Is this true?

    Read the article

  • Java Applet Console

    - by Jivings
    Can anyone tell me how to access the Java Applet Console in Chromium for Linux? I assumed there would be a Java application packaged with the JRE that would give me access through the command line, but I can't find reference to anything. $ java -version java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.2) (ArchLinux-6.b24_1.11.2-1-i686) OpenJDK Client VM (build 20.0-b12, mixed mode)

    Read the article

  • How do I install sensors-applet?

    - by honestann
    I want to install sensors-applet onto my Ubuntu 12.04 computer. The instructions on this (and other) webpages says to enter this command in a command terminal: sudo apt-get install sensors-applet This is a gnome applet and gnome isn't exactly obscure. Why can sensors-applet package not be found? Before you say "no", note that I was able to execute "gnome-panel" to add a bar/panel along the bottom of my desktop, add 8 cpu-frequency applets to the bar (one per CPU core), and add gnome-panel to my startup applications. So I've already done the basics, and believe all I need now is to be able to download and install the sensors-applet to have that temperature applet available on the panel too. See here.

    Read the article

  • terminating java applet thread on page unload

    - by Hammad Tariq
    Hello, I have got a problem here in terminating the threads. The problem is that I am using applet thread to access JS DOM and manipulate innerHTML of a span to right the Thread Name as the innerHTML. It works fine until I keep refreshing the page but if I dont give it a sleep of like 200ms and go to another page which dont have any applet on it, it will give me an error in firebug console: document.getElementById("userName") is null What I am suspecting is, although I send an interrupt on stop and I have also tried the same by setting a flag variable of running in run while loop, the thread executes much faster than the time JVM takes to unload it and I get my page changed in browser but applet is still trying to find an element with id userName. Is that true? Is there any work around of it? Is there any way to know how many threads are running at the moment? Is there any kill all command to send on destroy()? I have searched a lot, seen all the API of java threads and applets, couldn't get this to work. Below is the code: import java.applet.Applet; import netscape.javascript.*; //No need to extend JApplet, since we don't add any components; //we just paint. public class firstApplet extends Applet { /** * */ private static final long serialVersionUID = 1L; firstThread first; boolean running = false; public class firstThread extends Thread{ JSObject win; JSObject doc; firstThread second; public firstThread(JSObject window){ this.win = window; } public void run() { try{ System.out.println("running... "); while (!isInterrupted()){ doc = (JSObject) win.getMember("document"); String userName = Thread.currentThread().getName(); //String userName = "John Doe"; String S = "document.getElementById(\"userName\").innerHTML = \""+userName+"\";"; doc.eval(S); Thread.sleep(5); } }catch(Exception e){ System.out.println("exception in first thread... "); e.printStackTrace(); } } } public void init() { System.out.println("initializing... "); } public void start() { System.out.println("starting... "); JSObject window = JSObject.getWindow(this); first = new firstThread(window); first.start(); running = true; } public void stop() { first.interrupt(); first = null; System.out.println("stopping... "); } public void destroy() { if(first != null){ first = null; } System.out.println("preparing for unloading..."); } } Thanks

    Read the article

  • GWTAI applet integration in GWT problem

    - by andy
    Hi everybody. I'm working with gwtai to integrate a java applet into my gwt - project. Basic communication from my main application to the applet (such as invoking simple methods that return int or boolean values) works. But the main reason why I need to integrate this applet is, that I need it to connect to another server and receive a answer and pass it to my gwt-application. So there's one basic method in the applet: public String SendAndReceive(String host, int sendPort, int receivePort, String query) that connects to the server, receives an answer and returns this answer as a string. When I now try to invoke this method like this: applet.SendAndReceive("0.0.0.0", 9099, 2000, "show streams;"); I constantly run into following error (full error message at the end): com.google.gwt.core.client.JavaScriptException: (String): Error calling method on NPObject! [plugin exception: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)] I couldn't find a solution (for gwtai is a quite uncommon topic), what I found out (and what the Exception let's one assume) is, that there's a security problem - maybe because I'm connecting to another server. I also read something about browser's Single Origin Policy, what would point in the same direction...up to now I have never worked with java applets. So if someone has a solution or a hint I would be very thankful. If more code is helpful I can give. Thanks, Andy the full error message: 21:03:49.864 [ERROR] [follovizergwt] Unable to load module entry point class follovizer.gwt.client.FolloVizerGWT (see associated exception for details) com.google.gwt.core.client.JavaScriptException: (String): Error calling method on NPObject! [plugin exception: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)]. at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at follovizer.gwt.client.AnduINAppletImpl.SendAndReceive(AnduINAppletImpl.java) at follovizer.gwt.client.FolloVizerGWT.createLayout(FolloVizerGWT.java:92) at follovizer.gwt.client.FolloVizerGWT.onModuleLoad(FolloVizerGWT.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619)

    Read the article

  • SWT applet: swt-win32-3650.dll already loaded in another classloader

    - by kilonet
    I have multiple pages with java applet written with SWT. The problem is, applet loads only on first page, to load it on another page i need restart browser, otherwise i get following error: Exception in thread "Thread-27" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-win32-3650 in java.library.path no swt-win32 in java.library.path Native Library C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32-3650.dll already loaded in another classloader C:\Documents and Settings\xxx\Local Settings\Temp\swtlib-32\swt-win32.dll: %1 is not a valid Win32 application at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.C.<clinit>(Unknown Source) at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source) I wonder, how can I unload swt dlls when browser page with applet is closed?

    Read the article

  • "java.security.AccessControlException: access denied" executing a signet Java Applet

    - by logoff
    I have a little Java Applet and I have an annoying issue. I have signed my JAR with my own keystore using jarsigner tool (following these instructions). The Java Applet downloads a signed JAR and tries to launch it with an extended class of URLClassLoader. This JAR tries to execute this line of code: ClassLoader.getSystemClassLoader().getResource("aResource"); It fails with a large stack trace finished by: Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) at java.security.AccessController.checkPermission(AccessController.java:555) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.Thread.getContextClassLoader(Thread.java:1451) ... 21 more When the Java Applet is launched, the user is prompted to accept the certificate if he/she trusts the publisher: Even if I accept it, the exception occurred. Even if I install the certificate, and the prompt message is automatically accepted, the exception occurred. Any help would be appreciated!

    Read the article

  • SELinux, Fedora, and Trusted Applet crashing?

    - by Stefan Kendall
    For some reason, if I run Firefox 3.5.x under Fedora 11 with SELinux enabled, my browser crashes when I attempt to embed the applet dynamically. Under Windows, Ubuntu, and Mac, the user is prompted to trust the signer and then trust the executing java applet, but under Fedora, I never see this prompt. If I disable SELinux, I get NO prompting, and the applet embeds without any notice whatsoever! Remembering that trusted applets can execute user programs and manipulate user data, this becomes quite a nightmare. Has anyone else had to deal with SELinux and Fedora/SuSE/Linux and trusted applets before? If so, how did you overcome this broken behavior?

    Read the article

  • Loading all files in a directory in a Java applet

    - by WarrenB
    How would one go about programatically loading all the resource files in a given directory in a JAR file for an applet? The resources will probably change several times over the lifetime of the program so I don't want to hardcode names in. Normally I would just traverse the directory structure using File.list(), but I get permission issues when trying to do that within an applet. I also looked at using an enumeration with something line ClassLoader.getResources() but it only finds files of the same name within the JAR file. Essentially what I want to do is (something like) this: ClassLoader imagesURL = this.getClass().getClassLoader(); MediaTracker tracker = new MediaTracker(this); Enumeration<URL> images = imagesURL.getResources("resources/images/image*.gif"); while (images.hasMoreElements()){ tracker.add(getImage(images.nextElement(), i); i++; } I know I'm probably missing some obvious function, but I've spent hours searching through tutorials and documentation for a simple way to do this within an unsigned applet.

    Read the article

  • Using java applet to send request with the client ip

    - by mike
    hi, i need to send a request to a website when a user submits their url, i tried using curl but it uses server ip which i dont want i have seen a website that is doing a similar job by using applet, users need to open a popup which contains the applet after they leave it open allow it to run it uses a port and then uses the localhost ip like so 127.0.0.1:64653 to send request and basicly curl by the user ip. i decompiled the applet the website was using and they were using java.net.ServerSocket and some other java code but i do not know anything about java. I would to know how this can be done.

    Read the article

  • Applet User-agent

    - by Jonathan Barbero
    Hello! This is a simple question, but I didn´t found any documentation about this. When an applet makes a request, how is the user agent of the request. I want to know the applet user-agent expression to detect if a request comes from an applet. I make two test, with IE7 and Firefox 3.0.5 with JDK 1.6.0_03 and the user agent was "Mozilla/4.0 (Windows 2003 5.2) Java/1.6.0_03" in both, but I can´t generalize from two test. Thanks in advance, Jonathan.

    Read the article

  • add gtk.widget in a gnome Applet

    - by dominos
    Hi, I have a question : I write a little gnome applet, and when we click on a button i want to add a gtk.widget under the "gnome-panel" like the calendar of the clock-applet. But I don't know how to do this. It's my code : listButton = gtk.Button(_("lastest")) self.listTwitt = gtk.TreeView() mainLayout = gtk.VBox() mainLayout.pack_start(listButton) mainLayout.pack_start(self.listTwitt) self.applet.add(mainLayout) With this code, when i click on the button, the list shows up in the gnome panel : it's because I add it in the mainLayout. So how do I add it under the "gnome-panel". Thanks

    Read the article

  • Applet in client-server infrastructure

    - by Andrey
    Hello! I have a general question concerning client-server design. We have a Java server with Spring, a GWT client program and some HTTP-servlets for our site. At the moment we also want to develop an applet which would communicate with that server in such a way GWT-client and site requests do. Is it a good idea to communicate with the server from applet by RMI? I.e. to create some Remote services, register them with Spring and call them from applet? Thanks in advance!

    Read the article

  • How to fix the position of the button in applet

    - by user1609804
    I'm trying to make an applet that has a buttons in the right, where each button is corresponding to a certain pokemon. I already did it, but the buttons isn't fixed.they keep following the mouse. please help. This is my code: import javax.swing.*; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; import java.applet.*; import java.awt.event.*; import java.awt.*; public class choosePokemon extends Applet implements ActionListener { private int countPokemon; private int[] storePokemon; private int x,y; //this will be the x and y coordinate of the button BufferedImage Picture; public int getCountPokemon(){ //for other class that needs how many pokemon return countPokemon; } public int[] getStoredPokemon(){ //for other class that needs the pokemon return storePokemon; } public void init(){ x=0;y=0; try{ Picture = ImageIO.read(new File("pokeball.png")); } catch( IOException ex ){ } } public void paint( Graphics g ){ pokemon display = new pokemon(); // to access the pokemon attributes in class pokemon ButtonGroup group = new ButtonGroup(); //create a button group for( int a=0;a<16;a++ ){ // for loop in displaying the buttons of every pokemon(one pokemon, one button) display.choose( a ); //calls the method choose in which accepts an integer from 0-15 and saves the attributes of the pokemon corresponding to the integer JButton pokemonButton = new JButton( display.getName() ); // creates the button pokemonButton.setActionCommand( display.getName() ); // isasave sa actioncommand yung name ng kung ano mang pokemon pokemonButton.addActionListener(this); //isasama yung bagong gawang button sa listener para malaman kung na-click yung button pokemonButton.setBounds( x,y,50,23 ); group.add( pokemonButton ); //eto naman yung mag-aadd sa bagong gawang button sa isang group na puro buttons(button ng mga pokemon) y+=23; if( a==7 ){ x+=50; y=0; } add( pokemonButton ); //will add the button to the applet } g.drawImage( Picture, 120, 20, null ); } public void actionPerformed(ActionEvent e) { try{ //displays the picture of the selected pokemon Picture = ImageIO.read(new File( "pokemon/" + e.getActionCommand() + ".png" )); } catch( IOException ex ){ } } public boolean chosen( int PChoice ){ //this will check if the chosen pokemon is already the player's pokemon boolean flag = false; for( int x=0; x<countPokemon && !flag ;x++ ){ if( storePokemon[x]==PChoice ){ flag = true; } } return flag; }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >