编译模拟器的问题(java) [英] Problems with compiling a simulator(java)

查看:77
本文介绍了编译模拟器的问题(java)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可能不是解决此问题的最佳地点,但是,在撰写有关智能交通控制器的硕士学位论文时,我发现此模拟器是用Java编写的,在我读过的许多论文中都曾使用过,但是由于某种原因,我无法/不会进行编译,任何人都可以告诉我为什么?
可以在

I know it might be not the best place for this question but,am doing a master thesis on Smart Traffic controllers , I found this simulator which is written in java, it has been used in many papers I've read , but for some reason I can't/it wouldn't be compiled , anyone can tell me why ? it can be found at

http:中找到//sourceforge.net/projects/stoplicht/

推荐答案

这是使用旧版本的Java( 1.5)
它使用enum作为变量名。需要(javac告诉您)给出命令:

This was made with an old version of Java (pre 1.5) It uses enum as a variable name. Need to as (javac tells you) give command :


javac -source 1.4 gld / *。java

javac -source 1.4 gld/*.java

注意:在传递路径到Java时,两个斜杠都在Java中起作用

Note : when passing a path to Java both slashes work in Java

如果找不到文件,可能是在错误的文件夹中。

If your getting file not found your probably in the wrong folder.

下载一个zip文件到一个可以说文件夹的地方:

Download a zip to a place lets say to folder:


D:\prog\j\

D:\prog\j\

现在打开命令提示符,我假设您在Windows PATH中有Java bin JDK吗?

Now open command prompt, I assume you have java bin JDK in windows PATH?

所以现在您有了默认的源下载zip

So now you have default source download zip


gld_rel131_source.zip

gld_rel131_source.zip

在D:\prog\j\

in D:\prog\j\

给出以下命令:


D:

D:

cd D:\ prog\j\

cd D:\prog\j\

mkdir traffic2\src

mkdir traffic2\src

cd traffic2\src

cd traffic2\src

jar xf D:\prog\j\gld_rel131_source.zip

jar xf D:\prog\j\gld_rel131_source.zip

mkdir ..\bin

mkdir ..\bin

javac -d ../bin-源码1.4 gld / *。java

javac -d ../bin -source 1.4 gld/*.java

cd ..\bin

cd ..\bin

java gld.GLDSim

java gld.GLDSim

这篇关于编译模拟器的问题(java)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆