import com.foo.Bar;这个包在哪里下? 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 log4j 里的吧,google search download log4j 你是不是看别人的代码啊或者网上视频什么的 java里好像没有这个类吧com.foo.Bar;的意思是引入了com文件夹下的foo文件夹里面的bar类 import com.foo.Bar;import org.apache.log4j.Logger;import org.apache.log4j.PropertyConfigurator; public class MyApp { static Logger logger = Logger.getLogger(MyApp.class.getName()); public static void main(String[] args) { // BasicConfigurator replaced with PropertyConfigurator. PropertyConfigurator.configure(args[0]); logger.info("Entering application."); Bar bar = new Bar(); bar.doIt(); logger.info("Exiting application."); } }就是提示Bar 这个类找不到,下面有什么类我也不知道。 你的代码不全,Bar是个自己定义的类.我给你写一个.package com.foo;public class Bar { public void doIt(){ System.out.println("do it yourself!"); }}建一个叫Bar的类,放在com/foo/下. 正则表达式问题 两button共用一个listener的问题 在求个正则表达式…… 求助:有一个已知数列,求这个数列中最多有几个相同的数字的方法 请问写一个类加分号与不加分号有什么区别是? 有没有完整的身份验证的代码!200分!我要交作业的!11111111 大批量的数据对象的网络问题:URL file or 使用RMI传递序列化好的对象Byte流 ?? hi 我要用java做东西,然后用在网页上。我应该用什么开发工具? 关于java.awt.*和java.awt.List? 急需帮忙。。。 netbeans下,如何向桌面应用程序添加hibernate支持?
com.foo.Bar;的意思是引入了com文件夹下的foo文件夹里面的bar类
import com.foo.Bar;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator; public class MyApp {
static Logger logger = Logger.getLogger(MyApp.class.getName());
public static void main(String[] args) {
// BasicConfigurator replaced with PropertyConfigurator.
PropertyConfigurator.configure(args[0]);
logger.info("Entering application.");
Bar bar = new Bar();
bar.doIt();
logger.info("Exiting application.");
}
}
就是提示Bar 这个类找不到,下面有什么类我也不知道。
System.out.println("do it yourself!");
}}
建一个叫Bar的类,放在com/foo/下.