Topic: [求助]Quartz配置,急

  Print this page

1.[求助]Quartz配置,急 Copy to clipboard
Posted by: b0r0j0
Posted on: 2005-05-11 17:33

testQuartz.class如下

import org.quartz.*;
import java.util.*;
public class testQuartz
{
public static void main(String args[])
{
//System.out.println("11");
SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();
try
{

Scheduler sched = schedFact.getScheduler();
sched.start();

JobDetail jobDetail = new JobDetail("myJob",
sched.DEFAULT_GROUP,
DumbJob.class);

SimpleTrigger trigger = new SimpleTrigger("myTrigger",
sched.DEFAULT_GROUP,
new Date(),
null,
0,
0L);

sched.scheduleJob(jobDetail, trigger);
}
catch(Exception e)
{
e.printStackTrace();
}

}

}

DumbJob.class如下

import org.quartz.*;
public class DumbJob implements Job {

public DumbJob() {
}

public void execute(JobExecutionContext context)
throws JobExecutionException
{
System.err.println("DumbJob is executing.");
}
}


Jbuilder加载了quartz.jar,编译无错误,运行时候显示错误如下

D:\JBuilder2005\jdk1.4\bin\javaw -classpath "D:\workplace\Jbulider-P1\classes;D:\JBuilder2005\lib\quartz.jar;D:\JBuilder2005\jdk1.4\jre\lib\im\indicim.jar;D:\JBuilder2005\jdk1.4\jre\lib\im\thaiim.jar;D:\JBuilder2005\jdk1.4\jre\lib\ext\dnsns.jar;D:\JBuilder2005\jdk1.4\jre\lib\ext\sunjce_provider.jar;D:\JBuilder2005\jdk1.4\jre\lib\ext\ldapsec.jar;D:\JBuilder2005\jdk1.4\jre\lib\ext\localedata.jar;D:\JBuilder2005\jdk1.4\jre\lib\jsse.jar;D:\JBuilder2005\jdk1.4\jre\lib\plugin.jar;D:\JBuilder2005\jdk1.4\jre\lib\sunrsasign.jar;D:\JBuilder2005\jdk1.4\jre\lib\charsets.jar;D:\JBuilder2005\jdk1.4\jre\lib\rt.jar;D:\JBuilder2005\jdk1.4\jre\lib\jce.jar;D:\JBuilder2005\jdk1.4\jre\javaws\javaws.jar;D:\JBuilder2005\jdk1.4\lib\tools.jar;D:\JBuilder2005\jdk1.4\lib\dt.jar;D:\JBuilder2005\jdk1.4\lib\htmlconverter.jar" org.quartz.impl.QuartzServer
java.security.AccessControlException: access denied (java.util.PropertyPermission org.quartz.properties read)
  at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
  at java.security.AccessController.checkPermission(AccessController.java:401)
  at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
  at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1276)
  at java.lang.System.getProperty(System.java:573)
  at org.quartz.impl.StdSchedulerFactory.initialize(StdSchedulerFactory.java:274)
  at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1035)
  at org.quartz.impl.QuartzServer.serve(QuartzServer.java:95)
  at org.quartz.impl.QuartzServer.main(QuartzServer.java:273)


向高手求助,在线等~~~~~

2.Re:[求助]Quartz配置,急 [Re: b0r0j0] Copy to clipboard
Posted by: b0r0j0
Posted on: 2005-05-12 15:47

原来是.jar没有放全

3.Re:[求助]Quartz配置,急 [Re: b0r0j0] Copy to clipboard
Posted by: ftang
Posted on: 2005-05-12 22:54

ask low level question don't post here....warning once.


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923