1.如何让一个控件获得焦点,TextField tf=new TextField(30);tf.setFocusable();???
2JCreator3.5设置问题:
引用的包在d:\,当前的程序在c:\test\下,看书上说需要设置class path,再import.
设置步骤如下:configue--jdk profiles--选中j2skd---edit---class---add--addpath---添加d:\---确定.可设置完后,就连原来编译通过的程序也编译不了,都是类似下面的提示,总之,修改过后所有的.java都无法编译生成.class文件.
请教该如何在JCreator中设置新增加的classpath.--------------------Configuration: <Default>--------------------
javac: invalid flag: C:\test\Interface1.java
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-help Print a synopsis of standard options
Process completed.
2JCreator3.5设置问题:
引用的包在d:\,当前的程序在c:\test\下,看书上说需要设置class path,再import.
设置步骤如下:configue--jdk profiles--选中j2skd---edit---class---add--addpath---添加d:\---确定.可设置完后,就连原来编译通过的程序也编译不了,都是类似下面的提示,总之,修改过后所有的.java都无法编译生成.class文件.
请教该如何在JCreator中设置新增加的classpath.--------------------Configuration: <Default>--------------------
javac: invalid flag: C:\test\Interface1.java
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-help Print a synopsis of standard options
Process completed.
我知道应该是JDBC驱动的问题。
我在环境变量中已经配置了 mysql-connector-java-3.2.0-alpha-bin.jar 的路径(包括文件名)。
配置在 path 里面Class.forName(com.mysql.jdbc.Driver);
System.out.println("Success loading MySQL Driver!");
PATH里面我设置了BIN目录
CLASSPAHT里面设置了
tools.jar和驱动.jar的完整路径