DJNativeSwing中关于djflashh的问题

Project Zomboid
Topic Details
Fail to start
I try to start PZ from steam to be met with a quick flash from the cmd prompt, then nothing happens after. I tried to run the &ProjectZomboid32.exe& from the steam folder (I have a 32-bit system) and the command prompt gives me this:C:\Program Files\Steam\steamapps\****\ProjectZomboid&&.\jre\bin\java.exe& -Xms768m -Xmx768m -Djava.library.path=./ -cp lwjgl.lwjgl_util.DJNativeSwing.DJNativeSwing-AWT../ zombie.gameStates.MainScreenStatePicked up _JAVA_OPTIONS: -Xmx512mError occurred during initialization of VMIncompatible minimum and maximum heap sizes specifiedC:\Program Files\Steam\steamapps\****\ProjectZomboid&PAUSEPress any key to continue . . .Press any key and nothing happens, steam tells me I'm no longer playing the gameAny known fix?
Showing - of
8 Feb, 2014 @ 5:54am
Go to the desktop, zip it and try opening it Won't help -- EXE4J has to be getting incorrect xmx/xmn variables from somewhere. Note the _JAVA_OPTIONS: -Xmx512m, directly contradicting
-Xmx768m in the bat file itself.
You'll have to alter your environment variables for your system, removing JAVA_OPT or JAVA_OPTIONS.This can be done by typing system environment variable into Start and clicking the right option. It's most commonly the result of someone trying to optimize MineCraft. What do you mean by &typing it into Start& ?There is no where to type (I am running Windows XP SP3)
Originally posted by :You'll have to alter your environment variables for your system, removing JAVA_OPT or JAVA_OPTIONS.This can be done by typing system environment variable into Start and clicking the right option. It's most commonly the result of someone trying to optimize MineCraft. What do you mean by &typing it into Start& ?There is no where to type (I am running Windows XP SP3) Then you'll have to do it the old fashioned way: Control Panel -& System -& Advanced -& [Environment Variables] button.
Showing - of
Per page: 15
Topic Details
Date Posted: 8 Feb, 2014 @ 5:46amPosts: 7
Report this post
Note: This is ONLY to be used to report spam, advertising, and problematic (harassment, fighting, or rude) posts.
View mobile websiteDJ Native Swing - Code Snippets
Here are all the code snippets from the demo application: click on their name to see the corresponding source code.To see them running, download the DJ Native Swing distribution and launch the demo application (you can also see the source code of the snippets with syntax highlighting in the demo).
JWebBrowser
: This is a simple example that shows the basic configuration of an embedded web browser component.
: Set any HTML content to the web browser.
: Execute some Javascript code in the current web browser page.
: Control the navigation happening in the web browser from the Java application.
This allows to block certain links and/or the creation of new windows, or to open links and/or new windows elsewhere.
: Use static links or the Javascript sendNSCommand(name, arg1, arg2, ...) function to send commands to the Java application.
: Access and modify the cookies set by the various browser instances.
: Define HTTP headers and/or POST data to send along with the HTTP navigation request.
: Load web pages from the classpath with the help of the embedded simple web server.
: Dispose a web browser giving the current page the opportunity to ask for confirmation.
: Register a Java function that can be invoked from Javascript.
: Toggle edition mode of a web page by accessing the Mozilla interfaces using XPCOM.
: Modify the browser&s download manager using Mozilla XPCOM.
: Modify the browser&s decorator, to add our own menus and buttons.
: Capture the image of the page, including the portions that are outside of the viewport of the main document.
JFlashPlayer
: Display a Flash application.
: Control the flow of a Flash animation, and get/set global variables.
: Invoke functions, with or without waiting for a result, and listen to Flash commands.
JVLCPlayer
: Load a movie/sound file to an embedded VLC player.
: Load a file to VLC player, passing certain options (start time to 30, no audio and no title) using the playlist.
JHTMLEditor
: Graphically edit some HTML, get and set the HTML content, using the FCKEditor implementation.
: Graphically edit some HTML, get and set the HTML content, using the CKEditor implementation.
: Graphically edit some HTML, get and set the HTML content, using the TinyMCE implementation.
: Track whether the editor was modified since the last time its content was set.
JSyntaxHighlighter
: Display some content with syntax highlighting from one of the available languages (C++, C#, css, Delphi, Java, JS, PHP, Python, Ruby, SQL, VB, XML, HTML).
JWMediaPlayer (win32)
: Load a movie/sound file to an embedded multimedia player.
Native Dialogs
: Use a file dialog or a directory dialog, and customize them to your needs.
Additional Features
: Constrain the visibility to superimpose Swing and native components.
Note that Mac only supports shapes resolving to a single rectangle.
: Defer destruction until finalization to add/remove the same component.
It is not destroyed when removed but on disposeNativePeer() or garbage collection.
: Use a proxied component hierarchy for the native components to allow re-parenting and change of component Z-order.
Note that Mac only supports shapes resolving to a single rectangle.
: Create a thumbnail by painting a native component to an image.
: Simulate alpha blending of a Swing component over a native component. This works rather well over static content.
Note that Mac only supports shapes resolving to a single rectangle.
: Present the life cycle of a component and when method calls happen.
Also highlight how runInSequence(Runnable) can be useful, and for special needs how to use initializeNativePeer().
: Attach a listener for key and mouse events, and go as far as replacing the web browser popup menu with a Swing one.
: Get the file type associations, and use them to launch files.您的邮箱:
请将您的邮箱作为登录账号
您的昵称:
4~30个字符,可以为中文
登陆密码:
6~30个半角字符
确认密码:
请再次输入密码
验 证 码 :
新闻·资讯
技术·教程
视频会议专题
CopyRight ©
 京ICP备号java窗体与Flash交互 - 狂奔的呙牛 - 博客园
最近在研究flash,用flash去读取文件很简单,但是存储文件就很麻烦了。
因此想到用java的窗体进行交互。
下面是DJNativeSwing-SWT-1-0-3-的下载链接:
/s/1o67eIim
基本原理是用java内嵌式开源浏览器将编译好的swf文件进行展示。
如果是windows64位系统,需要64位的swt4.3的jar包:
http://archive.eclipse.org/eclipse/downloads/drops4/R-4.3.2-/swt-4.3.2-win32-win32-x86_64.zip
在windows窗体上展示flash文件目前本人亲测可用。
java与flash的数据交互据说有以下方法,尚未证明:
1.flash给swing发送消息:
ExternalInterface.call("sendNSCommand", "request", msg.toString());
这里的sendNSCommand是DJNativeSwing已经实现的方法,直接调用即可。
2.swing接收flash消息的方法:
flashPlayer.addFlashPlayerListener(new FlashPlayerListener() {
public void commandReceived(FlashPlayerCommandEvent e) {
String cmd = e.getCommand();
if (FlashCommand.EXIT.equals(cmd)) {
Application.exit();
} else if ("request".equals(cmd)) {
MessageServiceServerFlashImpl.this.processRequest((String)(e.getParameters()[0]));
} else if (FlashCommand.LOG.equals(cmd)) {
MessageServiceServerFlashImpl.this.processLog(e.getParameters());
flashPlayer就是DJNativeSwing里的JFlashPlayer。
3.swing给flash返回信息:
flashPlayer.invokeFlashFunction("reply", msg.toString());
4.flash处理swing返回的信息:
ExternalInterface.addCallback(("reply", onReply);
onReply就是自定义的回调函数,用来处理swing返回的信息。

我要回帖

更多关于 swing 的文章

 

随机推荐