简体   繁体   English

JavaWebStart以及图像和文件之类的资源

[英]JavaWebStart and resources like images and files

I have a doubt. 我有个疑问。 I am using javawebstar in a swing project. 我在一个swing项目中使用javawebstar。 In my app i have some images that I use to improve the design and a file .xls to show a report. 在我的应用程序中,我有一些图像可以用来改进设计,还有一个.xls文件来显示报告。 I am using the method getClass().getResource("") to locate the images and I realized that my app try to find the resource in the web server using something like this: jar:http://www... . 我正在使用getClass().getResource("")来定位图像,并且我意识到我的应用程序尝试使用以下内容在Web服务器中查找资源:jar:http:// www ...。 I thought that all resource would be sought in the local computer where the app was installed. 我认为所有资源都将在安装该应用程序的本地计算机中查找。 Am I doing something wrong? 难道我做错了什么?

The app. 该应用程序。 will download the resources when needed and cache them on the local disks. 将在需要时下载资源并将其缓存在本地磁盘上。

For security reasons the URL shown in the console will always point to the server , even for a trusted app. 出于安全原因 ,即使对于受信任的应用程序,控制台中显示的URL也将始终指向服务器 for which all the resources are cached. 为其缓存所有资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将放置在war中的UI资源(如CSS,Images和Js文件)用作放置在单独war中的源jsp文件? - How to use UI resources like CSS, Images and Js files which are placed inside a war into the source jsp files that are placed in a separate war? Runnable JAR缺少图像/文件(资源) - Runnable JARs missing Images/Files (Resources) 下载包含java资源(如图像)的完整网页 - download a complete web page including resources (like images) in java 在运行作为 JAR 存档分发的项目时加载图像等资源 - Loading resources like images while running project distributed as JAR archive 哪里可以放置JS,CSS和Images之类的公共资源? - Where to put public resources like JS, CSS and Images? Java-使用资源(图像和音频文件)导出到eclipse中的JAR文件 - Java - Export to JAR file in eclipse with resources (images and audio files) IntelliJ:如何将文本文件和图像等资源复制到构建路径? - IntelliJ: how to copy resources, such as text files and images to the build path? 无法在Spring MVC中找到像CSS文件之类的资源 - unable to find resources like css files in spring mvc 在Eclipse中将Java项目的资源(图像,数据文件等)存储在哪里? - Where to store resources for a java project in Eclipse (images, data files, …)? 在Java eclipse项目中添加资源等静态文件 - Add static files like resources in Java eclipse project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM