2014-01-14 171 views
0

我正在開發一個運行在樹莓派上的java程序,我無法使用終端運行它。從終端運行java程序

它包括兩個類兩者都位於中:

/home/pi/JBerries/Access control/bin/access/control 

還要注意它是利用擺動的GUI程序進行。

這是我使用的嘗試,目前運行它的命令:

[email protected] ~/JBerries/Access control $ java -classpath .bin.access.control.accessControlUI 

而這正是它吐出:

Usage: java [-options] class [args...] 
     (to execute a class) 
or java [-options] -jar jarfile [args...] 
     (to execute a jar file) 
where options include: 
-d32   use a 32-bit data model if available 
-d64   use a 64-bit data model if available 
-client  to select the "client" VM 
-server  to select the "server" VM 
       The default VM is client. 

-cp <class search path of directories and zip/jar files> 
-classpath <class search path of directories and zip/jar files> 
       A : separated list of directories, JAR archives, 
       and ZIP archives to search for class files. 
-D<name>=<value> 
       set a system property 
-verbose:[class|gc|jni] 
       enable verbose output 
-version  print product version and exit 
-version:<value> 
       require the specified version to run 
-showversion print product version and continue 
-jre-restrict-search | -no-jre-restrict-search 
       include/exclude user private JREs in the version search 
-? -help  print this help message 
-X   print help on non-standard options 
-ea[:<packagename>...|:<classname>] 
-enableassertions[:<packagename>...|:<classname>] 
       enable assertions with specified granularity 
-da[:<packagename>...|:<classname>] 
-disableassertions[:<packagename>...|:<classname>] 
       disable assertions with specified granularity 
-esa | -enablesystemassertions 
       enable system assertions 
-dsa | -disablesystemassertions 
       disable system assertions 
-agentlib:<libname>[=<options>] 
       load native agent library <libname>, e.g. -agentlib:hprof 
       see also, -agentlib:jdwp=help and -agentlib:hprof=help 
-agentpath:<pathname>[=<options>] 
       load native agent library by full pathname 
-javaagent:<jarpath>[=<options>] 
       load Java programming language agent, see java.lang.instrument 
-splash:<imagepath> 
       show splash screen with specified image 
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more  details. 

這是一個跡象,表明我的計劃已準備就緒運行,我只需要包括某種啓動選項?任何幫助將非常感激。

+1

'.bin.'看起來不對...... – MadProgrammer

+0

你的班級(包括包)的名稱是什麼?你想要'java -classpath「$ CLASSPATH:./ bin」access.control.accessControlUI'或者'java -classpath。 bin.access.control.accessControlUI' –

回答

1

嘗試

java -classpath . bin.access.control.accessControlUI 

公告之間的 「空間」。和bin

+0

啊,是的,我錯過了一個空間!我現在必須先輸入它,因爲我現在回到了一個熟悉的錯誤。這雖然回答了當前的問題。此時應該結束這個問題並提出一個新問題或編輯我目前的問題? – Suipaste

+1

@StephenTalbot,如果你得到一個全新的錯誤,最好問一個新的問題 – sasankad